From 9884869e6be8a3776adb6000c7e5e9af48f9d5d5 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Mon, 21 Oct 2019 13:56:35 +0900 Subject: [PATCH] Escape backslashes --- autoload/go/package.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/go/package.vim b/autoload/go/package.vim index b700170d8f..36f7fbfa13 100644 --- a/autoload/go/package.vim +++ b/autoload/go/package.vim @@ -283,7 +283,7 @@ function! go#package#Complete(ArgLead, CmdLine, CursorPos) abort endif if dir !=# path - let candidate = substitute(candidate, '^' . dir, path, 'g') + let candidate = substitute(candidate, '^' . escape(dir, '\\'), path, 'g') else let candidate = candidate[len(dir)+1:] endif