mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 02:00:05 +08:00
Fix shell key binding (#3293)
This commit is contained in:
parent
0a94f76cd5
commit
5927bab905
@ -96,9 +96,10 @@ func! SpaceVim#layers#shell#ctrl_r() abort
|
|||||||
return "\<C-r>"
|
return "\<C-r>"
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
func! SpaceVim#layers#shell#ctrl_w() abort
|
func! SpaceVim#layers#shell#ctrl_w() abort
|
||||||
let cursorpos = term_getcursor(s:term_buf_nr)
|
let cursorpos = getcurpos()
|
||||||
let line = getline(cursorpos[0])[:cursorpos[1]-1]
|
let line = getline(cursorpos[1])[:cursorpos[2]-1]
|
||||||
let str = matchstr(line, '[^ ]*\s*$')
|
let str = matchstr(line, '[^ ]*\s*$')
|
||||||
return repeat("\<BS>", len(str))
|
return repeat("\<BS>", len(str))
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user