Version: 4.4 (using KDE 3.4.1%2C%2520Arch%2520Linux)
when dynamic word wrap is unactivated, selection on a long line forward, trigger horizontal scroll toward right ..
But when trying to do a selection backward (toward left), horizontal scroll does not trigger, forcing user to stop selecting and move the scrollbar manually
reproducible at any time on my machine
I send you a picture to compensate my poor English.
thanks for the hard work.
I use kwrite daily
Created attachment 11277 [details]
just give a look at it
Should be considered major, anyone fun to look at this?
Doesn't seem to happen in kde 3.5
Ugh, means I need a kde 3.4 checkout :(
That happens for me even with current 3.5 branch
just create a long line, if you select to the right, everything fine, the view scrolls, but if you select to the left, the view doesn't scroll back :(
I can't confirm still, with up to date kde 3.5 branch.
I can confirm the bug with up to date kde 3.5 branch.
But only whe using the _mouse_ to select to the left, with the keyboard (shift + arrow left) it works.
I had the problem with kde 3.4;
However, using the same distrib (archlinux), I don't experience the bug anymore with kde 3.5
I conclude that this have gone by now. It works using both keyboard and mouse.
Correction: I still experience the bug with files containing some Chinese characters.
Backward selection with the mouse works fine with western letters and stop as soon as it touches a Chinese character (utf-8 encoding)
I pass along a test file
Created attachment 14125 [details]
this file allows you to experience the bug
This file may (hopefully(?)) allow you to experience the bug with kde 3.5
This file is UFT-8 encoded and contain some simplified Chinese characters
On Tuesday 03 January 2006 22:09, benjamin isant wrote:
> This file may (hopefully(?)) allow you to experience the bug with kde 3.5
Yes, selecting by mouse stops at the special characters (which btw can't be
rendered using bitstream vera sans mono). Scrolling using mouse works fine
Thanks for this information.
Created attachment 16904 [details]
fix for the bug
This patch fixes the issue. The problem is, that m_startX isn't adapted
anywhere, so the view does not move to the left. The corresponding line is
m_startX = QMAX(0, m_startX+(mouseX-d)/d);
Explanation: mouseX is < 0
The expression m_startX + mouseX/d does not work in 100% of the cases, because
if you maximize kwrite you cannot move the mouse further to the left, so that
mouseX/d=0. Thus, I added the offset -d, which results in (mouseX-d)/d.
I'm not sure, whether this is really the correct fix, so kate devs, please
review. For me, the fix works perfectly ;)
SVN commit 558895 by dhaumann:
fix: backward text selection doesn't trigger horizontal scroll
Please test :)
This fix is more correct than the patch attached in bug #106571 in comment #12.
Note: In trunk, this bug does not exist.
M +1 -1 kateviewinternal.cpp
--- branches/KDE/3.5/kdelibs/kate/part/kateviewinternal.cpp #558894:558895
@@ -2365,7 +2365,7 @@
KateTextCursor c(realLine, 0);
- int x = QMIN(QMAX(0, p.x() - thisRange.xOffset()), lineMaxCursorX(thisRange) - thisRange.startX);
+ int x = QMIN(QMAX(-m_startX, p.x() - thisRange.xOffset()), lineMaxCursorX(thisRange) - thisRange.startX);
m_view->renderer()->textWidth( c, startX() + x, startCol);