VIM: reselect visual selection after encodeing change

This change makes vim re-select the portion of text that was changed
after an encoding change.
Jonathan Hodgson 4 years ago
parent 60da2caac1
commit ff6c1c304b
  1. 2
      nvim/.config/nvim/autoload/mine/encoding.vim

@ -56,7 +56,7 @@ function! mine#encoding#wrapper(fn) abort
" transform text
" adapted from: https://github.com/christianrondeau/vim-base64/blob/master/autoload/base64.vim#L36
execute "normal! c\<c-r>=mine#encoding#" . a:fn . "(@\")\<cr>\<esc>"
execute "normal! c\<c-r>=mine#encoding#" . a:fn . "(@\")\<cr>\<esc>`[v`]h"
" reset paste to whatever it was before
let &paste = l:paste

Loading…
Cancel
Save