diff options
Diffstat (limited to 'autoload')
| -rw-r--r-- | autoload/utils.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/autoload/utils.vim b/autoload/utils.vim index c029cd3..580c1cd 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -174,6 +174,7 @@ endfunction " Redirect command output to a register for later processing. " Ref: https://stackoverflow.com/q/2573021/6064933 and https://unix.stackexchange.com/q/8101/221410 . function! utils#CaptureCommandOutput(command) abort + let l:tmp = @m redir @m silent! execute a:command redir END @@ -183,6 +184,8 @@ function! utils#CaptureCommandOutput(command) abort let l:lines = split(@m, '\n') call nvim_buf_set_lines(0, 0, 0, 0, l:lines) + + let @m = l:tmp endfunction " Edit all files matching the given patterns. |
