diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/provider/clipboard.vim | 14 | ||||
-rw-r--r-- | runtime/doc/options.txt | 4 |
2 files changed, 13 insertions, 5 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim index d20b3a9bf1..5d1ce7896d 100644 --- a/runtime/autoload/provider/clipboard.vim +++ b/runtime/autoload/provider/clipboard.vim @@ -55,13 +55,21 @@ endif let s:clipboard = {} function! s:clipboard.get(reg) - if s:selections[a:reg].owner > 0 - return s:selections[a:reg].data + let reg = a:reg == '"' ? '+' : a:reg + if s:selections[reg].owner > 0 + return s:selections[reg].data end - return s:try_cmd(s:paste[a:reg]) + return s:try_cmd(s:paste[reg]) endfunction function! s:clipboard.set(lines, regtype, reg) + if a:reg == '"' + call s:clipboard.set(a:lines,a:regtype,'+') + if s:copy['*'] != s:copy['+'] + call s:clipboard.set(a:lines,a:regtype,'*') + end + return 0 + end if s:cache_enabled == 0 call s:try_cmd(s:copy[a:reg], a:lines) return 0 diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index fea8a59a74..fe1e3d57a5 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1402,8 +1402,8 @@ A jump table for the options with a short description can be found at |Q_op|. register '*' for all yank, delete, change and put operations which would normally go to the unnamed register. When "unnamed" is also included to the - option, yank operations (but not delete, change or - put) will additionally copy the text into register + option, yank and delete operations (but not put) + will additionally copy the text into register '*'. See |nvim-clipboard|. < *clipboard-autoselect* |