diff options
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 /// |