diff options
| author | Toby Goodwin <toby@paccrat.org> | 2017-06-23 23:10:35 +0100 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2017-06-23 23:10:35 +0100 |
| commit | dc80ccac672785085df2fe20cd3a2a2198f6decb (patch) | |
| tree | 04dde1600ce575e31a7e589f345c7637e41dd9f7 /edit-readline.c | |
| parent | d2a398257626faf73fd7a5326b31bbc3f613e3da (diff) | |
fix for github #32 readline loses track of term size
Diffstat (limited to 'edit-readline.c')
| -rw-r--r-- | edit-readline.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/edit-readline.c b/edit-readline.c index 6d99d94..acf96aa 100644 --- a/edit-readline.c +++ b/edit-readline.c @@ -18,6 +18,7 @@ void *edit_begin(int fd) { List *hist; struct cookie *c; + rl_initialize(); rl_catch_signals = 0; rl_completer_quote_characters = "'"; rl_filename_quote_characters = "\t\n !#$&'()*;<=>?@[\\]^`{|}~"; @@ -49,6 +50,7 @@ char *edit_alloc(void *cookie, size_t *count) { oldint = sys_signal(SIGINT, edit_catcher); oldquit = sys_signal(SIGQUIT, edit_catcher); + rl_reset_screen_size(); c->buffer = readline(prompt); sys_signal(SIGINT, oldint); |