|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2141
|
|
[10.0.187 Pro] - SQL Editor issues |
|
There are at least two options in Editor Options in SQL Editor that does not seem to work correctly.
The first one is Unindent keep align. This setting cannot be changed. It starts as unchecked but when I check it, click Ok and reopen the Editor Options dialog it is unchecked again. It also behaves as if it was checked.
The second one is Auto indent mode. That setting seems to be ignored. It can be changed and the change is persistent (I mean it stays that way after reopening Editor Options) but regardless of its state (checked or otherwise) the editor always seem to be in Auto indent mode, that is, after pressing Enter it always positions the cursor on the first non-blank character of the preceding non-blank line.
|
|
Tue Nov 13, 2018 9:14 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
Thank you. I believe, both editor settings are superseded by indenting and auto-formatting settings in SQL Assistant area, which take over code indenting. Perhaps they are only effective if SQL Assistance is suspended. I'm going to log this anyway, perhaps it can be changed in a way that's less confusing or just hide them.
|
|
Tue Nov 13, 2018 10:18 am |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2141
|
|
|
|
That could make sense in case of Auto Indent Mode as there's an Auto Indent Mode existing in SA Options > Code Formatting. But I couldn't find anything resembling the Unindent keep align. Which setting shall I look for?
|
|
Tue Nov 13, 2018 10:59 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
They are going to hide Auto indent mode in the 10.1 maintenance release as a way to eliminate conflicting and redundant options. Unfortunately I don't know how Unindent keep align is supposed to work, and the explanation given to me doesn't help me much. I've asked for more details.
|
|
Wed Nov 14, 2018 10:47 am |
|
|
gemisigo
Joined: 11 Mar 2010 Posts: 2141
|
|
|
|
It is supposed to work like this. Let's say you have the following code in the editor:
|
|
BEGIN
IF ...
BEGIN
...
BEGIN
...
END
...
END
ELSE
BEGIN
...
END
-- comment here
END
|
and let's assume you selected the text from IF to -- comment here.
Now, if you have Unindent keep align unchecked and you hit Shift+Tab like there's no tomorrow, you're going to end up with the code like this, nice and flat against the left side pos 1 margin.
|
|
BEGIN
IF ...
BEGIN
...
BEGIN
...
END
...
END
ELSE
BEGIN
...
END
-- comment here
END
|
On the other hand, if that setting is checked, unindenting stops as soon as the leftmost character hits position 1, thus the code now looks like this, regardless of how hard you're pushing Shift+Tab through several levels of building down below:
|
|
BEGIN
IF ...
BEGIN
...
BEGIN
...
END
...
END
ELSE
BEGIN
...
END
-- comment here
END
|
IF gets to pos 1 and prevents anyone else from doing so.
|
|
Wed Nov 14, 2018 11:17 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
Thank you. I get it now.
|
|
Wed Nov 14, 2018 1:07 pm |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|