Mercurial > vim
comparison src/message.c @ 29940:051f47c69135 v9.0.0308
patch 9.0.0308: when cmdheight is zero the attention prompt doesn't show
Commit: https://github.com/vim/vim/commit/33a5dd8b237738c15cae87441d731ab899b4e846
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 28 22:17:50 2022 +0100
patch 9.0.0308: when cmdheight is zero the attention prompt doesn't show
Problem: When cmdheight is zero the attention prompt doesn't show.
Solution: Do not use the message window for a prompt.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Aug 2022 23:30:02 +0200 |
parents | 64b885d1acfc |
children | 34c5647efe7a |
comparison
equal
deleted
inserted
replaced
29939:6498ad24994d | 29940:051f47c69135 |
---|---|
1438 // TRUE if there is no command line showing ('cmdheight' is zero and not | 1438 // TRUE if there is no command line showing ('cmdheight' is zero and not |
1439 // already editing or showing a message) use a popup window for messages. | 1439 // already editing or showing a message) use a popup window for messages. |
1440 return p_ch == 0 && cmdline_row >= Rows; | 1440 return p_ch == 0 && cmdline_row >= Rows; |
1441 #else | 1441 #else |
1442 return FALSE; | 1442 return FALSE; |
1443 #endif | |
1444 } | |
1445 | |
1446 /* | |
1447 * Do not use the message window for the next message(s). | |
1448 * Used when giving a prompt. | |
1449 */ | |
1450 void | |
1451 dont_use_message_window(void) | |
1452 { | |
1453 #ifdef HAS_MESSAGE_WINDOW | |
1454 popup_hide_message_win(); | |
1455 cmdline_row = Rows - 1; | |
1443 #endif | 1456 #endif |
1444 } | 1457 } |
1445 | 1458 |
1446 /* | 1459 /* |
1447 * Prepare for outputting characters in the command line. | 1460 * Prepare for outputting characters in the command line. |
4071 | 4084 |
4072 return c; | 4085 return c; |
4073 } | 4086 } |
4074 #endif | 4087 #endif |
4075 | 4088 |
4089 dont_use_message_window(); | |
4076 oldState = State; | 4090 oldState = State; |
4077 State = MODE_CONFIRM; | 4091 State = MODE_CONFIRM; |
4078 setmouse(); | 4092 setmouse(); |
4079 | 4093 |
4080 // Ensure raw mode here. | 4094 // Ensure raw mode here. |