Permalink
Browse files

Attempting a fix for Issue #3: Saving/replacing 't_mr'

  • Loading branch information...
1 parent a39a90f commit 4c3a5e6ad16d2b8277154cc40d6c28616bfd9ede @mikewest committed Oct 8, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 plugin/vimroom.vim
View
7 plugin/vimroom.vim
@@ -68,6 +68,9 @@ let s:scheme = ""
if exists( "g:colors_name" )
let s:scheme = g:colors_name
endif
+if exists( "&t_mr" )
+ let s:save_t_mr = &t_mr
+end
" Save the current scrolloff value for reset later
let s:save_scrolloff = ""
@@ -109,6 +112,9 @@ function! <SID>VimroomToggle()
else
hi clear
endif
+ if s:save_t_mr != ""
+ exec( "set t_mr=" .s:save_t_mr )
+ endif
" Reset `scrolloff` and `laststatus`
if s:save_scrolloff != ""
exec( "set scrolloff=" . s:save_scrolloff )
@@ -182,6 +188,7 @@ function! <SID>VimroomToggle()
exec( "hi NonText ctermbg=" . g:vimroom_background . " ctermfg=" . g:vimroom_background . " guifg=" . g:vimroom_background . " guibg=" . g:vimroom_background )
exec( "hi StatusLine ctermbg=" . g:vimroom_background . " ctermfg=" . g:vimroom_background . " guifg=" . g:vimroom_background . " guibg=" . g:vimroom_background )
exec( "hi StatusLineNC ctermbg=" . g:vimroom_background . " ctermfg=" . g:vimroom_background . " guifg=" . g:vimroom_background . " guibg=" . g:vimroom_background )
+ set t_mr=""
set fillchars+=vert:\
endif
endif

0 comments on commit 4c3a5e6

Please sign in to comment.