diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-07-24 04:35:37 +0530 |
---|---|---|
committer | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-07-24 04:35:37 +0530 |
commit | 32d2d0f0d028e3f64edc1694d23a8283861a7e6d (patch) | |
tree | 5717e31256653dee0d80c467428f29ffc21d44e6 /screen.cpp | |
parent | 81e0342bf6b29fb0cebc726c6741deb82c3f1c23 (diff) |
Minor refactoring and fixed a bug in history function
Diffstat (limited to 'screen.cpp')
-rw-r--r-- | screen.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -875,6 +875,10 @@ void s_write( screen_t *s, truncated_autosuggestion_line.push_back(ellipsis_char); commandline = truncated_autosuggestion_line.c_str(); } + for( i=0; i<prompt_width; i++ ) + { + s_desired_append_char( s, L' ', 0, 0, prompt_width ); + } /* If overflowing, give the prompt its own line to improve the @@ -882,23 +886,9 @@ void s_write( screen_t *s, */ if( max_line_width + prompt_width >= screen_width ) { - for( i=0; i<prompt_width; i++ ) - { - s_desired_append_char( s, L' ', 0, 0, prompt_width ); - } - s_desired_append_char( s, L'\n', 0, 0, 0 ); prompt_width=0; } - else - { - for( i=0; i<prompt_width; i++ ) - { - s_desired_append_char( s, L' ', 0, 0, prompt_width ); - } - } - - for( i=0; commandline[i]; i++ ) { |