1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00

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
This commit is contained in:
Timo Sirainen 2001-07-03 22:21:40 +00:00 committed by cras
parent 38d855d4a9
commit 3eca462859

View File

@ -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) {