mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 05:00:04 +08:00
Add visual selection support
This commit is contained in:
parent
8a20f77077
commit
75ca118c1a
@ -310,7 +310,17 @@ function! s:highlight_cursor() abort
|
||||
\ }
|
||||
hi def link SpaceVimGuideCursor Cursor
|
||||
call s:VIMH.hi(info)
|
||||
if s:vis == 'gv'
|
||||
" [bufnum, lnum, col, off]
|
||||
let begin = getpos("'<")
|
||||
let end = getpos("'>")
|
||||
if begin[1] == end[1]
|
||||
let s:cursor_hi = matchaddpos('SpaceVimGuideCursor', [[begin[1], min([begin[2], end[2]]), abs(begin[2] - end[2]) + 1]])
|
||||
else
|
||||
endif
|
||||
else
|
||||
let s:cursor_hi = matchaddpos('SpaceVimGuideCursor', [[line('.'), col('.'), 1]])
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:remove_cursor_highlight() abort
|
||||
|
Loading…
Reference in New Issue
Block a user