From 779db8817e1feb0a8122291eec22a787fd007d3b Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sat, 2 Dec 2017 21:14:14 +0100 Subject: [PATCH] rl_refresh_line(): new (undocumented) readline compat fn Signed-off-by: Joachim Nilsson --- include/editline.h | 1 + src/editline.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/editline.h b/include/editline.h index c726ed1..8fcf919 100644 --- a/include/editline.h +++ b/include/editline.h @@ -96,6 +96,7 @@ extern void rl_deprep_terminal (void); extern int rl_getc(void); extern int rl_insert_text (const char *text); +extern int rl_refresh_line (int ignore1, int ignore2); extern char *readline (const char *prompt); diff --git a/src/editline.c b/src/editline.c index 84bd3d6..e9e018f 100644 --- a/src/editline.c +++ b/src/editline.c @@ -534,6 +534,12 @@ static el_status_t redisplay(void) return CSmove; } +int rl_refresh_line(int ignore1 __attribute__((unused)), int ignore2 __attribute__((unused))) +{ + redisplay(); + return 0; +} + static el_status_t toggle_meta_mode(void) { rl_meta_chars = ! rl_meta_chars;