Skip to content
Snippets Groups Projects
Unverified Commit 1fcc07e5 authored by Jan Edmund Lazo's avatar Jan Edmund Lazo Committed by Junegunn Choi
Browse files

[vim] Fix escape of backslash in s:shortpath

Close #1000
parent 8db3345c
No related branches found
No related tags found
No related merge requests found
...@@ -756,7 +756,7 @@ let s:default_action = { ...@@ -756,7 +756,7 @@ let s:default_action = {
function! s:shortpath() function! s:shortpath()
let short = pathshorten(fnamemodify(getcwd(), ':~:.')) let short = pathshorten(fnamemodify(getcwd(), ':~:.'))
let slash = (s:is_win && !&shellslash) ? '\' : '/' let slash = (s:is_win && !&shellslash) ? '\' : '/'
return empty(short) ? '~'.slash : short . (short =~ slash.'$' ? '' : slash) return empty(short) ? '~'.slash : short . (short =~ escape(slash, '\').'$' ? '' : slash)
endfunction endfunction
function! s:cmd(bang, ...) abort function! s:cmd(bang, ...) abort
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment