sqlite-gui
sqlite-gui copied to clipboard
Incorrect indentation behavior
With "Editor indent" set to "4 spaces", a Tab always adds 4 spaces rather than padding to the next Tab position, i.e. a multiple of 4 characters.
For example, if the caret is at 1:3, a Tab moves it to 1:7, but 1:5 is expected.
Fixed.
Thanks for the update! I've tried sqlite-gui.1.7.7-x64-inja.zip but 4 spaces are always added despite the caret position.
Maybe I missed something? Or do you expect another behaviour?
The indentation logic may be incomplete. Please see my screen recording below.
https://user-images.githubusercontent.com/863369/185736545-dc8bced2-afee-4109-ab4b-213a1d4f5c26.mp4
Do you mean that if the caret has a text leftward then on TAB the editor should add IndentSpaceCount - length(line) % IndentSpaceCount
e.g. _abc|
--> _abc____|
(adds 4 spaces for TAB = 8 spaces)?
I didn't use space intendation and therefore I don't know what I should to do.
Yes, that's correct. A Tab key should always move the caret to a "Tab position", i.e. column 4n + 1 (or 8n+1, 2n+1, depending on the setting). All text editors I've used work this way. For example, you can try these in VSCode's settings.json
:
"editor.insertSpaces": true,
"editor.tabSize": 4,
Fixed.