diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-01-04 01:53:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-04 01:53:13 +0100 |
commit | c403a95a5297c7d31af5bf9d518d6c6a345b0297 (patch) | |
tree | f17d73b2ecd502a2c30f8140a2f344da5012b348 /src/nvim/cursor_shape.c | |
parent | 103e02191237ab697fa694c6905173daa7023865 (diff) | |
parent | 37a499148ffda85a089042b4879fa0182c116f9f (diff) | |
download | rneovim-c403a95a5297c7d31af5bf9d518d6c6a345b0297.tar.gz rneovim-c403a95a5297c7d31af5bf9d518d6c6a345b0297.tar.bz2 rneovim-c403a95a5297c7d31af5bf9d518d6c6a345b0297.zip |
Merge #9446 'Visual: highlight char-at-cursor'
Diffstat (limited to 'src/nvim/cursor_shape.c')
-rw-r--r-- | src/nvim/cursor_shape.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/cursor_shape.c b/src/nvim/cursor_shape.c index cf79005a37..5551576c6d 100644 --- a/src/nvim/cursor_shape.c +++ b/src/nvim/cursor_shape.c @@ -254,6 +254,16 @@ char_u *parse_shape_opt(int what) return NULL; } +/// Returns true if the cursor is non-blinking "block" shape during +/// visual selection. +/// +/// @param exclusive If 'selection' option is "exclusive". +bool cursor_is_block_during_visual(bool exclusive) +{ + int mode_idx = exclusive ? SHAPE_IDX_VE : SHAPE_IDX_V; + return (SHAPE_BLOCK == shape_table[mode_idx].shape + && 0 == shape_table[mode_idx].blinkon); +} /// Map cursor mode from string to integer /// |