...when 'Allow scrolling past the end of the document' is set
BUG: 399014
BUG: 306745
FIXED-IN: 5.57
...when 'Allow scrolling past the end of the document' is set
BUG: 399014
BUG: 306745
FIXED-IN: 5.57
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
As always poor tested and only in "normal mode", not vi
src/document/katedocument.cpp | ||
---|---|---|
3073 | Perhaps should that line not removed but out-commentend with a note why |
Is this related to bug https://bugs.kde.org/show_bug.cgi?id=306745 ? I once tried to fix 306745 but had to revert due to a regression, see D10054.
I don't think so. Here is it auto-bracket stuff, there general "is visible" stuff :-) (Yeah, my English rocks!)
Extra setCursor calls are always fishy.
But on the other side: how does one reproduce this?
For me, if I scroll behind the last line, close to any editing action triggers scrolling, with or without this patch.
But on the other side: how does one reproduce this?
Hm, I had just follow the descriptions in the report.
Unfortunately that kills some indenter tests.
https://build.kde.org/job/Frameworks/job/ktexteditor/job/kf5-qt5%20FreeBSDQt5.12/47/
Diffs like:
+++ /usr/home/jenkins/workspace/Frameworks/ktexteditor/kf5-qt5 FreeBSDQt5.12/autotests/input/indent/cstyle/openpar12/actual 2019-03-04 16:51:44.182941000 +0000
@@ -1,7 +1,6 @@
class X
{
void foo()
+ {}
+
};
src/view/kateview.cpp | ||
---|---|---|
1463 ↗ | (On Diff #53213) | That was needed to fix the auto bracket bug, looks somehow dangerous |
********* Start testing of KateViewTest ********* Config: Using QtTest library 5.12.1, Qt 5.12.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.2.1 20181127) PASS : KateViewTest::initTestCase() PASS : KateViewTest::testScrollPastEndOfDocument() PASS : KateViewTest::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 162ms ********* Finished testing of KateViewTest *********
This test could be improved to by doing some text input and also with enabled dyn wrap
This needs a more detailed review, and currently I find only very few time :( in general, I once tried to fix this bug, but couldn't find a fix. Now you found one - but given this is a very central place I think this needs to be thought through complete prior to committing.
Also, this needs a lot of manual testing with dynamic word wrap on and off...
currently I find only very few time :(
I see, sorry to bother you...once more
Perhaps Dominik has some idea if that is right or not ;=)
The biggest question here is these forced center call around 1463. Can you remember why/when this is needed/useful?
I think nobody has any idea if that is the right fix.
My proposal would be: we wait until 5.57 is out in ~one week.
Afterwards we apply this and give it some testing in master.
If the world doesn't break, this can stay in, else we can revert it before 5.58.
Would that be acceptable?
Did anyone tried this patch?
While coding my focus was only on behavior while enter text. Now I notice that the folding is "broken" in a way that the view jumps to the bottom :-S
First digging indicate that makeVisible(..) is called twice, and the second time reported cache()->displayViewLine(..) "out of view" which is pretty surprising. The given cursor position is the same.
Will look at this later this day.
Looks to me a call to KateLayoutCache::updateViewCache may help at some point.
But have no idea where to place and with which parms.
In KateLayoutCache::displayViewLine is "limit=0" on second call.
Please try if my last commit fixed that:
https://cgit.kde.org/ktexteditor.git/commit/?id=a9f97f1be115c1e4ede391b6d3d5e2aed6350992
Yes! A short test looked very promising.
Will play a little more, because had done some changes to this patch here :-/
Git commit 49b8add426a252afc1976188baebde194d75ced2 by Christoph Cullmann.
Committed on 07/07/2019 at 12:04.
Pushed by cullmann into branch 'master'.
fix goto line centering
force center for any external set cursor position call
M +1 -1 src/view/kateview.cpp
https://commits.kde.org/ktexteditor/49b8add426a252afc1976188baebde194d75ced2