summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-07-03 22:21:40 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-07-03 22:21:40 +0000
commit3eca46285932a5412e1191e8c0d29609f2a72c74 (patch)
tree82841dd5a00ad6aee4345a59c2c5ec62aaa1da24 /src/fe-common
parent38d855d4a9fae74065cd462a62f7aa8bbc6ef3da (diff)
downloadirssi-3eca46285932a5412e1191e8c0d29609f2a72c74.zip
Removed GLIB warning at certain condition with tab completion.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1606 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/completion.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c
index 16427610..b9a2b3b0 100644
--- a/src/fe-common/core/completion.c
+++ b/src/fe-common/core/completion.c
@@ -188,7 +188,8 @@ 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);
- g_string_erase(result, startpos, wordlen);
+ if (wordlen > 0)
+ g_string_erase(result, startpos, wordlen);
g_string_insert(result, startpos, complist->data);
if (want_space) {