1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #878 from irssi/revert-873-empty_lines

Revert "record line info on empty lines"
This commit is contained in:
ailin-nemui 2018-05-08 07:17:10 +02:00 committed by GitHub
commit daf6ce86cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 9 deletions

View File

@ -1233,15 +1233,6 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text)
dup = str = g_strdup(text);
flags = 0; fgcolor = theme->default_color; bgcolor = -1;
if (*str == '\0') {
/* empty line, write line info only */
signal_emit_id(signal_gui_print_text, 6, dest->window,
GINT_TO_POINTER(fgcolor),
GINT_TO_POINTER(bgcolor),
GINT_TO_POINTER(flags), str,
dest);
}
while (*str != '\0') {
type = '\0';
for (ptr = str; *ptr != '\0'; ptr++) {

View File

@ -355,6 +355,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);