From: Sergey Matveev Date: Sat, 6 Feb 2021 12:12:10 +0000 (+0300) Subject: DRY X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=efb6ca8ae3033cca0e89b989cc60c855d11a5131 DRY --- diff --git a/vim/.vim/plugin/file_line.vim b/vim/.vim/plugin/file_line.vim index c1544a1..45e250e 100644 --- a/vim/.vim/plugin/file_line.vim +++ b/vim/.vim/plugin/file_line.vim @@ -7,7 +7,7 @@ let g:loaded_mein_file_line = 1 function! s:gotoline() let file = bufname("%") if filereadable(file) | return | endif - let names = matchlist(bufname("%"), '\(.\{-1,}\):\%(\(\d\+\)\%(:\(\d*\):\?\)\?\)\?$') + let names = matchlist(file, '\(.\{-1,}\):\%(\(\d\+\)\%(:\(\d*\):\?\)\?\)\?$') if empty(names) | return | endif let file_name = names[1] let line_num = names[2] == "" ? "0" : names[2]