[QScintilla] QScintilla observation

Phil Thompson phil at riverbankcomputing.com
Thu Jul 31 18:43:32 BST 2014


On 26/07/2014 9:45 am, Detlev Offenbach wrote:
> On Friday 25 July 2014, 22:49:15 Phil Thompson wrote:
>> On 25/07/2014 6:40 pm, Detlev Offenbach wrote:
>> > Hi,
>> >
>> > I was informed about an observation in the eric IDE I don't have a
>> > clue how to fix. When a Python
>> > source file is loaded and the enter key is pressed in column 0 for an
>> > indented line, a newline is
>> > inserted but the indentation of the line is not maintained (i.e.
>> > removed).
>> >
>> > Example:
>> >
>> > for i in range(1,5):
>> >     print(i)
>> >
>> > ^
>> >
>> > If you press return while the carret is at the ^ position you get this
>> > result:
>> >
>> > for i in range(1,5):
>> >
>> > print(i)
>> >
>> > Any hint on what I'm doing wrong would be appreciated.
>> 
>> I assume the indentation is retained if you press enter after the 
>> colon.
> 
> Indeed it is. However, that is not the intended behavior and it fails
> in case you want to enter an
> empty line in an already indented block of code. Btw, SciTE does it
> right so I guess it is either
> something in my code I don't know of yet or it is QScintilla. Anyway,
> help is appreciated very
> much.

I've made a change in tonight's snapshot which (IMHO) improves the 
behaviour. The indentation of a line is preserved if you have inserted a 
new line above by pressing enter at the start of the current line.

Phil


More information about the QScintilla mailing list