Hi all,
If I have auto indent turned on and I make a code block:
if(1) { <auto tab here> }
Then I put my cursor at '}' and I press UP ARROW. I'm now at col 0. If I press <TAB> my cursor moves TWO tab spots because their was an auto tab. I would expect for my cursor to be in between the tabs. I think this is a scintella bug because their is not a char added event passed back, but I'm not sure.
Ideas?
Cheers,
- Bob
On Tue, 12 Dec 2006 10:37:12 -0500, Bob Doan bdoan@sicom.com wrote:
Hi all,
If I have auto indent turned on and I make a code block:
if(1) {
<auto tab here> }
Then I put my cursor at '}' and I press UP ARROW. I'm now at col 0. If I press <TAB> my cursor moves TWO tab spots because their was an auto tab. I would expect for my cursor to be in between the tabs. I think this is a scintella bug because their is not a char added event passed back, but I'm not sure.
Yes, the cursor is set by Scintilla in this case. We can work around this by checking whether a TAB was inserted and decrease the cursor position by one. But is this really necessary? Might be this would confuse users and raise other problems. By the way, SciTE does the same.
I'll have a look at Scintilla's documentation, maybe there is a setting to configure it.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
Personally I think pressing TAB and getting the equivalent of TAB+RIGHT ARROW (n times) where N is the amount of tabs that are already their is confusing.
Thanks for looking
Cheers,
- Bob
Then I put my cursor at '}' and I press UP ARROW. I'm now at col 0. If I press <TAB> my cursor moves TWO tab spots because their was an auto tab. I would expect for my cursor to be in between the tabs. I think this is a scintella bug because their is not a char added event passed back, but I'm not sure.
Yes, the cursor is set by Scintilla in this case. We can work around this by checking whether a TAB was inserted and decrease the cursor position by one. But is this really necessary? Might be this would confuse users and raise other problems. By the way, SciTE does the same.
I'll have a look at Scintilla's documentation, maybe there is a setting to configure it.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key _______________________________________________ Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
On Tue, 12 Dec 2006 12:36:53 -0500, Bob Doan bdoan@sicom.com wrote:
Personally I think pressing TAB and getting the equivalent of TAB +RIGHT ARROW (n times) where N is the amount of tabs that are already their is confusing.
Thanks for looking
And finding ;-). It can be disabled. Should I add an option in the preferences dialog for this or is it sufficient to have an entry in the config file? Nick?
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
On 12/12/06 19:05:46, Enrico Tröger wrote:
On Tue, 12 Dec 2006 12:36:53 -0500, Bob Doan bdoan@sicom.com wrote:
Personally I think pressing TAB and getting the equivalent of TAB +RIGHT ARROW (n times) where N is the amount of tabs that are
already
their is confusing.
Thanks for looking
And finding ;-). It can be disabled. Should I add an option in the preferences dialog for this or is it sufficient to have an entry in the config file? Nick?
Personally I think most people wouldn't use the option, so if we note the config file option in the documentation this should be fine. There is also the ctrl-I binding for indentation that could be used in this situation, which doesn't move the cursor.
Regards, Nick
Personally I think most people wouldn't use the option, so if we note the config file option in the documentation this should be fine. There is also the ctrl-I binding for indentation that could be used in this situation, which doesn't move the cursor.
Hym.. I still think the behavior is kinda odd. Only scite does it that way also.
I did a quick survey of other programming editors and here is what I found:
Line 1: <MAYBE TAB>if (1) { Line 2: <MAYBE TAB><tab?> Line 3: <MAYBE TAB>}
bluefish: Aligns Line 2 & Line 3 start of text on Line 1 (No extra tab on line 2) gedit: same thing nedit: same thing
Eclips: Inserts the tab on line 2 like geany but does not move two tab places then tab is pressed.
I think it should be on by default. Unless I'm missing something who would expect two tab cursor movements when only one tab is pressed?
Cheers,
- Bob
Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
On Wed, 13 Dec 2006 08:58:57 -0500, Bob Doan bdoan@sicom.com wrote:
Personally I think most people wouldn't use the option, so if we note the config file option in the documentation this should be fine. There is also the ctrl-I binding for indentation that could be used in this situation, which doesn't move the cursor.
Hym.. I still think the behavior is kinda odd. Only scite does it that way also.
I did a quick survey of other programming editors and here is what I found:
Line 1: <MAYBE TAB>if (1) { Line 2: <MAYBE TAB><tab?> Line 3: <MAYBE TAB>}
bluefish: Aligns Line 2 & Line 3 start of text on Line 1 (No extra tab on line 2) gedit: same thing nedit: same thing
Eclips: Inserts the tab on line 2 like geany but does not move two tab places then tab is pressed.
I think it should be on by default. Unless I'm missing something who would expect two tab cursor movements when only one tab is pressed?
Sorry for the late answer. I just set the use_tab_to_indent option to false by default, so the cursor isn't moved to the second tab.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key