aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-04-07 15:11:26 +0200
committerTeddy Wing2018-04-07 15:11:26 +0200
commit0bb9462f0d608a736307bf3233f65f964d721d47 (patch)
tree4b1bebfdabed6c256800165d364cf51f7ca36a6f
parent436edddb3a60e654427ac37b4f426e533754af86 (diff)
downloadvim-tabs-grep-0bb9462f0d608a736307bf3233f65f964d721d47.tar.bz2
tabs_grep.vim: Split `:tabs` output on `\n`
Otherwise it splits on spaces, and I end up with word elements in my list instead of line elements.
-rw-r--r--plugin/tabs_grep.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/tabs_grep.vim b/plugin/tabs_grep.vim
index 8860ad1..35a00fa 100644
--- a/plugin/tabs_grep.vim
+++ b/plugin/tabs_grep.vim
@@ -4,8 +4,9 @@ function! TabsGrep(search)
silent tabs
redir END
- let tabs = split(tabs_output)
+ let tabs = split(tabs_output, '\n')
+ echo tabs
call filter(tabs, function('s:MatchString', [a:search]))
echo tabs