diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-07 20:01:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-07 20:01:16 +0100 |
commit | 249591057b4840785c50e41dd850efb8a8faf435 (patch) | |
tree | e9ba171529cf753e7aab0ec9adf5be3fedc17d00 /src/terminal.c | |
parent | 9ff7d717aa3176de5c61de340deb93f41c7780fc (diff) |
patch 8.2.4911: the mode #defines are not clearly namedv8.2.4911
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/terminal.c b/src/terminal.c index 6cac1a8ea2..a33a3a345b 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -1267,7 +1267,7 @@ write_to_term(buf_T *buffer, char_u *msg, channel_T *channel) // cleared. // TODO: only update once in a while. ch_log(term->tl_job->jv_channel, "updating screen"); - if (buffer == curbuf && (State & CMDLINE) == 0) + if (buffer == curbuf && (State & MODE_CMDLINE) == 0) { update_screen(VALID_NO_UPDATE); // update_screen() can be slow, check the terminal wasn't closed @@ -2129,7 +2129,7 @@ term_vgetc() int modify_other_keys = curbuf->b_term->tl_vterm == NULL ? FALSE : vterm_is_modify_other_keys(curbuf->b_term->tl_vterm); - State = TERMINAL; + State = MODE_TERMINAL; got_int = FALSE; #ifdef MSWIN ctrl_break_was_pressed = FALSE; @@ -2508,7 +2508,7 @@ term_win_entered() if (term_use_loop_check(TRUE)) { reset_VIsual_and_resel(); - if (State & INSERT) + if (State & MODE_INSERT) stop_insert_mode = TRUE; } mouse_was_outside = FALSE; |