From 02802b509d31f5f999a96257fe9423d069e51bb7 Mon Sep 17 00:00:00 2001 From: axel Date: Sat, 2 Dec 2006 02:30:09 +1000 Subject: [PATCH] Make keyboard shortcuts that execute a shellscript function (^D, for example) a lot quicker. This is done by not changing the titlebar message or reexecuting the prompt. A full repaint is still performed though. This patch also changes the behaviour of the 'null' virtual keypress - it no longer reexecutes the prompt, it only causes a repaint. darcs-hash:20061201163009-ac50b-65508b8e5aa3b2c73695feb0a47a718419868f8e.gz --- input.c | 9 +++++---- reader.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/input.c b/input.c index c32cd6fb6..2f3b3dceb 100644 --- a/input.c +++ b/input.c @@ -1610,13 +1610,14 @@ static wint_t input_exec_binding( mapping *m, const wchar_t *seq ) write( 1, "\r", 1 ); tputs(clr_eol,1,&writeb); - reader_run_command( m->command ); - + eval( m->command, 0, TOP ); + /* We still need to return something to the caller, R_NULL - tells the reader that nothing happened, but it might be a - godd idea to redraw and reexecute the prompt. + tells the reader that no key press needs to be handled, but + it might be a good idea to redraw. */ + return R_NULL; } diff --git a/reader.c b/reader.c index 7c4bbd7ee..d29d50109 100644 --- a/reader.c +++ b/reader.c @@ -2134,7 +2134,7 @@ wchar_t *reader_readline() case R_NULL: { - exec_prompt(); +// exec_prompt(); s_reset( &data->screen ); repaint(); break;