mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-15 19:45:46 +08:00
fix(flygrep): check if filewritable
This commit is contained in:
parent
43f7c8f78a
commit
9f6420aca6
@ -78,7 +78,9 @@ function! s:update_history() abort
|
|||||||
if !isdirectory(expand(g:spacevim_data_dir.'SpaceVim'))
|
if !isdirectory(expand(g:spacevim_data_dir.'SpaceVim'))
|
||||||
silent call mkdir(expand(g:spacevim_data_dir.'SpaceVim'))
|
silent call mkdir(expand(g:spacevim_data_dir.'SpaceVim'))
|
||||||
endif
|
endif
|
||||||
silent call writefile([s:JSON.json_encode(s:grep_history)], expand(g:spacevim_data_dir.'SpaceVim/flygrep_history'))
|
if filewritable(expand(g:spacevim_data_dir.'SpaceVim/flygrep_history'))
|
||||||
|
call writefile([s:JSON.json_encode(s:grep_history)], expand(g:spacevim_data_dir.'SpaceVim/flygrep_history'))
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
let s:grep_history = s:read_histroy()
|
let s:grep_history = s:read_histroy()
|
||||||
let s:complete_input_history_num = [0,0]
|
let s:complete_input_history_num = [0,0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user