Closed KSR-Yasuda closed 5 months ago
The cursor()
looks moving the cursor pos to the range end '>
.
--- a/autoload/traces.vim
+++ b/autoload/traces.vim
@@ -582,7 +582,6 @@ function! s:pos_range(end, pattern) abort
endif
unlet s:buf[s:nr].pre_cmdl_view
endif
- call cursor([a:end, 1])
if !empty(a:pattern)
call s:search(a:pattern, 'c', a:end, s:search_timeout_remaining)
endif
Why does it need this?
The plugin previews the range by moving the cursor to the end of the range. The cursor is moved only when Command-line mode is active. After the preview is over, the cursor is restored to its original position.
If you don't like that behavior, try adding the following to your vimrc:
let g:traces_preserve_view_state = 1
@markonm Thank you, it was fixed with this option!
With this plugin, pushing
:
in visual selected, the cursor moves the end of the range.With
relativenumber
option, this is harmful: commands works as the cursor is at the head of the range ('<
), but displayedrelativenumber
s are not the relative ones from the line.Could you take a look into this?
cf. https://github.com/vim-jp/issues/issues/1432