Mercurial > vim
diff src/window.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 | 264fa41e6704 |
children | d0241e74bfdb |
line wrap: on
line diff
--- a/src/window.c +++ b/src/window.c @@ -2259,7 +2259,7 @@ leaving_window(win_T *win) // When leaving the window (or closing the window) was done from a // callback we need to break out of the Insert mode loop and restart Insert // mode when entering the window again. - if (State & INSERT) + if (State & MODE_INSERT) { stop_insert_mode = TRUE; if (win->w_buffer->b_prompt_insert == NUL) @@ -2281,7 +2281,7 @@ entering_window(win_T *win) // When entering the prompt window restart Insert mode if we were in Insert // mode when we left it and not already in Insert mode. - if ((State & INSERT) == 0) + if ((State & MODE_INSERT) == 0) restart_edit = win->w_buffer->b_prompt_insert; } #endif