Browse Source

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 years ago
parent
commit
aab37d4ccd
1 changed files with 1 additions and 1 deletions
  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>'