Skip to content

Commit 328f785

Browse files
committed
Merge pull request #87 from Konfekt/master
cleanup mru record function
2 parents f84ec81 + cb5b9ff commit 328f785

3 files changed

Lines changed: 2 additions & 17 deletions

File tree

autoload/ctrlp/mrufiles.vim

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ fu! ctrlp#mrufiles#opts()
1616
\ 'case_sensitive': ['s:cseno', 1],
1717
\ 'relative': ['s:re', 0],
1818
\ 'save_on_update': ['s:soup', 1],
19-
\ 'exclude_nomod': ['s:exclnomod', 0],
2019
\ 'map_string': ['g:ctrlp_mruf_map_string', s:mruf_map_string],
2120
\ }]
2221
for [ke, va] in items(opts)
@@ -58,8 +57,6 @@ fu! s:reformat(mrufs, ...)
5857
endf
5958

6059
fu! s:record(bufnr)
61-
if s:exclnomod && &l:modifiable | retu | en
62-
if s:exclnomod && !&l:modifiable | retu | en
6360
if s:locked | retu | en
6461
let bufnr = a:bufnr + 0
6562
let bufname = bufname(bufnr)
@@ -75,7 +72,8 @@ fu! s:addtomrufs(fname)
7572
let fn = exists('+ssl') ? tr(fn, '/', '\') : fn
7673
let abs_fn = fnamemodify(fn,':p')
7774
if ( !empty({s:in}) && fn !~# {s:in} ) || ( !empty({s:ex}) && fn =~# {s:ex} )
78-
\ || !empty(getbufvar('^' . abs_fn . '$', '&bt')) || !filereadable(abs_fn) | retu
75+
\ || !empty(getbufvar('^' . abs_fn . '$', '&bt'))
76+
retu
7977
en
8078
let idx = index(s:mrufs, fn, 0, !{s:cseno})
8179
if idx

doc/ctrlp.cnx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ OPTIONS *ctrlp-options*
8282
|ctrlp_mruf_default_order|....禁用排序。
8383
|ctrlp_mruf_case_sensitive|...最近最多使用文件是否大小写敏感。
8484
|ctrlp_mruf_save_on_update|...只要有一个新的条目添加,就保存到磁盘。
85-
|ctrlp_mruf_exclude_nomod|....从 MRU 中排除不可编辑的缓冲区。
8685

8786
缓冲区标签模式: (开启此模式,参考 |ctrlp-extensions| )
8887
|g:ctrlp_buftag_ctags_bin|....兼容的ctags二进制程序的位置。
@@ -584,11 +583,6 @@ MRU mode options:~
584583
是在退出Vim时才保存: >
585584
let g:ctrlp_mruf_save_on_update = 1
586585
<
587-
588-
*'g:ctrlp_mruf_exclude_nomod'*
589-
将这个选项设置为1来禁止添加不可编辑的缓冲区,例如帮助文件,到 MRU 列表: >
590-
let g:ctrlp_mruf_exclude_nomod = 0
591-
<
592586
----------------------------------------
593587
高级选项:~
594588

doc/ctrlp.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ Overview:~
7878
|ctrlp_mruf_default_order|....Disable sorting.
7979
|ctrlp_mruf_case_sensitive|...MRU files are case sensitive or not.
8080
|ctrlp_mruf_save_on_update|...Save to disk whenever a new entry is added.
81-
|ctrlp_mruf_exclude_nomod|....Exclude nonmodifiable buffers from the MRU list.
8281

8382
BufferTag mode: (to enable, see |ctrlp-extensions|)
8483
|g:ctrlp_buftag_ctags_bin|....The location of the ctags-compatible binary.
@@ -651,12 +650,6 @@ Set this to 0 to disable saving of the MRU list to hard drive whenever a new
651650
entry is added, saving will then only occur when exiting Vim: >
652651
let g:ctrlp_mruf_save_on_update = 1
653652
<
654-
655-
*'g:ctrlp_mruf_exclude_nomod'*
656-
Set this to 1 to disable adding nonmodifiable buffers, for example help files,
657-
to the MRU list: >
658-
let g:ctrlp_mruf_exclude_nomod = 0
659-
<
660653
----------------------------------------
661654
Advanced options:~
662655

0 commit comments

Comments
 (0)