mirror of
https://github.com/Savapitech/42sh.git
synced 2026-01-18 16:57:28 +01:00
Ctrl+d can now delete the current char
This commit is contained in:
@@ -23,12 +23,14 @@ bool handle_key_ctrl_c(readline_helper_t *rh, exec_ctx_t *ec, buff_t *buff)
|
||||
|
||||
bool handle_key_ctrl_d(readline_helper_t *rh, exec_ctx_t *ec, buff_t *buff)
|
||||
{
|
||||
if (rh->cursor) {
|
||||
if (rh->cursor && rh->cursor == buff->sz) {
|
||||
WRITE_CONST(STDOUT_FILENO, "\n");
|
||||
print_shell_prompt(ec);
|
||||
refresh_line(rh);
|
||||
return false;
|
||||
}
|
||||
if (buff->sz)
|
||||
return handle_delete(rh, ec, buff);
|
||||
if (ec->ignoreof)
|
||||
return false;
|
||||
buff->sz = 0;
|
||||
|
||||
Reference in New Issue
Block a user