summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-readline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/gui-readline.c')
-rw-r--r--src/fe-text/gui-readline.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c
index d7f8190b..8c1e75db 100644
--- a/src/fe-text/gui-readline.c
+++ b/src/fe-text/gui-readline.c
@@ -778,9 +778,7 @@ static void key_completion(int erase)
char *text, *line;
int pos;
- pos = gui_entry_get_pos(active_entry);
-
- text = gui_entry_get_text(active_entry);
+ text = gui_entry_get_text_and_pos(active_entry, &pos);
line = word_complete(active_win, text, &pos, erase);
g_free(text);
@@ -806,9 +804,7 @@ static void key_check_replaces(void)
char *text, *line;
int pos;
- pos = gui_entry_get_pos(active_entry);
-
- text = gui_entry_get_text(active_entry);
+ text = gui_entry_get_text_and_pos(active_entry, &pos);
line = auto_word_complete(text, &pos);
g_free(text);