From e0b3af196fc0530f97b34473ea48fa623c7be1ee Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 21 Aug 2014 12:37:25 +0400 Subject: [PATCH] Redraw screen to restore cursor and xterm title Redraw screen on BufWinEneter instead of BufReadPost. --- .vimrc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.vimrc b/.vimrc index f7404f7..422f97d 100644 --- a/.vimrc +++ b/.vimrc @@ -565,6 +565,8 @@ endif function! AutoEncoding() if &modified && &fileencoding != "" call SetupEncoding(&fileencoding) + else + redraw endif autocmd! auto-encoding augroup! auto-encoding @@ -723,14 +725,5 @@ command! UName call Uname() endif " ---------- -augroup redraw-once -autocmd! -" Redraw screen after all macros in ~/.vimrc and ~/.vim/ -autocmd BufReadPost * redraw -" Remove the redraw autocommand (it's only needed once) and the group -autocmd BufReadPost * autocmd! redraw-once -autocmd BufReadPost * augroup! redraw-once -augroup END - " This has to go to the very end of ~/.vimrc to allow reading the .vimrc set secure " safer working with script files in the current directory -- 2.39.2