mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 11:50:10 +02:00
properly record line info on empty lines
This commit is contained in:
parent
19d84bc16e
commit
a19b503a31
3 changed files with 18 additions and 7 deletions
|
|
@ -333,8 +333,9 @@ void textbuffer_line_add_colors(TEXT_BUFFER_REC *buffer, LINE_REC **line,
|
|||
data[pos++] = LINE_CMD_INDENT;
|
||||
}
|
||||
|
||||
if (pos > 0)
|
||||
if (pos > 0) {
|
||||
*line = textbuffer_insert(buffer, *line, data, pos, NULL);
|
||||
}
|
||||
|
||||
buffer->last_flags = flags;
|
||||
}
|
||||
|
|
@ -355,9 +356,6 @@ 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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue