summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/completion.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c
index b9a2b3b0..16427610 100644
--- a/src/fe-common/core/completion.c
+++ b/src/fe-common/core/completion.c
@@ -188,8 +188,7 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos)
/* replace the word in line - we need to return
a full new line */
result = g_string_new(line);
- if (wordlen > 0)
- g_string_erase(result, startpos, wordlen);
+ g_string_erase(result, startpos, wordlen);
g_string_insert(result, startpos, complist->data);
if (want_space) {