Skip to content

Commit 8821354

Browse files
committed
Fix . and ! mappings in wide and long listings
In these listings, use two or more spaces to delimit filenames (see :help netrw-cr). Fixes <tpope#112>
1 parent bb1bcdd commit 8821354

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugin/vinegar.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ function! s:absolutes(first, ...) abort
8888
let files = getline(a:first, a:0 ? a:1 : a:first)
8989
call filter(files, 'v:val !~# "^\" "')
9090
call map(files, "substitute(v:val, '^\\(| \\)*', '', '')")
91+
if get(b:, 'netrw_liststyle') == 1
92+
call map(files, "substitute(v:val, ' .*', '', '')")
93+
elseif get(b:, 'netrw_liststyle') == 2
94+
call map(files, "substitute(v:val, '^.\\{," . col('.') . "\\} ', '', '')")
95+
call map(files, "substitute(v:val, ' .*', '', '')")
96+
endif
9197
call map(files, 'b:netrw_curdir . s:slash() . substitute(v:val, "[/*|@=]\\=\\%(\\t.*\\)\\=$", "", "")')
9298
return files
9399
endfunction

0 commit comments

Comments
 (0)