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/clipboard.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/clipboard.c')
-rw-r--r-- | src/clipboard.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/clipboard.c b/src/clipboard.c index fbeee72518..e7854d0454 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -77,7 +77,7 @@ clip_update_selection(Clipboard_T *clip) pos_T start, end; // If visual mode is only due to a redo command ("."), then ignore it - if (!redo_VIsual_busy && VIsual_active && (State & NORMAL)) + if (!redo_VIsual_busy && VIsual_active && (State & MODE_NORMAL)) { if (LT_POS(VIsual, curwin->w_cursor)) { @@ -142,8 +142,8 @@ clip_own_selection(Clipboard_T *cbd) // selected area. There is no specific redraw command for this, // just redraw all windows on the current buffer. if (cbd->owned - && (get_real_state() == VISUAL - || get_real_state() == SELECTMODE) + && (get_real_state() == MODE_VISUAL + || get_real_state() == MODE_SELECT) && (cbd == &clip_star ? clip_isautosel_star() : clip_isautosel_plus()) && HL_ATTR(HLF_V) != HL_ATTR(HLF_VNC)) @@ -195,8 +195,8 @@ clip_lose_selection(Clipboard_T *cbd) // area. There is no specific redraw command for this, just redraw all // windows on the current buffer. if (was_owned - && (get_real_state() == VISUAL - || get_real_state() == SELECTMODE) + && (get_real_state() == MODE_VISUAL + || get_real_state() == MODE_SELECT) && (cbd == &clip_star ? clip_isautosel_star() : clip_isautosel_plus()) && HL_ATTR(HLF_V) != HL_ATTR(HLF_VNC) @@ -214,7 +214,7 @@ clip_lose_selection(Clipboard_T *cbd) static void clip_copy_selection(Clipboard_T *clip) { - if (VIsual_active && (State & NORMAL) && clip->available) + if (VIsual_active && (State & MODE_NORMAL) && clip->available) { clip_update_selection(clip); clip_free_selection(clip); |