mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 22:29:42 +03:00
statusbar: suppress --constantshow when the terminal has just one row
When there is just one row, the text to be edited needs to be shown there, not some meta information about the cursor position. This fixes https://savannah.gnu.org/bugs/?60563. Bug existed since version 2.7.0, since nano allows very flat terminals.
This commit is contained in:
parent
07fd4c4598
commit
36ffb5f0ac
@ -2507,7 +2507,8 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
/* Update the displayed current cursor position only when there
|
||||
* is no message and no keys are waiting in the input buffer. */
|
||||
if (ISSET(CONSTANT_SHOW) && lastmessage == VACUUM && get_key_buffer_len() == 0)
|
||||
if (ISSET(CONSTANT_SHOW) && lastmessage == VACUUM && LINES > 1 &&
|
||||
get_key_buffer_len() == 0)
|
||||
report_cursor_position();
|
||||
|
||||
as_an_at = TRUE;
|
||||
|
@ -1683,7 +1683,7 @@ void check_statusblank(void)
|
||||
statusblank--;
|
||||
|
||||
/* When editing and 'constantshow' is active, skip the blanking. */
|
||||
if (currmenu == MMAIN && ISSET(CONSTANT_SHOW))
|
||||
if (currmenu == MMAIN && ISSET(CONSTANT_SHOW) && LINES > 1)
|
||||
return;
|
||||
|
||||
if (statusblank == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user