GNU nano - Bugs: bug #62885, with --linenumbers, +/string puts...
You are not allowed to post comments on this tracker with your current authentication level.
bug #62885: with --linenumbers, +/string puts cursor on bottom row
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Wed 10 Aug 2022 03:03:59 PM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Thu 11 Aug 2022 07:40:17 AM UTC, comment #3: |
Benno Schulenberg <bens> |
Wed 10 Aug 2022 03:48:28 PM UTC, comment #2: But the actual cause of 'focusing' becoming FALSE (before commit e0a4ee01) is that ensure_firstcolumn_is_aligned() sets it to FALSE, and it does this to prevent the cursor jumping to the center row when line numbers are toggled on. |
Benno Schulenberg <bens> |
Wed 10 Aug 2022 03:37:22 PM UTC, comment #1: Currently it are these two lines that set 'focusing' to FALSE at startup when --linenumbers is used:
|
Benno Schulenberg <bens> |
Wed 10 Aug 2022 03:03:59 PM UTC, original submission:
To reproduce, run:
See that the cursor is on the bottom row. Unexpected, and incorrect. Now run the same command but without the --line option:
The cursor is on the center row. Strange! What does --linenumbers do that it interferes with 'focusing'?
|
Benno Schulenberg <bens> |
No files currently attached
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 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2022-11-16 | bens | Open/Closed | Open | Closed | |
2022-08-11 | bens | Status | In Progress | Fixed | |
Summary | with --linenumbers, +/string puts cursor on the bottom row | with --linenumbers, +/string puts cursor on bottom row | |||
2022-08-10 | bens | Status | None | In Progress |
Powered by Savane 3.13-3230.
Corresponding source code
Fixed in git, commit 83629b99, by setting the margin to an impossible value just before entering the main loop, so that also during the very first evaluation of the needed margin 'focusing' will be kept TRUE. It's not possible to simply initialize 'margin' to this value because the tiny version needs 'margin' to be zero.