don't rely on NR for checking that NrrRgn is loaded

This fixes issue when using Plug to conditionally loading NrrRgn:

Plug 'chrisbra/NrrwRgn', {'on': ['NR', 'NW', 'NRV', 'NW', 'NarrowRegion']}

The command will exist but the plugin has not been loaded yet which gives a warning message.
This commit is contained in:
skeept 2020-07-09 11:16:23 -05:00 committed by GitHub
parent 768bd0f5c6
commit c4ee72f2d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -370,7 +370,7 @@ function! airline#extensions#load()
call add(s:loaded_ext, 'promptline')
endif
if get(g:, 'airline#extensions#nrrwrgn#enabled', 1) && exists(':NR') == 2
if get(g:, 'airline#extensions#nrrwrgn#enabled', 1) && get(g:, 'loaded_nrrw_rgn', 0)
call airline#extensions#nrrwrgn#init(s:ext)
call add(s:loaded_ext, 'nrrwrgn')
endif