Make <MiddleMouse> use "* instead of "" by default
Startify remaps <MiddleMouse> and uses v:register to paste from a specific register. The problem: Unless 'clipboard' is set to "unnamed" or "unnamedplus", v:register will default to "", whereas <MiddleMouse> usually defaults to "*. Fixes #281.
This commit is contained in:
parent
2e89a6ec2b
commit
f80b0cbe62
|
@ -731,7 +731,7 @@ function! s:set_mappings() abort
|
|||
execute "nnoremap <buffer>". s:nowait ."<silent> v :call <sid>set_mark('V')<cr>"
|
||||
execute "nnoremap <buffer>". s:nowait ."<silent> <cr> :call startify#open_buffers()<cr>"
|
||||
execute "nnoremap <buffer>". s:nowait ."<silent> <2-LeftMouse> :call startify#open_buffers()<cr>"
|
||||
execute "nnoremap <buffer>". s:nowait ."<silent> <MiddleMouse> :enew <bar> execute 'normal! \"'.v:register.'gp'<cr>"
|
||||
execute "nnoremap <buffer>". s:nowait ."<silent> <MiddleMouse> :enew <bar> execute 'normal! \"'.(v:register=='\"'?'*':v:register).'gp'<cr>"
|
||||
|
||||
" Without these mappings n/N wouldn't work properly, since autocmds always
|
||||
" force the cursor back on the index.
|
||||
|
|
Loading…
Reference in a new issue