GNU nano - Bugs: bug #48627, doing a <Right> at the end...
You are not allowed to post comments on this tracker with your current authentication level.
bug #48627: doing a <Right> at the end of a long line, redraws the next line twice
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Mon 25 Jul 2016 03:08:28 PM UTC | ||
Severity: | 2 - Minor | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Mon 01 Aug 2016 06:06:17 PM UTC, comment #3: |
Benno Schulenberg <bens> |
Tue 26 Jul 2016 10:46:14 AM UTC, comment #2: No, it is not the x position that matters, but the xplustabs position. (Which is a misnomer, by the way, because it also reckons with multicolumn characters.) So what should be compared is: the actual column positions before and after the move. |
Benno Schulenberg <bens> |
Tue 26 Jul 2016 08:34:33 AM UTC, comment #1: Attached is a first smurf that avoids the needless redrawings of lines in the case of simple cursor movements (without any vertical scrolling). There are still needless redrawings in edit_redraw(), but that is something for an other bug.
|
Benno Schulenberg <bens> |
Mon 25 Jul 2016 03:08:28 PM UTC, original submission:
To reproduce, first create a file named 'double', with two long lines that are two characters shorter than the width of the terminal -- meaning that when you type one extra character at the end of the line, the line will scroll horizontally. Save the file and exit, and then apply the attached patch.
|
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 6 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-08-11 | bens | Open/Closed | Open | Closed | |
2016-08-01 | bens | Status | In Progress | Fixed | |
Summary | doing <Right> at the end of a long line, redraws next line twice | doing a <Right> at the end of a long line, redraws the next line twice | |||
2016-07-26 | bens | Attached File | - | Added use-the-x-position.patch, #38027 | |
Status | None | In Progress | |||
2016-07-25 | bens | Attached File | - | Added show-redraws.patch, #38022 |
Powered by Savane 3.13-d3ae.
Corresponding source code
Fixed in git, c9e9964.
What isn't fixed yet, though, is a <Ctrl+Right> at the end of a horizontally scrolled line -- that still redraws the target line unnecessarily. Fixing that will require passing the old xplustabs position to edit_redraw(). Bleh...
(Instead of computing this xplustabs at every corner, it would be better to just store it next to current_x in the openfile struct: openfile->current_column.)