VIM: reselect visual selection after encodeing change

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

@ -56,7 +56,7 @@ function! mine#encoding#wrapper(fn) abort
" transform text " transform text
" adapted from: https://github.com/christianrondeau/vim-base64/blob/master/autoload/base64.vim#L36 " 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 " reset paste to whatever it was before
let &paste = l:paste let &paste = l:paste

Loading…
Cancel
Save