Skip to content

Commit 49221dc

Browse files
author
skywind3000
committed
accept ~ in g:cpatch_edit
1 parent 25b582b commit 49221dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugin/cpatch.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
" cpatch.vim - load colorscheme patch automatically
55
"
66
" Created by skywind on 2024/01/05
7-
" Last Modified: 2024/01/07 20:33
7+
" Last Modified: 2024/01/07 21:03
88
"
99
" Homepage: https://github.com/skywind3000/vim-color-patch
1010
"
@@ -166,7 +166,7 @@ function! s:CPatchEdit(mods, name) abort
166166
if name == ''
167167
let name = '__init__'
168168
endif
169-
let home = fnamemodify(g:cpatch_edit, ':p')
169+
let home = fnamemodify(expand(g:cpatch_edit), ':p')
170170
if !isdirectory(home)
171171
try
172172
call mkdir(home, 'p')
@@ -234,7 +234,7 @@ function! s:complete(ArgLead, CmdLine, CursorPos)
234234
let candidate = []
235235
let result = []
236236
let items = {}
237-
let home = fnamemodify(g:cpatch_edit, ':p')
237+
let home = fnamemodify(expand(g:cpatch_edit), ':p')
238238
if home !~ '\v[\/\\]$'
239239
let home = home .. '/'
240240
endif

0 commit comments

Comments
 (0)