From 312f847e73494696ed13e0c8826307d570458f3b Mon Sep 17 00:00:00 2001 From: Markus Koller Date: Thu, 4 Jun 2015 18:14:06 +0300 Subject: [PATCH] Remove trailing slashes when getting path tail --- autoload/airline/extensions/tabline/formatters/unique_tail.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/extensions/tabline/formatters/unique_tail.vim b/autoload/airline/extensions/tabline/formatters/unique_tail.vim index 32a5867..32fe07b 100644 --- a/autoload/airline/extensions/tabline/formatters/unique_tail.vim +++ b/autoload/airline/extensions/tabline/formatters/unique_tail.vim @@ -10,7 +10,7 @@ function! airline#extensions#tabline#formatters#unique_tail#format(bufnr, buffer if empty(name) let map[nr] = '[No Name]' else - let tail = fnamemodify(name, ':t') + let tail = fnamemodify(name, ':s?/\+$??:t') if has_key(tails, tail) let duplicates[nr] = nr endif