This commit is contained in:
Zhizhen He
2022-11-24 11:47:41 +08:00
parent 2654f838ae
commit 3c9c2ba5d4
7 changed files with 17 additions and 17 deletions

View File

@@ -90,7 +90,7 @@ function! s:prototype.build() dict
" need to fix highlighting groups, since we
" have skipped a section, we actually need
" the previous previous group and so the
" seperator goes from the previous previous group
" separator goes from the previous previous group
" to the current group
let pgroup = group
endif
@@ -106,12 +106,12 @@ function! s:prototype.build() dict
let line .= '%#'.group.'#'
elseif split
if !is_empty
let line .= s:get_transitioned_seperator(self, prev_group, group, side)
let line .= s:get_transitioned_separator(self, prev_group, group, side)
endif
let split = 0
else
if !is_empty
let line .= s:get_seperator(self, prev_group, group, side)
let line .= s:get_separator(self, prev_group, group, side)
endif
endif
let line .= is_empty ? '' : s:get_accented_line(self, group, contents)
@@ -137,7 +137,7 @@ function! airline#builder#should_change_group(group1, group2)
\ || color1[2] != color2[2] || color1[3] != color2[3]
endfunction
function! s:get_transitioned_seperator(self, prev_group, group, side)
function! s:get_transitioned_separator(self, prev_group, group, side)
let line = ''
if get(a:self._context, 'tabline', 0) && get(g:, 'airline#extensions#tabline#alt_sep', 0) && a:group ==# 'airline_tabsel' && a:side
call airline#highlighter#add_separator(a:prev_group, a:group, 0)
@@ -152,9 +152,9 @@ function! s:get_transitioned_seperator(self, prev_group, group, side)
return line
endfunction
function! s:get_seperator(self, prev_group, group, side)
function! s:get_separator(self, prev_group, group, side)
if airline#builder#should_change_group(a:prev_group, a:group)
return s:get_transitioned_seperator(a:self, a:prev_group, a:group, a:side)
return s:get_transitioned_separator(a:self, a:prev_group, a:group, a:side)
else
return a:side ? a:self._context.left_alt_sep : a:self._context.right_alt_sep
endif

View File

@@ -20,7 +20,7 @@ function! airline#extensions#bufferline#init(ext)
endif
if exists("+autochdir") && &autochdir == 1
" if 'acd' is set, vim-airline uses the path section, so we need ot redefine this here as well
" if 'acd' is set, vim-airline uses the path section, so we need to redefine this here as well
call airline#parts#define_raw('path', '%{bufferline#refresh_status()}'.bufferline#get_status_string())
else
call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string())

View File

@@ -23,7 +23,7 @@ function! airline#extensions#example#init(ext)
call airline#parts#define_raw('cats', '%{airline#extensions#example#get_cats()}')
" Next up we add a funcref so that we can run some code prior to the
" statusline getting modifed.
" statusline getting modified.
call a:ext.add_statusline_func('airline#extensions#example#apply')
" You can also add a funcref for inactive statuslines.
@@ -40,7 +40,7 @@ function! airline#extensions#example#apply(...)
" section_c.
let w:airline_section_c = get(w:, 'airline_section_c', g:airline_section_c)
" Then we just append this extenion to it, optionally using separators.
" Then we just append this extension to it, optionally using separators.
let w:airline_section_c .= s:spc.g:airline_left_alt_sep.s:spc.'%{airline#extensions#example#get_cats()}'
endif
endfunction

View File

@@ -32,7 +32,7 @@ function! airline#extensions#rufo#apply(...)
" section_z.
let w:airline_section_z = get(w:, 'airline_section_z', g:airline_section_z)
" Then we just append this extenion to it, optionally using separators.
" Then we just append this extension to it, optionally using separators.
let w:airline_section_z .= '%{airline#extensions#rufo#get_status()}'
endif
endfunction

View File

@@ -71,7 +71,7 @@ endfunction
" Compute the change in size of the tabline caused by separators
"
" This should be kept up-to-date with |s:get_transitioned_seperator| and
" This should be kept up-to-date with |s:get_transitioned_separator| and
" |s:get_separator| in autoload/airline/builder.vim
function! s:get_separator_change_with_end(new_group, old_group, new_end_group, old_end_group, sep_size, alt_sep_size)
let sep_change = 0