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/ops.c | |
parent | 9ff7d717aa3176de5c61de340deb93f41c7780fc (diff) | |
download | vim-git-249591057b4840785c50e41dd850efb8a8faf435.tar.gz |
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/ops.c')
-rw-r--r-- | src/ops.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -294,7 +294,7 @@ shift_block(oparg_T *oap, int amount) p_ri = 0; // don't want revins in indent #endif - State = INSERT; // don't want REPLACE for State + State = MODE_INSERT; // don't want MODE_REPLACE for State block_prep(oap, &bd, curwin->w_cursor.lnum, TRUE); if (bd.is_short) return; @@ -488,7 +488,7 @@ block_insert( linenr_T lnum; // loop var int oldstate = State; - State = INSERT; // don't want REPLACE for State + State = MODE_INSERT; // don't want MODE_REPLACE for State s_len = (unsigned)STRLEN(s); for (lnum = oap->start.lnum + 1; lnum <= oap->end.lnum; lnum++) @@ -991,7 +991,7 @@ replace_character(int c) { int n = State; - State = REPLACE; + State = MODE_REPLACE; ins_char(c); State = n; // Backup to the replaced character. @@ -1842,7 +1842,7 @@ adjust_cursor_eol(void) if (curwin->w_cursor.col > 0 && gchar_cursor() == NUL && (cur_ve_flags & VE_ONEMORE) == 0 - && !(restart_edit || (State & INSERT))) + && !(restart_edit || (State & MODE_INSERT))) { // Put the cursor on the last character in the line. dec_cursor(); |