mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
fix: command output captured by a register not formatted properly
Newline is converted to NUL character, which is nasty, see also https://vi.stackexchange.com/q/6697/15292.
This commit is contained in:
parent
a86f1d2f31
commit
0ed8814aef
@ -180,7 +180,8 @@ function! utils#CaptureCommandOutput(command) abort
|
|||||||
call v:lua.vim.notify("command output captured to register m", "info", {'title': 'nvim-config'})
|
call v:lua.vim.notify("command output captured to register m", "info", {'title': 'nvim-config'})
|
||||||
"create a scratch buffer for dumping the text, ref: https://vi.stackexchange.com/a/11311/15292.
|
"create a scratch buffer for dumping the text, ref: https://vi.stackexchange.com/a/11311/15292.
|
||||||
tabnew | setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
|
tabnew | setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
|
||||||
call nvim_buf_set_lines(0, 0, 0, 0, [@m])
|
|
||||||
|
put! m
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Edit all files matching the given patterns.
|
" Edit all files matching the given patterns.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user