diff options
author | ache <ache@ache.one> | 2019-01-21 05:43:25 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2019-01-21 05:43:25 +0100 |
commit | 64bc1ee1851a7846590107a3ea86893a137f1be8 (patch) | |
tree | b608fc843bdb3a1251706abe05632d1de46b3f6d /readline.c | |
parent | What was that ? (diff) |
Edit instead of remplace
Diffstat (limited to 'readline.c')
-rw-r--r-- | readline.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -172,9 +172,14 @@ void init_readline(void) } -void readline_n(void) { +void readline_n(const char* str) { curs_set(2); resize(); + for( ; *str ; str++ ) { + if( *str != '\n' && *str != '\f' && *str != KEY_RESIZE ) { + forward_to_readline(*str); + } + } while (!should_exit) { // Using getch() here instead would refresh stdscr, overwriting the // initial contents of the other windows on startup @@ -197,5 +202,3 @@ void readline_n(void) { should_exit = 0; } - - |