diff options
author | liljencrantz <liljencrantz@gmail.com> | 2007-10-01 08:53:54 +1000 |
---|---|---|
committer | liljencrantz <liljencrantz@gmail.com> | 2007-10-01 08:53:54 +1000 |
commit | 4b85eb32d7fa2131e2fc0a1f18a1c3f59b7161ba (patch) | |
tree | 5e6282064b5975a195acd0cf7053b0733713fd6b /screen.c | |
parent | 5870ee77233783d3ed202b9154edf55b5c0581c5 (diff) |
Remove readline legacy input function 'winch' and replace its functionality with an event handler function. Once again make the null keybinding do nothing. There are various sitauations where you want to perform a repaint at just the right time, and more or less by luck it worked very well to do this on null, but this really shouldn't happen and no longer does. Hopefully if new repainting issues turn up, they can be fixed at the root instead of once again reapplying this broken bandaid.
darcs-hash:20070930225354-75c98-8e2b518aa0ef694cee889c1c599ff4f158d9eb7f.gz
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -658,7 +658,7 @@ static void s_update( screen_t *scr, wchar_t *prompt ) need_clear = 1; s_move( scr, &output, 0, 0 ); scr->actual_width = screen_width; - s_reset( scr, 1 ); + s_reset( scr, 0 ); } if( wcscmp( prompt, (wchar_t *)scr->actual_prompt.buff ) ) @@ -918,6 +918,8 @@ void s_write( screen_t *s, void s_reset( screen_t *s, int reset_cursor ) { CHECK( s, ); + + int prev_line = s->actual_cursor[1]; s_reset_arr( &s->actual ); s->actual_cursor[0] = s->actual_cursor[1] = 0; sb_clear( &s->actual_prompt ); @@ -931,6 +933,8 @@ void s_reset( screen_t *s, int reset_cursor ) */ fstat( 1, &s->prev_buff_1 ); fstat( 2, &s->prev_buff_2 ); + write( 1, "\r", 1 ); + s->actual_cursor[1] = prev_line; } } |