1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:40:06 +08:00

fix(statusline): backward compatibility

This commit is contained in:
wsdjeg 2022-04-14 17:33:50 +08:00
parent b244af6e08
commit 109a5b2490
3 changed files with 15 additions and 11 deletions

View File

@ -570,11 +570,11 @@ let g:spacevim_enable_statusline_bfpath = 0
" Enable/Disable showing current tag on statusline
let g:spacevim_enable_statusline_tag = 1
""
" @section statusline_left_sections, options-statusline_left_sections
" @section statusline_left, options-statusline_left
" @parentsection options
" Define the left section of statusline in active windows. By default:
" >
" statusline_left_sections = [
" statusline_left = [
" 'winnr',
" 'filename',
" 'major mode',
@ -603,11 +603,11 @@ let g:spacevim_statusline_left = ['winnr', 'filename', 'major mode',
\ 'syntax checking', 'minor mode lighters',
\ ]
""
" @section statusline_right_sections, options-statusline_right_sections
" @section statusline_right, options-statusline_right
" @parentsection options
" Define the right section of statusline in active windows. By default:
" >
" statusline_right_sections = [
" statusline_right = [
" 'fileformat',
" 'cursorpos',
" 'percentage'

View File

@ -134,6 +134,11 @@ function! s:apply(config, type) abort
call SpaceVim#logger#warn('defx requires +python3!', 0)
continue
endif
" keep backward compatibility
elseif name ==# 'statusline_right_sections'
let name = 'statusline_right'
elseif name ==# 'statusline_right_sections'
let name = 'statusline_right'
endif
exe 'let g:spacevim_' . name . ' = value'
if name ==# 'project_rooter_patterns'

View File

@ -72,9 +72,8 @@ CONTENTS *SpaceVim-contents*
52. sidebar_width.......................|SpaceVim-options-sidebar_width|
53. snippet_engine.....................|SpaceVim-options-snippet_engine|
54. statusline_iseparator.......|SpaceVim-options-statusline_iseparator|
55. statusline_left_sections.|SpaceVim-options-statusline_left_sections|
56. statusline_right_sections
..................................|SpaceVim-options-statusline_right_sections|
55. statusline_left...................|SpaceVim-options-statusline_left|
56. statusline_right.................|SpaceVim-options-statusline_right|
57. statusline_separator.........|SpaceVim-options-statusline_separator|
58. statusline_unicode.............|SpaceVim-options-statusline_unicode|
59. terminal_cursor_shape.......|SpaceVim-options-terminal_cursor_shape|
@ -762,11 +761,11 @@ See more details in: http://spacevim.org/documentation/#statusline
==============================================================================
STATUSLINE_LEFT_SECTIONS *SpaceVim-options-statusline_left_sections*
STATUSLINE_LEFT *SpaceVim-options-statusline_left*
Define the left section of statusline in active windows. By default:
>
statusline_left_sections = [
statusline_left = [
'winnr',
'filename',
'major mode',
@ -777,11 +776,11 @@ Define the left section of statusline in active windows. By default:
`statusline_left_sections` is deprecated, use `statusline_left` instead.
==============================================================================
STATUSLINE_RIGHT_SECTIONS *SpaceVim-options-statusline_right_sections*
STATUSLINE_RIGHT *SpaceVim-options-statusline_right*
Define the right section of statusline in active windows. By default:
>
statusline_right_sections = [
statusline_right = [
'fileformat',
'cursorpos',
'percentage'