mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-01-31 22:36:16 +08:00
vim9: Needs at least version 8.2.22844
This commit is contained in:
parent
82b1b2e876
commit
49cdcb7b3e
|
@ -44,7 +44,7 @@ function! airline#extensions#tabline#add_tab_label(dict)
|
|||
endfunction
|
||||
|
||||
|
||||
if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0) == 0)
|
||||
if !exists(":def") || !airline#util#has_vim9_script()
|
||||
|
||||
" Legacy Vim Script Implementation
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
scriptencoding utf-8
|
||||
|
||||
if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0) == 0)
|
||||
if !exists(":def") || !airline#util#has_vim9_script()
|
||||
function! airline#extensions#tabline#formatters#default#format(bufnr, buffers)
|
||||
let fnametruncate = get(g:, 'airline#extensions#tabline#fnametruncate', 0)
|
||||
let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':~:.')
|
||||
|
|
|
@ -13,7 +13,7 @@ let s:separators = {}
|
|||
let s:accents = {}
|
||||
let s:hl_groups = {}
|
||||
|
||||
if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0) == 0)
|
||||
if !exists(":def") || !airline#util#has_vim9_script()
|
||||
|
||||
" Legacy Vimscript implementation
|
||||
function! s:gui2cui(rgb, fallback) abort
|
||||
|
|
|
@ -41,7 +41,7 @@ let s:basic16 = [
|
|||
\ [ 0xFF, 0xFF, 0xFF ]
|
||||
\ ]
|
||||
|
||||
if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0) == 0)
|
||||
if !exists(":def") || !airline#util#has_vim9_script()
|
||||
|
||||
function! airline#msdos#round_msdos_colors(rgblist)
|
||||
" Check for values from MSDOS 16 color terminal
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
scriptencoding utf-8
|
||||
|
||||
if !exists(":def") || (exists(":def") && get(g:, "airline_experimental", 0) == 0)
|
||||
if !exists(":def") || !airline#util#has_vim9_script()
|
||||
|
||||
" Legacy Vim Script Implementation
|
||||
|
||||
|
|
|
@ -214,3 +214,10 @@ function! airline#util#try_focusgained()
|
|||
return dt >= 1
|
||||
endfunction
|
||||
|
||||
function! airline#util#has_vim9_script()
|
||||
" Returns true, if Vim is new enough to understand vim9 script
|
||||
return (exists(":def") &&
|
||||
\ v:versionlong >= 8022844 &&
|
||||
\ get(g:, "airline_experimental", 0))
|
||||
endfunction
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user