fix: block ctrl key combinations input in cli
This commit is contained in:
parent
b610bd7861
commit
f3a43c8083
|
@ -206,7 +206,7 @@ const onTermKey = (e) => {
|
||||||
return false
|
return false
|
||||||
|
|
||||||
case 'e': // move to tail of line
|
case 'e': // move to tail of line
|
||||||
moveInputCursorTo(Number.MAX_VALUE)
|
moveInputCursorTo(Number.MAX_SAFE_INTEGER)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
case 'f': // move forward
|
case 'f': // move forward
|
||||||
|
@ -251,6 +251,8 @@ const onTermKey = (e) => {
|
||||||
newInputLine()
|
newInputLine()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
// block all ctrl key combinations input
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
@ -290,7 +292,7 @@ const moveInputCursor = (step) => {
|
||||||
* move cursor to the end of current line
|
* move cursor to the end of current line
|
||||||
*/
|
*/
|
||||||
const moveInputCursorToEnd = () => {
|
const moveInputCursorToEnd = () => {
|
||||||
moveInputCursorTo(Number.MAX_VALUE)
|
moveInputCursorTo(Number.MAX_SAFE_INTEGER)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue