mirror of
https://github.com/vim/vim.git
synced 2025-10-28 09:27:14 -04:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user