mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-15 08:09:11 +08:00
Fix statusline
This commit is contained in:
parent
e2e3ae789d
commit
358ab08da6
@ -347,6 +347,7 @@ function! s:wait_for_input() " {{{
|
|||||||
let s:prefix_key_inp = ''
|
let s:prefix_key_inp = ''
|
||||||
call s:winclose()
|
call s:winclose()
|
||||||
elseif match(inp, "^<LGCMD>paging_help") == 0
|
elseif match(inp, "^<LGCMD>paging_help") == 0
|
||||||
|
let s:guide_help_mode = 1
|
||||||
call s:submode_mappings()
|
call s:submode_mappings()
|
||||||
else
|
else
|
||||||
if inp == ' '
|
if inp == ' '
|
||||||
@ -410,8 +411,12 @@ function! s:updateStatusline() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:guide_help_msg() abort
|
function! s:guide_help_msg() abort
|
||||||
let msg = '[C-h\ paging/help]'
|
if s:guide_help_mode == 1
|
||||||
return msg
|
let msg = 'n -> next-page, p -> previous-page, u -> undo-key, h -> help, a -> abort'
|
||||||
|
else
|
||||||
|
let msg = '[C-h paging/help]'
|
||||||
|
endif
|
||||||
|
return substitute(msg,' ', '\\ ', 'g')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:winclose() " {{{
|
function! s:winclose() " {{{
|
||||||
@ -456,6 +461,7 @@ function! s:handle_submode_mapping(cmd) " {{{
|
|||||||
endif
|
endif
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
function! s:submode_mappings() " {{{
|
function! s:submode_mappings() " {{{
|
||||||
|
call s:updateStatusline()
|
||||||
let submodestring = ""
|
let submodestring = ""
|
||||||
let maplist = []
|
let maplist = []
|
||||||
for key in items(g:leaderGuide_submode_mappings)
|
for key in items(g:leaderGuide_submode_mappings)
|
||||||
@ -466,7 +472,7 @@ function! s:submode_mappings() " {{{
|
|||||||
execute 'cnoremap <nowait> <silent> <buffer> '.key[0].' <LGCMD>'.key[1].'<CR>'
|
execute 'cnoremap <nowait> <silent> <buffer> '.key[0].' <LGCMD>'.key[1].'<CR>'
|
||||||
let submodestring = submodestring.' '.key[0].': '.key[1].','
|
let submodestring = submodestring.' '.key[0].': '.key[1].','
|
||||||
endfor
|
endfor
|
||||||
let inp = input(strpart(submodestring, 0, strlen(submodestring)-1))
|
let inp = input('')
|
||||||
for map in maplist
|
for map in maplist
|
||||||
call s:mapmaparg(map)
|
call s:mapmaparg(map)
|
||||||
endfor
|
endfor
|
||||||
@ -493,6 +499,7 @@ function! s:get_register() "{{{
|
|||||||
return clip
|
return clip
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
function! SpaceVim#mapping#guide#start_by_prefix(vis, key) " {{{
|
function! SpaceVim#mapping#guide#start_by_prefix(vis, key) " {{{
|
||||||
|
let s:guide_help_mode = 0
|
||||||
let s:vis = a:vis ? 'gv' : ''
|
let s:vis = a:vis ? 'gv' : ''
|
||||||
let s:count = v:count != 0 ? v:count : ''
|
let s:count = v:count != 0 ? v:count : ''
|
||||||
let s:toplevel = a:key ==? ' '
|
let s:toplevel = a:key ==? ' '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user