mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Refactor: use a unified log function
This commit is contained in:
@@ -42,8 +42,7 @@ augroup END
|
||||
" https://vi.stackexchange.com/a/20397/15292.
|
||||
augroup auto_read
|
||||
autocmd!
|
||||
autocmd FileChangedShellPost * echohl WarningMsg
|
||||
\ | echo "File changed on disk. Buffer reloaded!" | echohl None
|
||||
autocmd FileChangedShellPost * call utils#Log("File changed on disk. Buffer reloaded!", 'warning')
|
||||
autocmd FocusGained,CursorHold * if getcmdwintype() == '' | checktime | endif
|
||||
augroup END
|
||||
|
||||
|
||||
@@ -61,9 +61,7 @@ let s:colorscheme_func = printf('s:my_theme_dict.%s()', s:theme)
|
||||
if has_key(s:my_theme_dict, s:theme)
|
||||
execute 'call ' . s:colorscheme_func
|
||||
else
|
||||
echohl WarningMsg
|
||||
echomsg 'Invalid colorscheme function: ' s:colorscheme_func
|
||||
echohl None
|
||||
call utils#Log('Invalid colorscheme function: ' . s:colorscheme_func, 'error')
|
||||
endif
|
||||
"}}
|
||||
"}
|
||||
|
||||
Reference in New Issue
Block a user