From 0468c5d912fc8a89bd552611ef6243bd1c889df7 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 13 Sep 2017 13:58:00 +0200 Subject: add new function to set the position in bytes fixes #752 --- src/fe-text/gui-readline.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/fe-text/gui-readline.c') diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 2c2eac21..3688f15e 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -878,8 +878,7 @@ static void key_completion(int erase, int backward) g_free(text); if (line != NULL) { - gui_entry_set_text(active_entry, line); - gui_entry_set_pos(active_entry, pos); + gui_entry_set_text_and_pos_bytes(active_entry, line, pos); g_free(line); } } @@ -909,8 +908,7 @@ static void key_check_replaces(void) g_free(text); if (line != NULL) { - gui_entry_set_text(active_entry, line); - gui_entry_set_pos(active_entry, pos); + gui_entry_set_text_and_pos_bytes(active_entry, line, pos); g_free(line); } } -- cgit v1.2.3