From 3692074e7ec8b624f2bd75e50ae3eed1c54aa784 Mon Sep 17 00:00:00 2001 From: liljencrantz Date: Sat, 22 Sep 2007 00:44:26 +1000 Subject: Make R_NULL not repaint and document the fact that this means some keybindings need to manually tell fish to repaint darcs-hash:20070921144426-75c98-7db4351e14733e2c18e44515e8ed78b1f1faea80.gz --- input.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index f7a1d1d3..8b913e01 100644 --- a/input.c +++ b/input.c @@ -1539,7 +1539,7 @@ static wint_t input_exec_binding( mapping *m, const wchar_t *seq ) for( i=0; i 0 && repeat <= 9 ) repeat_count *= repeat; - return R_NULL; + return R_REPAINT; } case R_VI_DELETE_TO: { first_command = R_VI_DELETE_TO; - return R_NULL; + return R_REPAINT; } default: @@ -1610,19 +1610,16 @@ static wint_t input_exec_binding( mapping *m, const wchar_t *seq ) is sent to the parser for evaluation. */ - /* - First clear the commandline. Do not issue a linebreak, since - many shortcut commands do not procuce output. - */ - write( 1, "\r", 1 ); - tputs(clr_eol,1,&writeb); - eval( m->command, 0, TOP ); /* We still need to return something to the caller, R_NULL - tells the reader that no key press needs to be handled, but - it might be a good idea to redraw. + tells the reader that no key press needs to be handled, + and no repaint is needed. + + Bindings that produce output should emit a R_REPAINT + function by calling 'commandline -f repaint' to tell + fish that a repaint is in order. */ return R_NULL; -- cgit v1.2.3