diff options
| author | jdhao <jdhao@hotmail.com> | 2022-07-02 16:47:58 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2022-07-02 16:47:58 +0800 |
| commit | 3678da1b3c71fb07027ded648675e67d703eb902 (patch) | |
| tree | 99847a76f8c6c853e7ceaf4499101dec6057c265 /autoload/utils.vim | |
| parent | a8fdbf35734203ac9b3d6faa512f08571f0655ea (diff) | |
update titlestring
Diffstat (limited to 'autoload/utils.vim')
| -rw-r--r-- | autoload/utils.vim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/autoload/utils.vim b/autoload/utils.vim index 580c1cd..5bfff78 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -131,9 +131,11 @@ function! utils#Get_titlestr() abort if g:is_linux let l:title_str = hostname() . ' ' endif - let l:title_str = l:title_str . expand('%:p:~') . ' ' - if &buflisted - let l:title_str = l:title_str . strftime('%Y-%m-%d %H:%M',getftime(expand('%'))) + + let l:buf_path = expand('%:p:~') + let l:title_str = l:title_str . l:buf_path . ' ' + if &buflisted && l:buf_path != "" + let l:title_str = l:title_str . strftime('%Y-%m-%d %H:%M %Z',getftime(expand('%'))) endif return l:title_str |
