From 6a3eecbda6bb64197a37370cb6d23dfed45a03cd Mon Sep 17 00:00:00 2001 From: Kien N Date: Thu, 28 Jun 2012 14:48:50 +0700 Subject: [PATCH] Enable default input for non-path Close #218 --- autoload/ctrlp.vim | 2 +- doc/ctrlp.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index b633209..56e827d 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -529,7 +529,7 @@ fu! s:BuildPrompt(upd, ...) endf " - SetDefTxt() {{{1 fu! s:SetDefTxt() - if s:deftxt == '0' || !s:ispath | retu | en + if s:deftxt == '0' || ( s:deftxt == 1 && !s:ispath ) | retu | en let txt = s:deftxt if !type(txt) let txt = txt && !stridx(s:crfpath, s:dyncwd) diff --git a/doc/ctrlp.txt b/doc/ctrlp.txt index 704269c..9ee5be9 100644 --- a/doc/ctrlp.txt +++ b/doc/ctrlp.txt @@ -341,6 +341,10 @@ Set this to 1 to enable seeding the prompt with the current file's relative path: > let g:ctrlp_default_input = 0 < +Instead of 1 or 0, if the value of the option is a string, it'll be used as-is +as the default input: > + let g:ctrlp_default_input = 'anystring' +< *'g:ctrlp_use_migemo'* Set this to 1 to use Migemo Pattern for Japanese filenames. Migemo Search only