aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-01-03 00:09:35 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-01-04 01:28:44 +0100
commit37a499148ffda85a089042b4879fa0182c116f9f (patch)
treef17d73b2ecd502a2c30f8140a2f344da5012b348 /src/nvim/normal.c
parente2d71d11de9282521e931d832a92154acd341ef0 (diff)
downloadrneovim-37a499148ffda85a089042b4879fa0182c116f9f.tar.gz
rneovim-37a499148ffda85a089042b4879fa0182c116f9f.tar.bz2
rneovim-37a499148ffda85a089042b4879fa0182c116f9f.zip
Visual: highlight char-at-cursor
Decide whether to highlight the visual-selected character under the cursor, depending on 'guicursor' style: - Highlight if cursor is blinking or non-block (vertical, horiz). - Do NOT highlight if cursor is non-blinking block. Traditionally Vim's visual selection does "reverse mode", which perhaps conflicts with the non-blinking block cursor. But 'guicursor' defaults to a vertical bar for selection=exclusive, and this confuses users who expect to see the text highlighted. closes #8983
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 8733c6db62..462b476a35 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -2761,9 +2761,9 @@ do_mouse (
} else if ((mod_mask & MOD_MASK_MULTI_CLICK) && (State & (NORMAL | INSERT))
&& mouse_has(MOUSE_VISUAL)) {
if (is_click || !VIsual_active) {
- if (VIsual_active)
+ if (VIsual_active) {
orig_cursor = VIsual;
- else {
+ } else {
VIsual = curwin->w_cursor;
orig_cursor = VIsual;
VIsual_active = true;
@@ -6401,8 +6401,8 @@ static void nv_visual(cmdarg_T *cap)
VIsual_mode = cap->cmdchar;
showmode();
}
- redraw_curbuf_later(INVERTED); /* update the inversion */
- } else { /* start Visual mode */
+ redraw_curbuf_later(INVERTED); // update the inversion
+ } else { // start Visual mode
if (cap->count0 > 0 && resel_VIsual_mode != NUL) {
/* use previously selected part */
VIsual = curwin->w_cursor;