Fri 28 Oct 2016 06:01:21 PM UTC, comment #10:
Closing, because it's an unreleased bug.
|
Tue 20 Sep 2016 10:48:44 AM UTC, comment #9:
*"to verify the problem is fixed"
|
Tue 20 Sep 2016 10:47:48 AM UTC, comment #8:
Fixed in git, 598e0af.
The fix also improves the centering behavior of nano at startup (when softwrap is used). So to very the problem is fixed, run 'stty cols 120 && stty rows 20 && src/nano --ignore --smooth --soft +191,888 doc/faq.html' and type <M--> followed by three time <Down>, and then <Right> or <Ctrl+Right>, and see how the partial line is scrolled fully into view.
(In the beginning I shouldn't have said that bug #47710 was worsened. It wasn't. I was confused with bug #49086.)
|
Thu 15 Sep 2016 08:03:31 PM UTC, comment #7:
The patch is working so far, but I found bugs 49099 and 49100 while testing with it (both bugs occur without it, though).
|
Thu 15 Sep 2016 10:20:26 AM UTC, comment #6:
Attached is what I am testing now -- a slightky refined version of the previous patch.
(file #38515)
|
Thu 15 Sep 2016 08:36:23 AM UTC, comment #5:
Here is a provisional patch. First it reduces the amount to retreat with the extra number of lines that current takes up. And second, if the last retreating step overshot the target, step one line forward again.
It will probably need some refinements, but it fixes both bugs for me.
(file #38513)
|
Thu 15 Sep 2016 03:32:12 AM UTC, comment #4:
Okay. I apparently don't understand this as well as I thought (and I'm a bit rusty on the older code, so thanks for the explanation). If I can figure anything out, I'll let you know.
|
Wed 14 Sep 2016 06:52:34 PM UTC, comment #3:
The value of current_y is only used when edit_update() is called with STATIONARY -- and edit_redraw() calls edit_update() only with either CENTERING or FLOWING, so there is no need to keep current_y in sync in those cases. (It will be re-evaluated as soon as the movement is completed and we return to the chief loop in main().)
Forcing the Ctrl+Right behavior back to what it was before fc9c7b4 doesn't help much. A solution should fix both this bug /and/ bug #47710.
(By the way: better use 'git diff' to produce patches: it shows the function names in which each of the hunks occur, which is often helpful.)
|
Wed 14 Sep 2016 03:26:51 PM UTC, comment #2:
Never mind the first version of the patch; the current_y updates should avoid problems with inconsistent scrolling, but the scrolling problem is still there. The second version is really a brute-force attempt to figure out what's wrong, by forcing a stationary edit_update() when in softwrap mode: it fixes the reverse scrolling problem, but if you continue to press Ctrl-Right after the first time until you go off the bottom of the edit window, you'll end up with a version of bug 47710 again.
(file #38508)
|
Wed 14 Sep 2016 01:19:25 PM UTC, comment #1:
I've tested that (although with doc/faq.html, since ~/Repositories/NANO/doc/faq.html is not on my system), and the attached patch experimentally seems to fix it.
The problem is that smooth scrolling (STATIONARY scrolling in current code) depends on current_y's being kept up to date. If current is moved without current_y's being adjusted accordingly, edit_redraw() gets confused as to which direction and how much to scroll.
The current moving code throughout move.c keeps current_y in sync properly, except in do_prev_word() and do_next_word() (and do_prev_block() and do_next_block(), which have no bugs reported against them, but which are also much newer than do_prev_word() and do_next_word()). The attached patch, against git 97f6ae5, fixes this in those places.
(file #38503)
|
Wed 14 Sep 2016 11:10:05 AM UTC, original submission:
To reproduce, run 'stty cols 120 && stty rows 20 && src/nano --ignore --smooth --soft +191,888 ~/Repositories/NANO/doc/faq.html', type <Down> twice, the press Ctrl+Right. See how the screen scrolls a line down instead of up.
This behavior is caused by recent commit fc9c7b4, which fixes bug #42189. But this fix worsens the behavior seen in bug #47710.
|