mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
remove check_visual_highlight()
This check is meaningless, we assume the terminal supports reverse-mode.
This commit is contained in:
parent
103e021912
commit
e2d71d11de
@ -319,7 +319,6 @@ retnomove:
|
|||||||
|
|
||||||
// Start Visual mode before coladvance(), for when 'sel' != "old"
|
// Start Visual mode before coladvance(), for when 'sel' != "old"
|
||||||
if ((flags & MOUSE_MAY_VIS) && !VIsual_active) {
|
if ((flags & MOUSE_MAY_VIS) && !VIsual_active) {
|
||||||
check_visual_highlight();
|
|
||||||
VIsual = old_cursor;
|
VIsual = old_cursor;
|
||||||
VIsual_active = true;
|
VIsual_active = true;
|
||||||
VIsual_reselect = true;
|
VIsual_reselect = true;
|
||||||
|
@ -2764,7 +2764,6 @@ do_mouse (
|
|||||||
if (VIsual_active)
|
if (VIsual_active)
|
||||||
orig_cursor = VIsual;
|
orig_cursor = VIsual;
|
||||||
else {
|
else {
|
||||||
check_visual_highlight();
|
|
||||||
VIsual = curwin->w_cursor;
|
VIsual = curwin->w_cursor;
|
||||||
orig_cursor = VIsual;
|
orig_cursor = VIsual;
|
||||||
VIsual_active = true;
|
VIsual_active = true;
|
||||||
@ -2934,22 +2933,6 @@ static int get_mouse_class(char_u *p)
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Check if highlighting for visual mode is possible, give a warning message
|
|
||||||
* if not.
|
|
||||||
*/
|
|
||||||
void check_visual_highlight(void)
|
|
||||||
{
|
|
||||||
static bool did_check = false;
|
|
||||||
|
|
||||||
if (full_screen) {
|
|
||||||
if (!did_check && HL_ATTR(HLF_V) == 0) {
|
|
||||||
MSG(_("Warning: terminal cannot highlight"));
|
|
||||||
}
|
|
||||||
did_check = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* End Visual mode.
|
* End Visual mode.
|
||||||
* This function should ALWAYS be called to end Visual mode, except from
|
* This function should ALWAYS be called to end Visual mode, except from
|
||||||
@ -6420,7 +6403,6 @@ static void nv_visual(cmdarg_T *cap)
|
|||||||
}
|
}
|
||||||
redraw_curbuf_later(INVERTED); /* update the inversion */
|
redraw_curbuf_later(INVERTED); /* update the inversion */
|
||||||
} else { /* start Visual mode */
|
} else { /* start Visual mode */
|
||||||
check_visual_highlight();
|
|
||||||
if (cap->count0 > 0 && resel_VIsual_mode != NUL) {
|
if (cap->count0 > 0 && resel_VIsual_mode != NUL) {
|
||||||
/* use previously selected part */
|
/* use previously selected part */
|
||||||
VIsual = curwin->w_cursor;
|
VIsual = curwin->w_cursor;
|
||||||
|
@ -678,8 +678,7 @@ static void win_update(win_T *wp)
|
|||||||
static int recursive = FALSE; /* being called recursively */
|
static int recursive = FALSE; /* being called recursively */
|
||||||
int old_botline = wp->w_botline;
|
int old_botline = wp->w_botline;
|
||||||
long fold_count;
|
long fold_count;
|
||||||
/* remember what happened to the previous line, to know if
|
// Remember what happened to the previous line.
|
||||||
* check_visual_highlight() can be used */
|
|
||||||
#define DID_NONE 1 /* didn't update a line */
|
#define DID_NONE 1 /* didn't update a line */
|
||||||
#define DID_LINE 2 /* updated a normal line */
|
#define DID_LINE 2 /* updated a normal line */
|
||||||
#define DID_FOLD 3 /* updated a folded line */
|
#define DID_FOLD 3 /* updated a folded line */
|
||||||
|
Loading…
Reference in New Issue
Block a user