Skip to content

Commit

Permalink
Merge pull request #198 from lambdalisue/improve-cd-actions
Browse files Browse the repository at this point in the history
Select window prior to 'lcd' action
  • Loading branch information
lambdalisue authored Sep 9, 2020
2 parents 203827d + e6a1021 commit af629f5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions autoload/fern/scheme/file/mapping/cd.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,20 @@ function! s:call(name, ...) abort
endfunction

function! s:map_cd_root(helper, command) abort
if a:command ==# 'lcd'
if fern#internal#window#select()
return s:Promise.resolve()
endif
endif
return s:cd(a:helper.sync.get_root_node(), a:helper, a:command)
endfunction

function! s:map_cd_cursor(helper, command) abort
if a:command ==# 'lcd'
if fern#internal#window#select()
return s:Promise.resolve()
endif
endif
return s:cd(a:helper.sync.get_cursor_node(), a:helper, a:command)
endfunction

Expand Down

0 comments on commit af629f5

Please sign in to comment.