aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-26 20:59:28 +0200
committerGitHub <noreply@github.com>2019-05-26 20:59:28 +0200
commit1ca84897a0d65b0afbb2141f12a2061dabeb6b09 (patch)
tree01e8232cc8d79cf7dc03d66459d4d0bcaa4b077c /src/nvim/message.c
parent0bbaef8a99af8733cc64ff29858e17c19ed30b3c (diff)
parent80f40f0203f5af167f8c77bf6b9f22a4d1abd6da (diff)
downloadrneovim-1ca84897a0d65b0afbb2141f12a2061dabeb6b09.tar.gz
rneovim-1ca84897a0d65b0afbb2141f12a2061dabeb6b09.tar.bz2
rneovim-1ca84897a0d65b0afbb2141f12a2061dabeb6b09.zip
Merge #10059 from jerdna-regeiz/vim-8.1.0614
vim-patch:8.1.0614,8.1.0632,8.1.0644,8.1.0658,8.1.0660,8.1.0669,8.1.0673,8.1.0679,8.1.0697,8.1.0701,8.1.0702,8.1.0709,8.1.0717,8.1.0750,8.1.0767,8.1.0772,8.1.0039
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c55
1 files changed, 26 insertions, 29 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 07148cee76..c5b9187117 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1082,16 +1082,14 @@ void wait_return(int redraw)
/* Put the character back in the typeahead buffer. Don't use the
* stuff buffer, because lmaps wouldn't work. */
ins_char_typebuf(c);
- do_redraw = TRUE; /* need a redraw even though there is
- typeahead */
+ do_redraw = true; // need a redraw even though there is
+ // typeahead
}
}
- redir_off = FALSE;
+ redir_off = false;
- /*
- * If the user hits ':', '?' or '/' we get a command line from the next
- * line.
- */
+ // If the user hits ':', '?' or '/' we get a command line from the next
+ // line.
if (c == ':' || c == '?' || c == '/') {
if (!exmode_active)
cmdline_row = msg_row;
@@ -1100,19 +1098,17 @@ void wait_return(int redraw)
msg_ext_keep_after_cmdline = true;
}
- /*
- * If the window size changed set_shellsize() will redraw the screen.
- * Otherwise the screen is only redrawn if 'redraw' is set and no ':'
- * typed.
- */
+ // If the window size changed set_shellsize() will redraw the screen.
+ // Otherwise the screen is only redrawn if 'redraw' is set and no ':'
+ // typed.
tmpState = State;
- State = oldState; /* restore State before set_shellsize */
+ State = oldState; // restore State before set_shellsize
setmouse();
msg_check();
- need_wait_return = FALSE;
- did_wait_return = TRUE;
- emsg_on_display = FALSE; /* can delete error message now */
- lines_left = -1; /* reset lines_left at next msg_start() */
+ need_wait_return = false;
+ did_wait_return = true;
+ emsg_on_display = false; // can delete error message now
+ lines_left = -1; // reset lines_left at next msg_start()
reset_last_sourcing();
if (keep_msg != NULL && vim_strsize(keep_msg) >=
(Rows - cmdline_row - 1) * Columns + sc_col) {
@@ -1183,25 +1179,25 @@ void msg_ext_set_kind(const char *msg_kind)
*/
void msg_start(void)
{
- int did_return = FALSE;
+ int did_return = false;
if (!msg_silent) {
XFREE_CLEAR(keep_msg); // don't display old message now
}
if (need_clr_eos) {
- /* Halfway an ":echo" command and getting an (error) message: clear
- * any text from the command. */
- need_clr_eos = FALSE;
+ // Halfway an ":echo" command and getting an (error) message: clear
+ // any text from the command.
+ need_clr_eos = false;
msg_clr_eos();
}
- if (!msg_scroll && full_screen) { /* overwrite last message */
+ if (!msg_scroll && full_screen) { // overwrite last message
msg_row = cmdline_row;
msg_col =
cmdmsg_rl ? Columns - 1 :
0;
- } else if (msg_didout) { /* start message on next line */
+ } else if (msg_didout) { // start message on next line
msg_putchar('\n');
did_return = TRUE;
if (exmode_active != EXMODE_NORMAL)
@@ -1210,7 +1206,7 @@ void msg_start(void)
if (!msg_didany || lines_left < 0)
msg_starthere();
if (msg_silent == 0) {
- msg_didout = FALSE; /* no output on current line yet */
+ msg_didout = false; // no output on current line yet
}
if (ui_has(kUIMessages)) {
@@ -2992,12 +2988,13 @@ int verbose_open(void)
*/
void give_warning(char_u *message, bool hl) FUNC_ATTR_NONNULL_ARG(1)
{
- /* Don't do this for ":silent". */
- if (msg_silent != 0)
+ // Don't do this for ":silent".
+ if (msg_silent != 0) {
return;
+ }
- /* Don't want a hit-enter prompt here. */
- ++no_wait_return;
+ // Don't want a hit-enter prompt here.
+ no_wait_return++;
set_vim_var_string(VV_WARNINGMSG, (char *)message, -1);
XFREE_CLEAR(keep_msg);
@@ -3015,7 +3012,7 @@ void give_warning(char_u *message, bool hl) FUNC_ATTR_NONNULL_ARG(1)
msg_nowait = true; // Don't wait for this message.
msg_col = 0;
- --no_wait_return;
+ no_wait_return--;
}
void give_warning2(char_u *const message, char_u *const a1, bool hl)