From 0a0b74f09b5f2a430c5afcff5aad8322ff8da4ef Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Thu, 27 Oct 2022 00:19:08 +0800 Subject: [PATCH] fix(transient): fix transient_state quit key --- autoload/SpaceVim/api/transient_state.vim | 8 ++++++-- autoload/SpaceVim/layers/VersionControl.vim | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/autoload/SpaceVim/api/transient_state.vim b/autoload/SpaceVim/api/transient_state.vim index 5ae6be33f..efcebeefd 100644 --- a/autoload/SpaceVim/api/transient_state.vim +++ b/autoload/SpaceVim/api/transient_state.vim @@ -229,7 +229,9 @@ function! s:self._key_obj_to_hl_line(left, right, line) abort call extend(self._handle_inputs, {handles[0] : handles[1]}) endfor if a:left.exit - call extend(self._is_quit, keys(a:left.key)) + for handles in a:left.key.handles + call add(self._is_quit, handles[0]) + endfor " TODO: need to fixed " if has_key(left, 'exit_cmd') && !empty(left.exit_cmd) " call extend(self._handle_quit, {left.key : left.exit_cmd}) @@ -288,7 +290,9 @@ function! s:self._key_obj_to_hl_line(left, right, line) abort call extend(self._handle_inputs, {handles[0] : handles[1]}) endfor if a:right.exit - call extend(self._is_quit, keys(a:right.key)) + for handles in a:right.key.handles + call add(self._is_quit, handles[0]) + endfor " TODO: need fix " if has_key(right, 'exit_cmd') && !empty(right.exit_cmd) " call extend(self._handle_quit, {right.key : right.exit_cmd}) diff --git a/autoload/SpaceVim/layers/VersionControl.vim b/autoload/SpaceVim/layers/VersionControl.vim index 262643dfb..bfe6fce8a 100644 --- a/autoload/SpaceVim/layers/VersionControl.vim +++ b/autoload/SpaceVim/layers/VersionControl.vim @@ -379,11 +379,10 @@ function! s:show_diff_of_unstaged_hunks() abort endfunction function! s:fetch_repo() abort - endfunction function! s:pull_repo() abort - + Git pull endfunction function! s:push_repo() abort