Skip to content

Commit

Permalink
Merge pull request #49 from hotoo/patch-1
Browse files Browse the repository at this point in the history
fix: detect relativenumber feature by existis
  • Loading branch information
mattn committed Feb 10, 2022
2 parents 6595a54 + 8d89b48 commit 2083a41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/calendar.vim
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if !exists("g:calendar_datetime")
endif
if !exists("g:calendar_options")
let g:calendar_options = "fdc=0 nonu"
if has("+relativenumber")
if has("+relativenumber") || exists("+relativenumber")
let g:calendar_options .= " nornu"
endif
endif
Expand Down Expand Up @@ -906,7 +906,7 @@ function! calendar#show(...)
setlocal bufhidden=delete
silent! exe "setlocal " . g:calendar_options
let nontext_columns = &foldcolumn + &nu * &numberwidth
if has("+relativenumber")
if has("+relativenumber") || exists("+relativenumber")
let nontext_columns += &rnu * &numberwidth
endif
" Without this, the 'sidescrolloff' setting may cause the left side of the
Expand Down

0 comments on commit 2083a41

Please sign in to comment.