Skip to content

Commit

Permalink
fix: display error when hidden option is off
Browse files Browse the repository at this point in the history
  • Loading branch information
weirongxu committed Feb 23, 2023
1 parent 043c082 commit abab7cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions autoload/coc_explorer/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,14 @@ endfunction
" Open file
function! coc_explorer#util#open_file(cmd, filepath, is_relative) abort
let cur_fullpath = expand('%:p')
if a:cmd == 'edit' && cur_fullpath == a:filepath
return
if a:cmd == 'edit'
if cur_fullpath == a:filepath
return
endif
if &modified && !&hidden
echoerr 'Vim hidden option is off'
return
endif
endif
let path = a:filepath
if a:is_relative
Expand Down

0 comments on commit abab7cf

Please sign in to comment.