GNU nano - Bugs: bug #51787, <Down> gets stuck at start...
You are not allowed to post comments on this tracker with your current authentication level.
bug #51787: <Down> gets stuck at start of tab when tabsize is huge
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Fri 18 Aug 2017 07:58:13 PM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Tue 22 Aug 2017 10:29:23 PM UTC, comment #18: |
David Lawrence Ramsey <dolorous> |
Tue 22 Aug 2017 09:19:23 PM UTC, comment #17: After some thought, I've tried to implement the suggestion in commit 047cf9b. The attached patch against git a850bb2 may do what you need, although without a specific test case, I'm not certain. In the process, it also adds the same workaround for non-softwrap uses of leftedge_for() that's already in chunk_for(); maybe that part is a good idea on its own?
|
David Lawrence Ramsey <dolorous> |
Tue 22 Aug 2017 02:13:59 PM UTC, comment #16: Fixed in git, 97896d30. |
Benno Schulenberg <bens> |
Mon 21 Aug 2017 09:24:44 PM UTC, comment #15: I've experimentally changed the formula in proper_x() from the optimized one currently in nano:
|
David Lawrence Ramsey <dolorous> |
Mon 21 Aug 2017 08:56:52 PM UTC, comment #14: Looks good to me. Although while testing it, I found another movement bug with Down, that occurs both with these patches and without (using git 5e10528), that may be related to the original bug here. In an 80x24 terminal, run:
|
David Lawrence Ramsey <dolorous> |
Mon 21 Aug 2017 08:18:19 PM UTC, comment #13: Oops -- I should attach the patch. |
Benno Schulenberg <bens> |
Mon 21 Aug 2017 08:17:41 PM UTC, comment #12: Applying the attached patch on top of the one in bug #51809 gets rid of the erratic moevement. If you have improvements, let me know. |
Benno Schulenberg <bens> |
Sun 20 Aug 2017 10:56:22 PM UTC, comment #11: Forget the stuff in bug #51800; that issue and this are intertwined, but only the one patch there actually fixes the problem in comment #8 of this bug.
|
David Lawrence Ramsey <dolorous> |
Sun 20 Aug 2017 08:59:55 PM UTC, comment #10: The aforementioned comment links point to the wrong bug, but you know which ones I mean. |
David Lawrence Ramsey <dolorous> |
Sun 20 Aug 2017 08:59:05 PM UTC, comment #9: If you apply the patches in comment #6 and comment #7 of bug #51800, and then manually apply the patch at bug #51776 (so that you can tell when the screen freezes due to movement problems instead of screen update problems), that test case seems to be fixed. |
David Lawrence Ramsey <dolorous> |
Sun 20 Aug 2017 07:37:10 PM UTC, comment #8: In current git (243380c4) the behavior with <Down> is better, but still not fully fixed. Do for example:
|
Benno Schulenberg <bens> |
Sun 20 Aug 2017 09:07:20 AM UTC, comment #7: With the latest patch the behavior is better, but not yet correct for <Up>. To see what I mean, run:
|
Benno Schulenberg <bens> |
Sun 20 Aug 2017 01:24:27 AM UTC, comment #6: Check that: it's thrown off, but it's still more accurate than before. After noting that Pico-style paging converts between firstcolumn and current_x (column to index, with the associated inaccuracy if firstcolumn is in the middle of a tab), I've taken a different approach that gives the same results as the proper_x() changes.
|
David Lawrence Ramsey <dolorous> |
Sat 19 Aug 2017 11:42:29 PM UTC, comment #5: Also, on top of the patch, I've tried using proper_x() in both PageUp and PageDown (at the Pico-like paging starting from the top line of the screen), solely for testing purposes to see if it affects this, and it doesn't do anything useful. With the patch, but without the proper_x() change:
|
David Lawrence Ramsey <dolorous> |
Sat 19 Aug 2017 06:39:05 PM UTC, comment #4: If I understand you correctly here, there are two main requirements for navigating through softwrapped lines:
|
David Lawrence Ramsey <dolorous> |
Sat 19 Aug 2017 03:10:15 PM UTC, comment #3: The patch fixes the problem for <Down>: it no longer gets stuck. Thanks.
|
Benno Schulenberg <bens> |
Fri 18 Aug 2017 09:37:33 PM UTC, comment #2: I had to revive the proper_x() code to shift the index forward from an earlier attempt at bug #51621; this patch with it against git 54a9261 fixes the problem.
|
David Lawrence Ramsey <dolorous> |
Fri 18 Aug 2017 08:02:21 PM UTC, comment #1: (Forgot to add the CC.) |
Benno Schulenberg <bens> |
Fri 18 Aug 2017 07:58:13 PM UTC, original submission:
To reproduce, run:
|
Benno Schulenberg <bens> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 15 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-08-22 | dolorous | Attached File | - | Added 0001-moving-recalculate-leftedge-if-current_x-is-pushed-f.patch, #41619 | |
2017-08-22 | dolorous | Attached File | - | Added 0001-moving-recalculate-leftedge-if-current_x-is-pushed-f.patch, #41618 | |
2017-08-22 | bens | Status | In Progress | Fixed | |
Open/Closed | Open | Closed | |||
2017-08-21 | dolorous | Attached File | - | Added binary-test, #41609 | |
2017-08-21 | bens | Attached File | - | Added modulate-the-pww.patch, #41608 | |
2017-08-21 | bens | Assigned to | dolorous | bens | |
2017-08-20 | dolorous | Attached File | - | Added 0001-softwrap-fix-placewewant-s-going-out-of-range-when-m.patch, #41603 | |
2017-08-20 | dolorous | Attached File | - | Added 0001-softwrap-improve-vertical-downward-movement-through-.patch, #41583 | |
2017-08-19 | bens | Status | None | In Progress | |
Assigned to | None | dolorous | |||
2017-08-18 | dolorous | Attached File | - | Added 0001-softwrap-improve-vertical-downward-movement-through-.patch, #41575 | |
2017-08-18 | bens | Carbon-Copy | - | Added dolorous | |
2017-08-18 | bens | Carbon-Copy | Removed dol | - | |
2017-08-18 | bens | Carbon-Copy | - | Added dol |
Powered by Savane 3.13-f8d8.
Corresponding source code
Forget that version. The attached version properly sets placewewant when paging down as well as moving down one line. (It also sets placewewant at the end of the function even for PageUp; it's more consistent with PageDown, and doesn't change how PageUp works anyway.)
(file #41619)