Editor settings:
Strip trailing blanks - ON
Use TAB character - ON
TAB indents - ON
When i do several indents and then i save the file, TAB characters stripped as expected. Caret position remains the same. Then i'm start typing and empty space filled by SPACE character instead of TAB.
You mean after typing some chars, the beginning TABs were translated to Spaces?
I can't reproduce this bug on WinXP with the latest trunk version.
No, TABS been stripped when the file was saved. But caret hold position at 12, for example, column. Then you start typing - and space (without any symblos) filled by space characters.
At pics:
1) empty line containes three tab characters
2) tab characters are stripped after saving, caret position - 12
3) start typing from 12 column, free space filled by space characters
I understand you steps and reported issue. But what is the expected behavior? You still want the editor automatically add three TABs when you start typing from 12 column?
Exactly. Size of indent is known, it's set by user in settings. So, we need to insert (column position / size of indent) of tabs and (column position % size of indent) spaces.
Hi, ChronicRat, I fully understand your problem and your expect behavior. I'm thinking that if the file is saved(all the tailing spaces/tabs are removed), the caret in column 12 is not correct. As I can see, the caret should move left to the real tailing of the line.
Any way, I'm not vary familiar with the wxScintilla control or the scintilla control(C::B use wxScintilla as its editor), maybe, you can get some help/direction from scintilla control site (there maillist).
Ok, thanks.
One future note. If you move the carret with the arrow keys to the first col then you can not move the currsor back, so the white spaces are not here.
This is still valid in the current trunk (17.xx rc)
A question:
Is the intended behaviour to move the caret to the first column, or to fill the space with taps after you continue to write. The first (and i think the right behaviour) should easy be fixed in sdk/editor.cpp:143
For the second i need to dive deeper into the code...
Fill the empty space with tabs. A move to the beginning will be annoying!