From 8897693e1398ac60cc3bea457a3dac82217e479a Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 6 Jul 2011 20:41:44 +1000 Subject: Fix problems with folding not extending to final line. Bug #3349157. From Marko Njezic. --- lexlib/Accessor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lexlib') diff --git a/lexlib/Accessor.cxx b/lexlib/Accessor.cxx index 5adaaa2f7..65609598f 100644 --- a/lexlib/Accessor.cxx +++ b/lexlib/Accessor.cxx @@ -71,7 +71,7 @@ int Accessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsComment *flags = spaceFlags; indent += SC_FOLDLEVELBASE; // if completely empty line or the start of a comment... - if ((ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') || + if ((LineStart(line) == Length()) || (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos))) return indent | SC_FOLDLEVELWHITEFLAG; else -- cgit v1.2.3