Procházet zdrojové kódy

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 před 12 roky
rodič
revize
aab37d4ccd
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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>'