Skip to content

Commit

Permalink
Support for g:tmru_select_filter (and b:tmru_select_filter) (fixes #34)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtom committed Jul 23, 2013
1 parent d9d3f0d commit 79b2f19
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions autoload/tmru.vim
Expand Up @@ -44,6 +44,13 @@ if !exists('g:tmru#world') "{{{2
endif


if !exists('g:tmru_select_filter')
" If non-empty, an expression to |filter()| the list of files.
" Can also be buffer-local.
let g:tmru_select_filter = '' "{{{2
endif


if !exists('g:tmru#drop')
" If true, use |:drop| to edit loaded buffers (only available with GUI).
let g:tmru#drop = has('gui') "{{{2
Expand All @@ -67,6 +74,10 @@ function! tmru#SelectMRU()
call world.Set_display_format('filename')
" TLogDBG "SelectMRU#3"
call tmruobj.SetBase(world)
let select_filter = tlib#var#Get('tmru_select_filter', 'bg')
if !empty(select_filter)
let world.base = filter(world.base, select_filter)
endif
" TLogDBG "SelectMRU#4"
let bs = tlib#input#ListW(world)
" TLogDBG "SelectMRU#5"
Expand Down
4 changes: 2 additions & 2 deletions plugin/tmru.vim
Expand Up @@ -3,8 +3,8 @@
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-04-13.
" @Last Change: 2012-11-30.
" @Revision: 856
" @Last Change: 2013-07-16.
" @Revision: 857
" GetLatestVimScripts: 1864 1 tmru.vim

if &cp || exists("loaded_tmru")
Expand Down

0 comments on commit 79b2f19

Please sign in to comment.