Skip to content

Commit

Permalink
Check for relativenumber before disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
sjbach committed Feb 25, 2012
1 parent 782802b commit 0bca58a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions plugin/lusty-explorer.vim
Expand Up @@ -1841,6 +1841,10 @@ class Display
VIM::command "setlocal textwidth=0" VIM::command "setlocal textwidth=0"
VIM::command "setlocal noreadonly" VIM::command "setlocal noreadonly"


if VIM::exists? '&relativenumber'
VIM::command "setlocal norelativenumber"
end

# Non-buffer-local (Vim is annoying). # Non-buffer-local (Vim is annoying).
# (Update SavedSettings if adding to below.) # (Update SavedSettings if adding to below.)
VIM::set_option "timeoutlen=0" VIM::set_option "timeoutlen=0"
Expand Down
5 changes: 4 additions & 1 deletion src/lusty/display.rb
Expand Up @@ -60,14 +60,17 @@ def create(prefix)
VIM::command "setlocal noswapfile" VIM::command "setlocal noswapfile"
VIM::command "setlocal nowrap" VIM::command "setlocal nowrap"
VIM::command "setlocal nonumber" VIM::command "setlocal nonumber"
VIM::command "setlocal norelativenumber"
VIM::command "setlocal foldcolumn=0" VIM::command "setlocal foldcolumn=0"
VIM::command "setlocal nocursorline" VIM::command "setlocal nocursorline"
VIM::command "setlocal nospell" VIM::command "setlocal nospell"
VIM::command "setlocal nobuflisted" VIM::command "setlocal nobuflisted"
VIM::command "setlocal textwidth=0" VIM::command "setlocal textwidth=0"
VIM::command "setlocal noreadonly" VIM::command "setlocal noreadonly"


if VIM::exists? '&relativenumber'
VIM::command "setlocal norelativenumber"
end

# Non-buffer-local (Vim is annoying). # Non-buffer-local (Vim is annoying).
# (Update SavedSettings if adding to below.) # (Update SavedSettings if adding to below.)
VIM::set_option "timeoutlen=0" VIM::set_option "timeoutlen=0"
Expand Down

0 comments on commit 0bca58a

Please sign in to comment.