diff src/terminal.c @ 28773:d770568e6c98 v8.2.4911

patch 8.2.4911: the mode #defines are not clearly named Commit: https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 7 20:01:16 2022 +0100 patch 8.2.4911: the mode #defines are not clearly named Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first.
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 May 2022 21:15:06 +0200
parents 78fc778de076
children d0241e74bfdb
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -1267,7 +1267,7 @@ write_to_term(buf_T *buffer, char_u *msg
 	// 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;