]> git.phdru.name Git - dotfiles.git/commitdiff
Redraw screen to restore cursor and xterm title
authorOleg Broytman <phd@phdru.name>
Thu, 21 Aug 2014 08:37:25 +0000 (12:37 +0400)
committerOleg Broytman <phd@phdru.name>
Thu, 21 Aug 2014 08:37:25 +0000 (12:37 +0400)
Redraw screen on BufWinEneter instead of BufReadPost.

.vimrc

diff --git a/.vimrc b/.vimrc
index f7404f702f8ec8eb550357bdc8b25dbad9188a41..422f97d48a1acfa55a5dbdd59fe646989f6be162 100644 (file)
--- 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