diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-15 22:36:12 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-15 22:36:12 +0000 |
commit | e54a8191041893705261e60354bce6eaa5d12340 (patch) | |
tree | 4831382a8333e4368e2cc5c023fcff77063c0a2d /src/fe-text/textbuffer.c | |
parent | fee2ad09c9f46d46fdc2fdd89c4febc50c5dbad4 (diff) | |
download | irssi-e54a8191041893705261e60354bce6eaa5d12340.zip |
textbuffer_insert() didn't work properly when trying to add empty string.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2026 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/textbuffer.c')
-rw-r--r-- | src/fe-text/textbuffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fe-text/textbuffer.c b/src/fe-text/textbuffer.c index b08e6fec..29527622 100644 --- a/src/fe-text/textbuffer.c +++ b/src/fe-text/textbuffer.c @@ -277,6 +277,9 @@ LINE_REC *textbuffer_insert(TEXT_BUFFER_REC *buffer, LINE_REC *insert_after, g_return_val_if_fail(buffer != NULL, NULL); g_return_val_if_fail(data != NULL, NULL); + if (len == 0) + return insert_after; + line = !buffer->last_eol ? insert_after : textbuffer_line_insert(buffer, insert_after); |