GNU nano - Patches: patch #10303, Extra row in the help bar for...
You are not allowed to post comments on this tracker with your current authentication level.
patch #10303: Extra row in the help bar for high-res X display windows
Submitter: | Joe Jamison <joejamison> | ||
Submitted: | Sat 07 Jan 2023 07:57:28 PM UTC | ||
Priority: | 3 - Low | Status: | Wont Do |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed | Release: | None |
Tue 10 Jan 2023 03:02:34 PM UTC, comment #2: |
Benno Schulenberg <bens> |
Sat 07 Jan 2023 11:57:37 PM UTC, comment #1: I was doing some additional testing, and it turns out that this patch will cause a SIGFPE with certain window sizes and help bar function numbers. On winio.c, removing a decimal from entry_cols truncs itemwidth to the next-smallest integer to prevent an unsigned overflow. This could be replicated with certain resolutions, by opening the Help Screen (^G), and then performing a text search (^W).
|
Joe Jamison <joejamison> |
Sat 07 Jan 2023 07:57:28 PM UTC, original submission:
When using nano on a high-resolution X display, there can be room for the help bar to be expanded an additional row. If the window has more than 160 columns, this patch will enable nano to add a third line of shortcuts. |
Joe Jamison <joejamison> |
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 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2023-03-12 | bens | Open/Closed | Open | Closed | |
2023-01-10 | bens | Priority | 5 - Normal | 3 - Low | |
Status | None | Wont Do | |||
2023-01-07 | joejamison | Attached File | - | Added 0001-Extra-row-in-the-help-bar-for-high-res-X-display-windows.patch, #54201 | |
2023-01-07 | joejamison | Attached File | - | Added 0001-Extra-row-in-the-help-bar-for-high-res-X-display-windows.patch, #54197 |
Powered by Savane 3.13-f8d8.
Corresponding source code
Thanks for the patch. But... Conditionalizing the number of help rows on the number of columns the terminal has seems wrong to me. I would have expected the help rows to be conditionalized on the number of rows (LINES) the terminal has: when this number is high, it might be fine to use an extra row for the help lines.
However, using three rows for the help lines would break the pairing of two similar shortcuts in the upper and lower help line, so I will not apply your patch.
(You might be interested in another approach -- see patch #8900.)
Some comments on details of your patch. You use two extra variables, `max_entries` and `entry_cols`. These are strange and unfitting names to me. The two variables have the exact same purpose, so they should be named the same. Fitting names could be `helprows` or 'rows_of_help`, or similar, because it holds the number of shown help lines. Furthermore you have a spurious change in changes_something() in src/nano.c -- it looks like you made a mistake during rebasing?