Mercurial > vim
diff src/autocmd.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 | 80ed5ad30d28 |
children | c5862dfaf0bd |
line wrap: on
line diff
--- a/src/autocmd.c +++ b/src/autocmd.c @@ -1758,7 +1758,7 @@ apply_autocmds_retval( static int has_cursorhold(void) { - return (first_autopat[(int)(get_real_state() == NORMAL_BUSY + return (first_autopat[(int)(get_real_state() == MODE_NORMAL_BUSY ? EVENT_CURSORHOLD : EVENT_CURSORHOLDI)] != NULL); } @@ -1777,7 +1777,7 @@ trigger_cursorhold(void) && !ins_compl_active()) { state = get_real_state(); - if (state == NORMAL_BUSY || (state & INSERT) != 0) + if (state == MODE_NORMAL_BUSY || (state & MODE_INSERT) != 0) return TRUE; } return FALSE;