From efb6ca8ae3033cca0e89b989cc60c855d11a5131 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 6 Feb 2021 15:12:10 +0300 Subject: [PATCH] DRY --- vim/.vim/plugin/file_line.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] -- 2.44.0