From f7475f3e4fb01d5a34b0eec3ebff18981e910e87 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 24 Jul 2021 14:53:48 +0800 Subject: Refactor: use a unified log function --- core/autocommands.vim | 3 +-- core/ui.vim | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/autocommands.vim b/core/autocommands.vim index 29b4cea..64b86f8 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -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 diff --git a/core/ui.vim b/core/ui.vim index aa31bf0..919d3e3 100644 --- a/core/ui.vim +++ b/core/ui.vim @@ -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 "}} "} -- cgit v1.2.3