mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-02 07:15:31 -04:00
term: update_ascii_printer(): log when we (actually) switch printer
This commit is contained in:
parent
60b3ccc641
commit
b601307fae
1 changed files with 11 additions and 1 deletions
12
terminal.c
12
terminal.c
|
|
@ -2911,12 +2911,22 @@ ascii_printer_fast(struct terminal *term, wchar_t wc)
|
||||||
void
|
void
|
||||||
term_update_ascii_printer(struct terminal *term)
|
term_update_ascii_printer(struct terminal *term)
|
||||||
{
|
{
|
||||||
term->ascii_printer =
|
void (*new_printer)(struct terminal *term, wchar_t wc) =
|
||||||
unlikely(tll_length(term->grid->sixel_images) > 0 ||
|
unlikely(tll_length(term->grid->sixel_images) > 0 ||
|
||||||
term->charsets.set[term->charsets.selected] == CHARSET_GRAPHIC ||
|
term->charsets.set[term->charsets.selected] == CHARSET_GRAPHIC ||
|
||||||
term->insert_mode)
|
term->insert_mode)
|
||||||
? &ascii_printer_generic
|
? &ascii_printer_generic
|
||||||
: &ascii_printer_fast;
|
: &ascii_printer_fast;
|
||||||
|
|
||||||
|
#if defined(_DEBUG) && LOG_ENABLE_DBG
|
||||||
|
if (term->ascii_printer != new_printer) {
|
||||||
|
LOG_DBG("switching ASCII printer %s -> %s",
|
||||||
|
term->ascii_printer == &ascii_printer_fast ? "fast" : "generic",
|
||||||
|
new_printer == &ascii_printer_fast ? "fast" : "generic");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
term->ascii_printer = new_printer;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum term_surface
|
enum term_surface
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue