Permalink
Browse files

Check for relativenumber before disabling

  • Loading branch information...
1 parent 782802b commit 0bca58abba46473c25809517440279738f4d1264 @sjbach committed Feb 25, 2012
Showing with 8 additions and 1 deletion.
  1. +4 −0 plugin/lusty-explorer.vim
  2. +4 −1 src/lusty/display.rb
@@ -1841,6 +1841,10 @@ class Display
VIM::command "setlocal textwidth=0"
VIM::command "setlocal noreadonly"
+ if VIM::exists? '&relativenumber'
+ VIM::command "setlocal norelativenumber"
+ end
+
# Non-buffer-local (Vim is annoying).
# (Update SavedSettings if adding to below.)
VIM::set_option "timeoutlen=0"
@@ -60,14 +60,17 @@ def create(prefix)
VIM::command "setlocal noswapfile"
VIM::command "setlocal nowrap"
VIM::command "setlocal nonumber"
- VIM::command "setlocal norelativenumber"
VIM::command "setlocal foldcolumn=0"
VIM::command "setlocal nocursorline"
VIM::command "setlocal nospell"
VIM::command "setlocal nobuflisted"
VIM::command "setlocal textwidth=0"
VIM::command "setlocal noreadonly"
+ if VIM::exists? '&relativenumber'
+ VIM::command "setlocal norelativenumber"
+ end
+
# Non-buffer-local (Vim is annoying).
# (Update SavedSettings if adding to below.)
VIM::set_option "timeoutlen=0"

0 comments on commit 0bca58a

Please sign in to comment.