[QScintilla] Indentation guides in QScintilla2

Detlev Offenbach detlev at die-offenbachs.de
Sun Feb 17 18:42:33 GMT 2008


On Sonntag, 17. Februar 2008, Baz Walter wrote:
> Detlev Offenbach wrote:
> > On Sonntag, 17. Februar 2008, Baz Walter wrote:
> >> Detlev Offenbach wrote:
> >>   > I see the following. When you enter the following code
> >>>
> >>> def f():
> >>>     x = 6
> >>>     if x == 6:
> >>>         x = 7
> >>>
> >>>
> >>>         y = 7
> >>>
> >>> I get indentation guides below the if, even if the "empty" lines are
> >>> really empty (no characters there).
> >>
> >> Yes, I see the same thing, now. So it really does mean totally empty
> >> lines. I suppose the guides are being drawn something like the Edge
> >> Column in Edge-Line Mode.
> >>
> >> This looks like it might be quite annoying at first glance. However,
> >> your example python code has an indentation error with the fifth and
> >> sixth lines being newlines only. The problem would be more compelling if
> >> there were examples of syntactically correct code which showed wrong
> >> indentation guides.
> >>
> >> Baz
> >
> > The code is correct and is working. Just save it to a file and execute it
> > with python.
>
> Oops, sorry. I pasted it into an interactive session and got an
> IndentationError - I didn't look at the code itself.
>
> But now I don't see what's wrong with the new behaviour in this
> particular case. The "y = 7" line belongs to the if statement, so the
> indentation guides are not misleading.
>
> I just viewed your example in an editor using Qscintilla versions 1.7.1
> and 2.1, and the indentation guides have gaps at the fifth and sixth
> lines - which looks wrong to me.
>
> Are you saying it would be better with the gaps?
>
> Baz

Yes, because than you know, if there is (possibly unwanted) whitespace or not. 
As it is now, you have to check each line in question.

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the QScintilla mailing list