#881 Painting bug and fix

Cosmetic
closed-fixed
Scintilla (793)
5
2010-01-27
2009-12-15
Anonymous
No

There is a painting bug when using colored lines and the new line extra white space. In that case, if the caret is placed in the extra virtual space, at the right of the end of the line, then there is a piece of the backgroung (between the eol and the caret) that is shown using the default background color, not the line background color.

It seems that applying the folowing patch it is fixed:

Index: Editor.cxx

RCS file: /cvsroot/scintilla/scintilla/src/Editor.cxx,v
retrieving revision 1.498
diff -u -r1.498 Editor.cxx
--- Editor.cxx 2 Nov 2009 04:51:51 -0000 1.498
+++ Editor.cxx 15 Dec 2009 09:46:35 -0000
@@ -2256,7 +2256,7 @@
if (virtualSpace) {
rcSegment.left = xEol + xStart;
rcSegment.right = xEol + xStart + virtualSpace;
- surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated);
+ surface->FillRectangle(rcSegment, overrideBackground ? background : vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated);
if (!hideSelection && ((vsDraw.selAlpha == SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA))) {
SelectionSegment virtualSpaceRange(SelectionPosition(pdoc->LineEnd(line)), SelectionPosition(pdoc->LineEnd(line), sel.VirtualSpaceFor(pdoc->LineEnd(line))));
for (size_t r=0; r<sel.Count(); r++) {

Thanks,
Jose F. Gimenez

Discussion

  • Neil Hodgson

    Neil Hodgson - 2009-12-19

    Fix committed to CVS.

     
  • Neil Hodgson

    Neil Hodgson - 2009-12-19
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2010-01-27
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks