1. Takeshi NISHIDA
  2. vim-fuzzyfinder

Commits

Takeshi NISHIDA  committed 0148775

Changed not to map command-line <CR> for MRU-Command mode if g:FuzzyFinderOptions.MruCmd.mode_available is set 0 before loading fuzzyfinder.vim.

  • Participants
  • Parent commits 460f94b
  • Branches default

Comments (0)

Files changed (2)

File doc/fuzzyfinder.txt

View file
  • Ignore whitespace
 CHANGELOG                                              *fuzzyfinder-changelog*
 
 2.21.0:
+  - Changed not to map command-line <CR> for MRU-Command mode if
+    g:FuzzyFinderOptions.MruCmd.mode_available is set 0 before loading
+    fuzzyfinder.vim.
   - Added CallbackFile mode for third-party script to find a file/directory
     using Fuzzyfinder.
   - Changed not to append ".." to a completion menu in File/Directory mode.

File plugin/fuzzyfinder.vim

View file
  • Ignore whitespace
-" TODO: expand ** before typing /
 "=============================================================================
 " File:                plugin/fuzzyfinder.vim
 " Author:              Takeshi NISHIDA <ns9tks@DELETE-ME.gmail.com>
   autocmd BufWritePost * for s:m in s:GetAvailableModes() | call s:m.extend_options() | call s:m.on_buf_write_post() | endfor
 augroup END
 
-" cnoremap has a problem, which doesn't expand cabbrev.
-cmap <silent> <expr> <CR> <SID>OnCmdCR()
+if s:IsAvailableMode(g:FuzzyFinderMode.MruCmd)
+  " cnoremap has a problem, which doesn't expand cabbrev.
+  cmap <silent> <expr> <CR> <SID>OnCmdCR()
+endif
 
 command! -bang -narg=? -complete=buffer FuzzyFinderBuffer                    call g:FuzzyFinderMode.Buffer.launch    (<q-args>, len(<q-bang>))
 command! -bang -narg=? -complete=file   FuzzyFinderFile                      call g:FuzzyFinderMode.File.launch      (<q-args>, len(<q-bang>))