mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 16:42:30 +02:00
make lines reformattable
- completely removed the old textbuffer representation ( https://github.com/shabble/irssi-docs/wiki/Notes-256-Colour#textbuffer-encoding ) - textbuffer-formats is an extra module, so if we unhook the signals it should go back to the "old way" of storing pre-rendered tex - design uses cache, original formats and list of arguments
This commit is contained in:
parent
94ae7f9cd3
commit
f95fc81130
21 changed files with 789 additions and 587 deletions
|
|
@ -19,8 +19,9 @@
|
|||
*/
|
||||
|
||||
#include "module.h"
|
||||
#include <irssi/src/core/signals.h>
|
||||
#include <irssi/src/core/levels.h>
|
||||
#include <irssi/src/core/settings.h>
|
||||
#include <irssi/src/core/signals.h>
|
||||
|
||||
#include <irssi/src/fe-common/core/formats.h>
|
||||
#include <irssi/src/fe-common/core/printtext.h>
|
||||
|
|
@ -329,7 +330,7 @@ static void sig_gui_print_text(WINDOW_REC *window, void *fgcolor,
|
|||
GUI_WINDOW_REC *gui;
|
||||
TEXT_BUFFER_VIEW_REC *view;
|
||||
LINE_REC *insert_after;
|
||||
LINE_INFO_REC lineinfo;
|
||||
LINE_INFO_REC lineinfo = { 0 };
|
||||
int fg, bg, flags, attr;
|
||||
|
||||
flags = GPOINTER_TO_INT(pflags);
|
||||
|
|
@ -342,10 +343,16 @@ static void sig_gui_print_text(WINDOW_REC *window, void *fgcolor,
|
|||
return;
|
||||
}
|
||||
|
||||
if (dest != NULL && dest->flags & PRINT_FLAG_FORMAT) {
|
||||
return;
|
||||
}
|
||||
|
||||
lineinfo.level = dest == NULL ? 0 : dest->level;
|
||||
gui = WINDOW_GUI(window);
|
||||
lineinfo.time = (gui->use_insert_after && gui->insert_after_time) ?
|
||||
gui->insert_after_time : time(NULL);
|
||||
lineinfo.format =
|
||||
dest != NULL && dest->flags & PRINT_FLAG_FORMAT ? LINE_INFO_FORMAT_SET : NULL;
|
||||
|
||||
view = gui->view;
|
||||
insert_after = gui->use_insert_after ?
|
||||
|
|
@ -378,7 +385,8 @@ static void sig_gui_printtext_finished(WINDOW_REC *window)
|
|||
insert_after = WINDOW_GUI(window)->use_insert_after ?
|
||||
WINDOW_GUI(window)->insert_after : view->buffer->cur_line;
|
||||
|
||||
view_add_eol(view, &insert_after);
|
||||
if (insert_after != NULL)
|
||||
view_add_eol(view, &insert_after);
|
||||
remove_old_lines(view);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue