diff options
| author | hokorobi | 2024-10-05 10:37:40 +0900 |
|---|---|---|
| committer | hokorobi | 2024-10-05 10:37:40 +0900 |
| commit | 3ab82e6b54a0f34efb8793eab4ec4a58ef8fc3e5 (patch) | |
| tree | e86f967b6f0ed71ebda4537ff6ba07d7feff40ad | |
| parent | 31be4c36b713a9637c7b530ee52127000a05ea39 (diff) | |
| download | ctrlp.vim-3ab82e6b54a0f34efb8793eab4ec4a58ef8fc3e5.tar.gz | |
Add option to hide the current buffer
| -rw-r--r-- | autoload/ctrlp.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index 600ffa2..d26da11 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -98,6 +98,7 @@ let [s:pref, s:bpref, s:opts, s:new_opts, s:lc_opts] = \ 'compare_lim': ['s:compare_lim', 0], \ 'bufname_mod': ['s:bufname_mod', ':t'], \ 'bufpath_mod': ['s:bufpath_mod', ':~:.:h'], + \ 'bufcurfile_filter': ['s:bufcurfile_filter', 0], \ 'formatline_func': ['s:flfunc', 's:formatline(v:val)'], \ 'user_command_async': ['s:usrcmdasync', 0], \ }, { @@ -641,6 +642,9 @@ fu! ctrlp#buffers(...) retu ids el let bufs = [[], []] + if s:bufcurfile_filter + call filter(ids, 'v:val != s:crbufnr') + en for id in ids let bname = bufname(id) let ebname = bname == '' |