aboutsummaryrefslogtreecommitdiff
path: root/readline.c
diff options
context:
space:
mode:
Diffstat (limited to 'readline.c')
-rw-r--r--readline.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/readline.c b/readline.c
index 523d7d7..d9bf8e3 100644
--- a/readline.c
+++ b/readline.c
@@ -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;
}
-
-