Bug 130015

Summary: Broken selection repaints when resizing
Product: [Applications] kate Reporter: Andreas Kling <info>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Screenshow of window before resize
Screenshot of window after resize

Description Andreas Kling 2006-06-29 12:35:56 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          GCC 3.4.6 
OS:                Linux

Create a document with more than one line,
like this paragraph.

Then select from "document" to "paragraph."

Now resize the window. The selection will break up on the right side of "line,"
Comment 1 Andreas Kling 2006-06-29 12:36:37 UTC
Created attachment 16825 [details]
Screenshow of window before resize
Comment 2 Andreas Kling 2006-06-29 12:37:13 UTC
Created attachment 16826 [details]
Screenshot of window after resize
Comment 3 Andreas Kling 2006-06-29 22:56:59 UTC
SVN commit 556297 by kling:

If a line is partially selected and is the first in a multi-line selection,
we have to fill the right side with the selection color.

BUG: 130015


 M  +7 -0      katerenderer.cpp  


--- branches/KDE/3.5/kdelibs/kate/part/katerenderer.cpp #556296:556297
@@ -696,6 +696,13 @@
       }
     }
 
+    // If this line has a partial selection that's the start of a multi-line selection,
+    // we have to fill areas on the right side of the text with the selection color.
+    if (showSelections() && hasSel && !selectionPainted && xStart >= (int)xPos && m_view->lineEndSelected(line, -1))
+    {
+      paint.fillRect(0, 0, xEnd-xStart, fs->fontHeight, config()->selectionColor());
+    }
+
     // Determine cursor position (if it is not within the range being drawn)
     if (showCursor && (cursor->col() >= int(curCol)))
     {