瀏覽代碼

use double-click to select an entry

Previously a single-click was used. But this introduced a bug that
was suprisingly hard to prevent because of the 'line skipping feature'.

If one changed to another tab and then used a mouse click on the tabpage
to jump back to the tab containing the startify buffer, the click would
have delegated into the buffer and select the next entry automatically.

Just using a double-click prevents this without adding complex code.
Marco Hinz 12 年之前
父節點
當前提交
aab37d4ccd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugin/startify.vim

+ 1 - 1
plugin/startify.vim

@@ -91,7 +91,7 @@ function! s:insane_in_the_membrane() abort
   nnoremap <buffer> q :quit<cr>
   nnoremap <buffer><silent> e :enew<cr>
   nnoremap <buffer><silent> <cr> :normal <c-r><c-w><cr>
-  nnoremap <buffer><silent> <LeftRelease> :execute 'normal '. matchstr(getline('.'), '\w\+')<cr>
+  nnoremap <buffer><silent> <2-LeftMouse> :execute 'normal '. matchstr(getline('.'), '\w\+')<cr>
 
   if exists('g:startify_empty_buffer_key')
     execute 'nnoremap <buffer><silent> '. g:startify_empty_buffer_key .' :enew<cr>'