Summary: | backward text selection doesn't trigger horizontal scroll | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | benjamin isant <benjamin> |
Component: | part | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
just give a look at it
this file allows you to experience the bug fix for the bug |
Description
benjamin isant
2005-05-31 23:03:25 UTC
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 :( Any news? 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
branch
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
> branch
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
though.
Thanks for this information.
-anders
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. BUG: 106571 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); |