Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use stricter matches. Also don’t count on 'ignorecase' option when ma…

…tching buffers

Fixes #182.

Note: don’t know what to do with LustyExplorer and vimpager: unable to
get buffers with such name or filetype.
  • Loading branch information...
commit 09c0cea859a2e0989eea740655b35976d951a84e 1 parent 4250505
@ZyX-I ZyX-I authored committed
Showing with 11 additions and 11 deletions.
  1. +1 −1  autoload/Pl/Match.vim
  2. +10 −10 autoload/Powerline/Matches.vim
View
2  autoload/Pl/Match.vim
@@ -33,7 +33,7 @@ function! Pl#Match#Validate(theme, window) " {{{
endif
for [eval, re] in matches
- if match(eval(eval), '\v'. re) != -1
+ if match(eval(eval), '\v\C'. re) != -1
return 1
endif
endfor
View
20 autoload/Powerline/Matches.vim
@@ -1,13 +1,13 @@
let g:Powerline#Matches#matches = {
- \ 'command_t' : Pl#Match#Add('bufname(winbufnr(a:window))', 'GoToFile'),
- \ 'bt_help' : Pl#Match#Add('getwinvar(a:window, "&bt")' , 'help'),
- \ 'ft_man' : Pl#Match#Add('getwinvar(a:window, "&ft")' , 'man'),
- \ 'ft_qf' : Pl#Match#Add('getwinvar(a:window, "&ft")' , 'qf'),
+ \ 'command_t' : Pl#Match#Add('bufname(winbufnr(a:window))', '^GoToFile$'),
+ \ 'bt_help' : Pl#Match#Add('getwinvar(a:window, "&bt")' , '^help$'),
+ \ 'ft_man' : Pl#Match#Add('getwinvar(a:window, "&ft")' , '^man$'),
+ \ 'ft_qf' : Pl#Match#Add('getwinvar(a:window, "&ft")' , '^qf$'),
\ 'ft_vimpager' : Pl#Match#Add('getwinvar(a:window, "&ft")' , 'vimpager'),
- \ 'gundo_preview' : Pl#Match#Add('bufname(winbufnr(a:window))', '__Gundo_Preview__'),
- \ 'gundo_tree' : Pl#Match#Add('bufname(winbufnr(a:window))', '__Gundo__'),
- \ 'lustyexplorer' : Pl#Match#Add('bufname(winbufnr(a:window))', '\[LustyExplorer-Buffers\]'),
- \ 'minibufexplorer' : Pl#Match#Add('bufname(winbufnr(a:window))', '\-MiniBufExplorer\-'),
- \ 'tagbar' : Pl#Match#Add('getwinvar(a:window, "&ft")' , 'tagbar'),
- \ 'nerdtree' : Pl#Match#Add('getwinvar(a:window, "&ft")' , 'nerdtree'),
+ \ 'gundo_preview' : Pl#Match#Add('bufname(winbufnr(a:window))', '^__Gundo_Preview__$'),
+ \ 'gundo_tree' : Pl#Match#Add('bufname(winbufnr(a:window))', '^__Gundo__$'),
+ \ 'lustyexplorer' : Pl#Match#Add('bufname(winbufnr(a:window))', '\[LustyExplorer\-Buffers\]'),
+ \ 'minibufexplorer' : Pl#Match#Add('bufname(winbufnr(a:window))', '^\-MiniBufExplorer\-$'),
+ \ 'tagbar' : Pl#Match#Add('getwinvar(a:window, "&ft")' , '^tagbar$'),
+ \ 'nerdtree' : Pl#Match#Add('getwinvar(a:window, "&ft")' , '^nerdtree$'),
\ }
Please sign in to comment.
Something went wrong with that request. Please try again.