mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 04:30:48 +00:00
Add additional readline-like keybindings. (#524)
Adds the following conventional readline-like keybindings: - `Ctrl+H`: Delete the previous character. - `Ctrl+D`: Delete the next character. Additionally, remaps the Debug Console command from Ctrl+D to Ctrl+O, which had been first introduced in PR #486.
This commit is contained in:
parent
30080b9f4e
commit
7a3a9066f9
4 changed files with 5 additions and 5 deletions
|
|
@ -1186,10 +1186,11 @@ export function useTextBuffer({
|
|||
else if (
|
||||
key['backspace'] ||
|
||||
input === '\x7f' ||
|
||||
(key['ctrl'] && input === 'h') ||
|
||||
(key['delete'] && !key['shift'])
|
||||
)
|
||||
backspace();
|
||||
else if (key['delete']) del();
|
||||
else if (key['delete'] || (key['ctrl'] && input === 'd')) del();
|
||||
else if (input && !key['ctrl'] && !key['meta']) {
|
||||
// Heuristic for paste: if input is longer than 1 char (potential paste)
|
||||
// strip ANSI escape codes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue