Bug 130015 - Broken selection repaints when resizing
Summary: Broken selection repaints when resizing
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-29 12:35 UTC by Andreas Kling
Modified: 2006-06-29 22:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshow of window before resize (10.69 KB, image/png)
2006-06-29 12:36 UTC, Andreas Kling
Details
Screenshot of window after resize (13.72 KB, image/png)
2006-06-29 12:37 UTC, Andreas Kling
Details

Note You need to log in before you can comment on or make changes to this bug.
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)))
     {