1. Takeshi NISHIDA
  2. vim-fuzzyfinder

Commits

Takeshi NISHIDA  committed 6282a93

Fixed not to record a entry of input() in MRU-command mode.

  • Participants
  • Parent commits 2f52622
  • Branches default

Comments (0)

Files changed (1)

File plugin/fuzzyfinder.vim

View file
  • Ignore whitespace
 "     - TODO:
 "     - Added Bookmark mode.
 "     - Removed Favorite-file mode. Use Bookmark mode instead.
-"     - MRU-command mode で input()の履歴を登録しないよう修正
+"     - Fixed not to record a entry of input() in MRU-command mode.
 "
 "   2.14:
 "     - Changed to show buffer status in Buffer mode.
     call m.on_command_pre(getcmdtype() . getcmdline())
   endfor
   " lets last entry become the newest in the history
-  if getcmdtype() =~ '[:/?=]'
-    call histadd(getcmdtype(), getcmdline())
-  endif
-
+  call histadd(getcmdtype(), getcmdline())
   " this is not mapped again (:help recursive_mapping)
   return "\<CR>"
 endfunction
     endif
   endfor
   call cursor(ln, 0)
-  normal zz
+  normal zvzz
   redraw " to clear echo messages
 endfunction
 
 endfunction
 
 function! g:FuzzyFinderMode.MruCmd.on_command_pre(cmd)
-  call self.update_info(a:cmd)
+  if getcmdtype() =~ '^[:/?]'
+    call self.update_info(a:cmd)
+  endif
 endfunction
 
 function! g:FuzzyFinderMode.MruCmd.update_info(cmd)
   call s:InfoFileManager.load()
 
   let item = { 'path' : expand('%:p:~'), 'lnum' : line('.'), 'pattern' : getline('.'), 'time' : localtime() }
-  let item.name = s:InputHl('Bookmark as: ', pathshorten(item.path) . '|' . item.lnum . '| ' . item.pattern, 'Question')
+  let item.name = s:InputHl('Bookmark as:', pathshorten(item.path) . '|' . item.lnum . '| ' . item.pattern, 'Question')
   if item.name =~ '\S'
     call insert(self.info, item)
   else