mirror of
https://github.com/Savapitech/42sh.git
synced 2026-03-18 21:50:35 +01:00
Add ctrl+k
This commit is contained in:
@@ -35,7 +35,9 @@ bool handle_key_ctrl_f(readline_helper_t *rh, exec_ctx_t *ec, buff_t *buff)
|
||||
|
||||
bool handle_key_ctrl_k(readline_helper_t *rh, exec_ctx_t *, buff_t *buff)
|
||||
{
|
||||
if (!buff->sz && !rh->cursor)
|
||||
return false;
|
||||
buff->sz = rh->cursor;
|
||||
refresh_line(rh);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ const key_handler_t KEY_HANDLERS[] = {
|
||||
{"\027", handle_key_ctrl_w}, // ^W
|
||||
{"\031", handle_key_ctrl_y}, // ^Y
|
||||
{"\022", handle_key_ctrl_r}, // ^R
|
||||
{"\013", handle_key_ctrl_k}, // ^K
|
||||
{ESC "[A", handle_key_arrow_up},
|
||||
{ESC "[B", handle_key_arrow_down},
|
||||
{ESC "[C", handle_key_arrow_right},
|
||||
|
||||
Reference in New Issue
Block a user