Skip to content

Commit 55f6de0

Browse files
committed
fix(autoload): warning messages on windows
1 parent 6fab301 commit 55f6de0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

autoload/sonokai.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,11 @@ function! sonokai#ft_gen(path, last_modified, msg) "{{{
216216
endfor
217217
endfor
218218
call sonokai#ft_write(rootpath, 'text', "let g:sonokai_last_modified = '" . a:last_modified . "'") " Write the last modified time to `after/ftplugin/text/sonokai.vim`
219+
let ftplugin_relative_path = has('win32') ? '\after\ftplugin' : '/after/ftplugin'
219220
if a:msg ==# 'update'
220-
echohl WarningMsg | echom '[sonokai] Updated ' . rootpath . '/after/ftplugin' | echohl None
221+
echohl WarningMsg | echom '[sonokai] Updated ' . rootpath . ftplugin_relative_path | echohl None
221222
else
222-
echohl WarningMsg | echom '[sonokai] Generated ' . rootpath . '/after/ftplugin' | echohl None
223+
echohl WarningMsg | echom '[sonokai] Generated ' . rootpath . ftplugin_relative_path | echohl None
223224
endif
224225
endfunction "}}}
225226
function! sonokai#ft_write(rootpath, ft, content) "{{{
@@ -294,7 +295,8 @@ function! sonokai#ft_clean(path, msg) "{{{
294295
call delete(rootpath . '/after', 'd')
295296
endif
296297
if a:msg
297-
echohl WarningMsg | echom '[sonokai] Cleaned ' . rootpath . '/after/ftplugin' | echohl None
298+
let ftplugin_relative_path = has('win32') ? '\after\ftplugin' : '/after/ftplugin'
299+
echohl WarningMsg | echom '[sonokai] Cleaned ' . rootpath . ftplugin_relative_path | echohl None
298300
endif
299301
endfunction "}}}
300302
function! sonokai#ft_exists(path) "{{{

0 commit comments

Comments
 (0)