From ea39496f3083bac43f7da4adc0ae7e96d5329cf9 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 1 Jul 2021 20:19:28 +0200 Subject: changelog: add new ‘unreleased’ section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index dfa083ea..7fb6f75f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +* [Unreleased](#unreleased) * [1.8.1](#1-8-1) * [1.8.0](#1-8-0) * [1.7.2](#1-7-2) @@ -27,6 +28,16 @@ * [1.2.0](#1-2-0) +## Unreleased +### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security +### Contributors + + ## 1.8.1 ### Added -- cgit v1.3 From 4e8db9d8b6d890ece807a8597fd94ee1da25d2d3 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 1 Jul 2021 20:44:53 +0200 Subject: changelog: s/from/in --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fb6f75f..f3908ca8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,7 +54,7 @@ * Grapheme cluster width is now limited to two cells by default. This may cause cursor synchronization issues with many applications. You can set `[tweak].grapheme-width-method=wcswidth` to revert to the - behavior from foot-1.8.0. + behavior in foot-1.8.0. ### Fixed -- cgit v1.3 From 396a5ff79b6d59e1f187ba8d0a99d3aa58870fcd Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 2 Jul 2021 16:29:08 +0200 Subject: allow-overflowing-double-width-glyphs: take glyph offset into account A narrow, but offset:ed glyph should still be considered double width. This patch also fixes a crash, when the maybe-double width glyph is in the last column. This is a regression. --- CHANGELOG.md | 7 +++++++ render.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index f3908ca8..a7dd2a15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,13 @@ ### Deprecated ### Removed ### Fixed + +* Glyph offset not being taken into account when applying + `tweak.allow-overflowing-double-width-glyphs`. +* Regression: crash when a single-char, double-width glyph is in the + last column, and `tweak.allow-overflowing-double-width-glyphs=yes`. + + ### Security ### Contributors diff --git a/render.c b/render.c index 499303f0..dbca64aa 100644 --- a/render.c +++ b/render.c @@ -618,13 +618,13 @@ render_cell(struct terminal *term, pixman_image_t *pix, if (term->conf->tweak.allow_overflowing_double_width_glyphs && ((glyph_count > 0 && cell_cols == 1 && - glyphs[0]->width >= term->cell_width * 15 / 10 && - glyphs[0]->width < 3 * term->cell_width && - col < term->cols - 1) || + glyphs[0]->x + glyphs[0]->width >= term->cell_width * 15 / 10 && + glyphs[0]->x + glyphs[0]->width < 3 * term->cell_width) || (term->conf->tweak.pua_double_width && ((base >= 0x00e000 && base <= 0x00f8ff) || (base >= 0x0f0000 && base <= 0x0ffffd) || (base >= 0x100000 && base <= 0x10fffd)))) && + col < term->cols - 1 && (row->cells[col + 1].wc == 0 || row->cells[col + 1].wc == L' ')) { cell_cols = 2; -- cgit v1.3 From 07652d3b9e58dd99f5fedd6776092ed815ccb7fa Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 2 Jul 2021 16:31:46 +0200 Subject: term: rows printed to now defaults to having a hard linebreak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That is, instead of requiring a ‘\n’ to be printed, non-empty lines are now treated as having a hard linebreak by default. The linebreak is cleared on an explicit wrap. --- CHANGELOG.md | 5 +++++ terminal.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index a7dd2a15..dc969826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,11 @@ ## Unreleased ### Added ### Changed + +* Non-empty lines are now considered to have a hard linebreak, + _unless_ an actual word-wrap is inserted. + + ### Deprecated ### Removed ### Fixed diff --git a/terminal.c b/terminal.c index 6c175147..bede6811 100644 --- a/terminal.c +++ b/terminal.c @@ -2756,6 +2756,7 @@ print_linewrap(struct terminal *term) return; } + term->grid->cur_row->linebreak = false; term->grid->cursor.lcf = false; const int row = term->grid->cursor.point.row; @@ -2848,7 +2849,7 @@ term_print(struct terminal *term, wchar_t wc, int width) cell->attrs = term->vt.attrs; row->dirty = true; - row->linebreak = false; + row->linebreak = true; /* Advance cursor the 'additional' columns while dirty:ing the cells */ for (int i = 1; i < width && term->grid->cursor.point.col < term->cols - 1; i++) { @@ -2887,7 +2888,7 @@ ascii_printer_fast(struct terminal *term, wchar_t wc) cell->attrs = term->vt.attrs; row->dirty = true; - row->linebreak = false; + row->linebreak = true; /* Advance cursor */ if (unlikely(++term->grid->cursor.point.col >= term->cols)) { -- cgit v1.3 From fcb60abc132b12ccf8fb8ff215acc924a44773d6 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 4 Jul 2021 17:59:40 +0200 Subject: config: add locked-title=no|yes Closes #386 --- CHANGELOG.md | 5 +++++ config.c | 3 +++ config.h | 1 + doc/foot.ini.5.scd | 4 ++++ foot.ini | 4 ++++ terminal.c | 4 ++++ terminal.h | 1 + 7 files changed, 22 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index dc969826..db325da7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,11 @@ ## Unreleased ### Added + +* `locked-title=no|yes` to `foot.ini` + (https://codeberg.org/dnkl/foot/issues/386). + + ### Changed * Non-empty lines are now considered to have a hard linebreak, diff --git a/config.c b/config.c index e02ca3de..92582f2c 100644 --- a/config.c +++ b/config.c @@ -643,6 +643,9 @@ parse_section_main(const char *key, const char *value, struct config *conf, conf->title = xstrdup(value); } + else if (strcmp(key, "locked-title") == 0) + conf->locked_title = str_to_bool(value); + else if (strcmp(key, "app-id") == 0) { free(conf->app_id); conf->app_id = xstrdup(value); diff --git a/config.h b/config.h index 2300a0ad..190ea427 100644 --- a/config.h +++ b/config.h @@ -77,6 +77,7 @@ struct config { wchar_t *word_delimiters; bool login_shell; bool no_wait; + bool locked_title; struct { enum conf_size_type type; diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 3ca08e84..6ceaf3b9 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -224,6 +224,10 @@ in this order: *title* Initial window title. Default: _foot_. +*locked-title* + Boolean. If enabled, applications are not allowed to change the + title at run-time. Default: _no_. + *app-id* Value to set the *app-id* property on the Wayland window to. The compositor can use this value to e.g. group multiple windows, or diff --git a/foot.ini b/foot.ini index 8a200d4b..31167cd5 100644 --- a/foot.ini +++ b/foot.ini @@ -4,6 +4,10 @@ # term=foot (or xterm-256color if built with -Dterminfo=disabled) # login-shell=no +# app-id=foot +# title=foot +# locked-title=no + # font=monospace:size=8 # font-bold= # font-italic= diff --git a/terminal.c b/terminal.c index bede6811..488ac316 100644 --- a/terminal.c +++ b/terminal.c @@ -2634,9 +2634,13 @@ term_xcursor_update(struct terminal *term) void term_set_window_title(struct terminal *term, const char *title) { + if (term->conf->locked_title && term->window_title_has_been_set) + return; + free(term->window_title); term->window_title = xstrdup(title); render_refresh_title(term); + term->window_title_has_been_set = true; } void diff --git a/terminal.h b/terminal.h index 385b36e0..94c1cf75 100644 --- a/terminal.h +++ b/terminal.h @@ -382,6 +382,7 @@ struct terminal { bool sixel_cursor_right_of_graphics:1; } xtsave; + bool window_title_has_been_set; char *window_title; tll(char *) window_title_stack; -- cgit v1.3 From 0a6e7e6167e04e1ee38cfaba4d38c2776cf474b4 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 11 Jul 2021 09:54:04 +0200 Subject: url-mode: purge SHM pixmaps when destroying URLs Unlike other surface types, the SHM cookie depends on the address of each URL instance. This means if we enable, disable, and then enable URL mode again (thus showing exactly the same URLs as the first time), the URLs will have new addresses, and thus the old SHM pixmaps will not get purged automatically. So, manually purge them when destroying the URLs. --- CHANGELOG.md | 2 ++ url-mode.c | 3 +++ wayland.c | 5 +++++ 3 files changed, 10 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index db325da7..44093dc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,8 @@ `tweak.allow-overflowing-double-width-glyphs`. * Regression: crash when a single-char, double-width glyph is in the last column, and `tweak.allow-overflowing-double-width-glyphs=yes`. +* FD exhaustion when repeatedly entering/exiting URL mode with many + URLs. ### Security diff --git a/url-mode.c b/url-mode.c index 5f56a2f6..8ac5631e 100644 --- a/url-mode.c +++ b/url-mode.c @@ -14,6 +14,7 @@ #include "grid.h" #include "render.h" #include "selection.h" +#include "shm.h" #include "spawn.h" #include "terminal.h" #include "uri.h" @@ -728,7 +729,9 @@ urls_reset(struct terminal *term) if (term->window != NULL) { tll_foreach(term->window->urls, it) { + const struct url *url = it->item.url; wayl_win_subsurface_destroy(&it->item.surf); + shm_purge(term->wl->shm, shm_cookie_url(url)); tll_remove(term->window->urls, it); } } diff --git a/wayland.c b/wayland.c index 80fef88a..ecc4f31e 100644 --- a/wayland.c +++ b/wayland.c @@ -26,6 +26,7 @@ #include "input.h" #include "render.h" #include "selection.h" +#include "shm.h" #include "util.h" #include "xmalloc.h" @@ -1410,6 +1411,9 @@ wayl_win_destroy(struct wl_window *win) if (win == NULL) return; + struct terminal *term = win->term; + struct wl_shm *shm = term->wl->shm; + if (win->csd.move_timeout_fd != -1) close(win->csd.move_timeout_fd); @@ -1457,6 +1461,7 @@ wayl_win_destroy(struct wl_window *win) tll_foreach(win->urls, it) { wayl_win_subsurface_destroy(&it->item.surf); + shm_purge(shm, shm_cookie_url(it->item.url)); tll_remove(win->urls, it); } -- cgit v1.3 From cf6d04f9f2fcb7a4f12d35edd0a6d4cd5591b59c Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 11 Jul 2021 10:06:12 +0200 Subject: url-mode: fix crash when removing duplicate and/or overlapping URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing overlaping and duplicated URLs is done by running two nested loops, that both iterate the same URL list. When a duplicate is found, one of the URLs is destroyed and removed from the list. Deleting and removing an item *is* safe, but only as long as _no other_ iterator has references to it. In this case, if we remove an item from e.g. the inner iterator, we’ll crash if the outer iterator’s *next* item is the item being removed. Closes #627 --- CHANGELOG.md | 2 ++ terminal.h | 1 + url-mode.c | 18 +++++++++++------- 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 44093dc5..acea5f9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,8 @@ last column, and `tweak.allow-overflowing-double-width-glyphs=yes`. * FD exhaustion when repeatedly entering/exiting URL mode with many URLs. +* Double free of URL while removing duplicated and/or overlapping URLs + in URL mode (https://codeberg.org/dnkl/foot/issues/627). ### Security diff --git a/terminal.h b/terminal.h index 94c1cf75..309f7db6 100644 --- a/terminal.h +++ b/terminal.h @@ -264,6 +264,7 @@ struct url { enum url_action action; bool url_mode_dont_change_url_attr; /* Entering/exiting URL mode doesn’t touch the cells’ attr.url */ bool osc8; + bool duplicate; }; typedef tll(struct url) url_list_t; diff --git a/url-mode.c b/url-mode.c index 8ac5631e..94c05b3a 100644 --- a/url-mode.c +++ b/url-mode.c @@ -470,16 +470,20 @@ remove_overlapping(url_list_t *urls, int cols) */ xassert(in->osc8 || out->osc8); - if (in->osc8) { - url_destroy(&outer->item); - tll_remove(*urls, outer); - } else { - url_destroy(&inner->item); - tll_remove(*urls, inner); - } + if (in->osc8) + outer->item.duplicate = true; + else + inner->item.duplicate = true; } } } + + tll_foreach(*urls, it) { + if (it->item.duplicate) { + url_destroy(&it->item); + tll_remove(*urls, it); + } + } } void -- cgit v1.3 From f030c87ee6b7f94e3704ae5c94667b7d46f30776 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 11 Jul 2021 11:31:11 +0200 Subject: url-mode: abort when running into un-allocated scrollback memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When tagging URL cells (in preparation for rendering URL mode), we loop the URL’s entire range, setting the `url` attribute of all cells, and dirtying the rows. It is possible to create URLs that are invalid, and wrap around the scrollback, even though the scrollback hasn’t yet been filled. For example, by starting an OSC-8 URL, moving the cursor, and then closing the OSC-8 URL. These URLs are invalid, but are still rendered just fine. “Fine” being relative - they will typically fill the entire screen. But at least that’s a very clear indication for the user that’s something is wrong. The problem is when we hit un-allocated scrollback rows. We didn’t check for NULL rows, and crashed. This has now been fixed. --- CHANGELOG.md | 2 ++ url-mode.c | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index acea5f9c..f7bd40d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,8 @@ URLs. * Double free of URL while removing duplicated and/or overlapping URLs in URL mode (https://codeberg.org/dnkl/foot/issues/627). +* Crash when an unclosed OSC-8 URL ran into un-allocated scrollback + rows. ### Security diff --git a/url-mode.c b/url-mode.c index 94c05b3a..524b8d1b 100644 --- a/url-mode.c +++ b/url-mode.c @@ -654,6 +654,11 @@ tag_cells_for_url(struct terminal *term, const struct url *url, bool value) c = 0; row = term->grid->rows[r]; + if (row == NULL) { + /* Un-allocated scrollback. This most likely means a + * runaway OSC-8 URL. */ + break; + } row->dirty = true; } } -- cgit v1.3 From fcd989734235c25e64f8fb38ffcfdf381e933873 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 14 Jul 2021 19:17:44 +0200 Subject: csi: invert the meaning of DECSDM There has been some confusion whether enabling DECSDM (private mode 80) enables or disables sixel scrolling. Foot currently enables scrolling when DECSDM is set, and this patch changes this, such that setting DECSDM now *disables* scrolling. The confusion is apparently due to a documentation error in the VT340 manual, as described in https://github.com/dankamongmen/notcurses/issues/1782#issuecomment-863603641. And that makes sense, in a way: the SDM in DECSDM stands for Sixel Display Mode. I.e. it stands to reason that enabling that disables scrolling. Anyway, this lead to https://github.com/hackerb9/lsix/issues/41, where it was eventually proven (by testing on a real VT340), that foot, and a large number of other terminals (including XTerm) has it wrong: https://github.com/hackerb9/lsix/issues/41#issuecomment-873269599. --- CHANGELOG.md | 2 ++ csi.c | 8 ++++---- terminal.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index f7bd40d8..20c52d1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ * Non-empty lines are now considered to have a hard linebreak, _unless_ an actual word-wrap is inserted. +* Setting `DECSDM` now _disables_ sixel scrolling, while resetting it + _enables_ scrolling (https://codeberg.org/dnkl/foot/issues/631). ### Deprecated diff --git a/csi.c b/csi.c index fcc2800f..80ee75cd 100644 --- a/csi.c +++ b/csi.c @@ -402,7 +402,7 @@ decset_decrst(struct terminal *term, unsigned param, bool enable) break; case 80: - term->sixel.scrolling = enable; + term->sixel.scrolling = !enable; break; case 1000: @@ -611,7 +611,7 @@ decrqm(const struct terminal *term, unsigned param, bool *enabled) case 12: *enabled = term->cursor_blink.decset; return true; case 25: *enabled = !term->hide_cursor; return true; case 45: *enabled = term->reverse_wrap; return true; - case 80: *enabled = term->sixel.scrolling; return true; + case 80: *enabled = !term->sixel.scrolling; return true; case 1000: *enabled = term->mouse_tracking == MOUSE_CLICK; return true; case 1001: *enabled = false; return true; case 1002: *enabled = term->mouse_tracking == MOUSE_DRAG; return true; @@ -654,7 +654,7 @@ xtsave(struct terminal *term, unsigned param) case 25: term->xtsave.show_cursor = !term->hide_cursor; break; case 45: term->xtsave.reverse_wrap = term->reverse_wrap; break; case 47: term->xtsave.alt_screen = term->grid == &term->alt; break; - case 80: term->xtsave.sixel_scrolling = term->sixel.scrolling; break; + case 80: term->xtsave.sixel_display_mode = !term->sixel.scrolling; break; case 1000: term->xtsave.mouse_click = term->mouse_tracking == MOUSE_CLICK; break; case 1001: break; case 1002: term->xtsave.mouse_drag = term->mouse_tracking == MOUSE_DRAG; break; @@ -696,7 +696,7 @@ xtrestore(struct terminal *term, unsigned param) case 25: enable = term->xtsave.show_cursor; break; case 45: enable = term->xtsave.reverse_wrap; break; case 47: enable = term->xtsave.alt_screen; break; - case 80: enable = term->xtsave.sixel_scrolling; break; + case 80: enable = term->xtsave.sixel_display_mode; break; case 1000: enable = term->xtsave.mouse_click; break; case 1001: return; case 1002: enable = term->xtsave.mouse_drag; break; diff --git a/terminal.h b/terminal.h index 309f7db6..12a637a0 100644 --- a/terminal.h +++ b/terminal.h @@ -378,7 +378,7 @@ struct terminal { bool ime:1; bool app_sync_updates:1; - bool sixel_scrolling:1; + bool sixel_display_mode:1; bool sixel_private_palette:1; bool sixel_cursor_right_of_graphics:1; } xtsave; -- cgit v1.3 From 654e65631d4c1f2c25c9c750187348da088cf878 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 14 Jul 2021 19:48:13 +0200 Subject: changelog: box-drawing fixes on big-endian --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index f7bd40d8..590c5aa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,8 @@ in URL mode (https://codeberg.org/dnkl/foot/issues/627). * Crash when an unclosed OSC-8 URL ran into un-allocated scrollback rows. +* Some box-drawing characters were rendered incorrectly on big-endian + architectures. ### Security -- cgit v1.3 From 628fd3909873433be34db5da80b0fedc714f69b6 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 15 Jul 2021 18:26:26 +0200 Subject: render: scrollback indicator: improve handling of very small window sizes --- CHANGELOG.md | 2 ++ render.c | 27 +++++++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 590c5aa5..a5aa84d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,8 @@ rows. * Some box-drawing characters were rendered incorrectly on big-endian architectures. +* Scrollback indicator being incorrectly rendered when window size is + very small. ### Security diff --git a/render.c b/render.c index b404f2f5..a8809513 100644 --- a/render.c +++ b/render.c @@ -2047,10 +2047,6 @@ render_scrollback_position(struct terminal *term) const int height = (2 * margin + term->cell_height + scale - 1) / scale * scale; - unsigned long cookie = shm_cookie_scrollback_indicator(term); - struct buffer *buf = shm_get_buffer( - term->wl->shm, width, height, cookie, false, 1); - /* *Where* to render - parent relative coordinates */ int surf_top = 0; switch (term->conf->scrollback.indicator.position) { @@ -2068,18 +2064,30 @@ render_scrollback_position(struct terminal *term) /* Make sure we don't collide with the scrollback search box */ lines--; } - xassert(lines > 0); - int pixels = lines * term->cell_height - height + 2 * margin; + lines = max(lines, 0); + + int pixels = max(lines * term->cell_height - height + 2 * margin, 0); surf_top = term->cell_height - margin + (int)(percent * pixels); break; } } + const int x = (term->width - margin - width) / scale * scale; + const int y = (term->margins.top + surf_top) / scale * scale; + + if (y + height > term->height) { + wl_surface_attach(win->scrollback_indicator.surf, NULL, 0, 0); + wl_surface_commit(win->scrollback_indicator.surf); + return; + } + + unsigned long cookie = shm_cookie_scrollback_indicator(term); + struct buffer *buf = shm_get_buffer( + term->wl->shm, width, height, cookie, false, 1); + wl_subsurface_set_position( - win->scrollback_indicator.sub, - (term->width - margin - width) / scale, - (term->margins.top + surf_top) / scale); + win->scrollback_indicator.sub, x / scale, y / scale); render_osd( term, @@ -2088,7 +2096,6 @@ render_scrollback_position(struct terminal *term) buf, text, term->colors.table[0], term->colors.table[8 + 4], width - margin - wcslen(text) * term->cell_width, margin); - } static void -- cgit v1.3 From 5e64c67c252bcc475fa4b155c0480f4da112dda4 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 15 Jul 2021 18:27:10 +0200 Subject: render: search: set clip region Fixes crash when the search box has been reduced in height, due to limited window space. --- CHANGELOG.md | 2 ++ render.c | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index a5aa84d9..67cbc32a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,8 @@ rows. * Some box-drawing characters were rendered incorrectly on big-endian architectures. +* Crash when resizing the window to the smallest possible size while + scrollback search is active. * Scrollback indicator being incorrectly rendered when window size is very small. diff --git a/render.c b/render.c index a8809513..7d365643 100644 --- a/render.c +++ b/render.c @@ -2626,6 +2626,12 @@ render_search_box(struct terminal *term) unsigned long cookie = shm_cookie_search(term); struct buffer *buf = shm_get_buffer(term->wl->shm, width, height, cookie, false, 1); + pixman_region32_t clip; + pixman_region32_init_rect(&clip, 0, 0, width, height); + pixman_image_set_clip_region32(buf->pix[0], &clip); + pixman_region32_fini(&clip); + + #define WINDOW_X(x) (margin + x) #define WINDOW_Y(y) (term->height - margin - height + y) -- cgit v1.3 From 31fad5846516ee1e6135bd35f0478b93928a3759 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 15 Jul 2021 18:39:41 +0200 Subject: url-mode: use shm_get_many() If we have lots of URLs, we use up a *lot* of SHM buffers (and thus pools). Each and every one is a single mmap(), of at least 4K. Since all URL labels are created and destroyed at the same time, it makes sense to use a single pool for all buffers. To do this, we must now do two passes; first one to generate the actual string (label content), and to calculate the label sizes. Then we use this information to allocate all SHM buffers at once, from the same pool. Finally, we iterate the URLs again, this time to actually render them. --- CHANGELOG.md | 1 + render.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++--------- url-mode.c | 3 -- 3 files changed, 79 insertions(+), 17 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 67cbc32a..b66079fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ scrollback search is active. * Scrollback indicator being incorrectly rendered when window size is very small. +* Reduced memory usage in URL mode. ### Security diff --git a/render.c b/render.c index 37766232..8e66bf00 100644 --- a/render.c +++ b/render.c @@ -2886,6 +2886,10 @@ render_urls(struct terminal *term) struct wl_window *win = term->window; xassert(tll_length(win->urls) > 0); + const int scale = term->scale; + const int x_margin = 2 * scale; + const int y_margin = 1 * scale; + /* Calculate view start, counted from the *current* scrollback start */ const int scrollback_end = (term->grid->offset + term->rows) & (term->grid->num_rows - 1); @@ -2897,6 +2901,44 @@ render_urls(struct terminal *term) const bool show_url = term->urls_show_uri_on_jump_label; + /* + * There can potentially be a lot of URLs. + * + * Since each URL is a separate sub-surface, and requires its own + * SHM buffer, we may be allocating a lot of buffers. + * + * SHM buffers normally have their own, private SHM buffer + * pool. Each pool is mmapped, and thus allocates *at least* + * 4K. Since URL labels are typically small, we end up using an + * excessive amount of both virtual and physical memory. + * + * For this reason, we instead use shm_get_many(), which uses a + * single, shared pool for all buffers. + * + * To be able to use it, we need to have all the *all* the buffer + * dimensions up front. + * + * Thus, the first iteration through the URLs do the heavy + * lifting: builds the label contents and calculates both its + * position and size. But instead of rendering the label + * immediately, we store the calculated data, and then do a second + * pass, where we first get all our buffers, and then render to + * them. + */ + + /* Positioning data + label contents */ + struct { + const struct wl_url *url; + wchar_t *text; + int x; + int y; + } info[tll_length(win->urls)]; + + /* For shm_get_many() */ + struct buffer_description shm_desc[tll_length(win->urls)]; + + size_t render_count = 0; + tll_foreach(win->urls, it) { const struct url *url = it->item.url; const wchar_t *key = url->key; @@ -2953,6 +2995,7 @@ render_urls(struct terminal *term) /* Maximum width of label, in pixels */ const int max_width = term->width - term->margins.left - term->margins.right - x; + const int max_cols = max_width / term->cell_width; const size_t key_len = wcslen(key); @@ -2990,10 +3033,6 @@ render_urls(struct terminal *term) * Do it in a way such that we don’t cut the label in the * middle of a double-width character. */ - const int scale = term->scale; - const int x_margin = 2 * scale; - const int y_margin = 1 * scale; - const int max_cols = max_width / term->cell_width; int cols = 0; @@ -3021,23 +3060,48 @@ render_urls(struct terminal *term) const int height = (2 * y_margin + term->cell_height + scale - 1) / scale * scale; - struct buffer *buf = shm_get_buffer( - term->wl->shm, width, height, shm_cookie_url(url), false, 1); + info[render_count].url = &it->item; + info[render_count].text = xwcsdup(label); + info[render_count].x = x; + info[render_count].y = y; + + shm_desc[render_count].width = width; + shm_desc[render_count].height = height; + shm_desc[render_count].cookie = shm_cookie_url(url); + + render_count++; + } + + struct buffer *bufs[render_count]; + shm_get_many(term->wl->shm, render_count, shm_desc, bufs, 1); + + uint32_t fg = term->conf->colors.use_custom.jump_label + ? term->conf->colors.jump_label.fg + : term->colors.table[0]; + uint32_t bg = term->conf->colors.use_custom.jump_label + ? term->conf->colors.jump_label.bg + : term->colors.table[3]; + + for (size_t i = 0; i < render_count; i++) { + struct wl_surface *surf = info[i].url->surf.surf; + struct wl_subsurface *sub_surf = info[i].url->surf.sub; + + const wchar_t *label = info[i].text; + const int x = info[i].x; + const int y = info[i].y; + + xassert(surf != NULL); + xassert(sub_surf != NULL); wl_subsurface_set_position( sub_surf, (term->margins.left + x) / term->scale, (term->margins.top + y) / term->scale); - uint32_t fg = term->conf->colors.use_custom.jump_label - ? term->conf->colors.jump_label.fg - : term->colors.table[0]; - uint32_t bg = term->conf->colors.use_custom.jump_label - ? term->conf->colors.jump_label.bg - : term->colors.table[3]; - render_osd( - term, surf, sub_surf, buf, label, fg, bg, x_margin, y_margin); + term, surf, sub_surf, bufs[i], label, fg, bg, x_margin, y_margin); + + free(info[i].text); } } diff --git a/url-mode.c b/url-mode.c index 524b8d1b..a802cc6c 100644 --- a/url-mode.c +++ b/url-mode.c @@ -14,7 +14,6 @@ #include "grid.h" #include "render.h" #include "selection.h" -#include "shm.h" #include "spawn.h" #include "terminal.h" #include "uri.h" @@ -738,9 +737,7 @@ urls_reset(struct terminal *term) if (term->window != NULL) { tll_foreach(term->window->urls, it) { - const struct url *url = it->item.url; wayl_win_subsurface_destroy(&it->item.surf); - shm_purge(term->wl->shm, shm_cookie_url(url)); tll_remove(term->window->urls, it); } } -- cgit v1.3 From 91801ae55da017c2dd0f44c04b8d316a9a2090ef Mon Sep 17 00:00:00 2001 From: Timur Celik Date: Tue, 15 Jun 2021 11:45:27 +0200 Subject: render: Allow cells to bleed into their neighbor This patch adds a `confined` flag to each cell to track if the last rendered glyph bled into it's right neighbor. To keep things simple, bleeding into any other neighbor cell than the immediate right one is not allowed. This should cover most use cases. Before rendering a row we now do a prepass and mark all cells unclean that are affected by a bleeding neighbor. If there are consecutive bleeding cells, the whole group must be re-rendered even if only a single cell has changed. The patch also deprecates both old overflowing glyph options *allow-overflowing-double-width-glyphs* and *pua-double-width* in favor of a single new one named *overflowing-glyphs*. --- CHANGELOG.md | 11 ++++++++ config.c | 17 ++++-------- config.h | 3 +-- doc/foot.ini.5.scd | 34 +++++++++--------------- render.c | 78 ++++++++++++++++++++++++++++-------------------------- terminal.h | 3 ++- 6 files changed, 71 insertions(+), 75 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c2ed336..f12a8b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,9 @@ * `locked-title=no|yes` to `foot.ini` (https://codeberg.org/dnkl/foot/issues/386). +* `tweak.overflowing-glyphs` option, which can be enabled to fix rendering + issues with glyphs of any width that appear cut-off + (https://codeberg.org/dnkl/foot/issues/592). ### Changed @@ -45,6 +48,12 @@ ### Deprecated ### Removed + +* The `tweak.allow-overflowing-double-width-glyphs` and + `tweak.pua-double-width` options (which have been superseded by + `tweak.overflowing-glyphs`). + + ### Fixed * Glyph offset not being taken into account when applying @@ -69,6 +78,8 @@ ### Security ### Contributors +* [clktmr](https://codeberg.org/clktmr) + ## 1.8.1 diff --git a/config.c b/config.c index 92582f2c..a9acb58e 100644 --- a/config.c +++ b/config.c @@ -2213,16 +2213,10 @@ parse_section_tweak( return false; } - else if (strcmp(key, "allow-overflowing-double-width-glyphs") == 0) { - conf->tweak.allow_overflowing_double_width_glyphs = str_to_bool(value); - if (!conf->tweak.allow_overflowing_double_width_glyphs) - LOG_WARN("tweak: disabled overflowing double-width glyphs"); - } - - else if (strcmp(key, "pua-double-width") == 0) { - conf->tweak.pua_double_width = str_to_bool(value); - if (conf->tweak.pua_double_width) - LOG_WARN("tweak: PUA double width glyphs enabled"); + else if (strcmp(key, "overflowing-glyphs") == 0) { + conf->tweak.overflowing_glyphs = str_to_bool(value); + if (!conf->tweak.overflowing_glyphs) + LOG_WARN("tweak: disabled overflowing glyphs"); } else if (strcmp(key, "damage-whole-window") == 0) { @@ -2833,7 +2827,7 @@ config_load(struct config *conf, const char *conf_path, .tweak = { .fcft_filter = FCFT_SCALING_FILTER_LANCZOS3, - .allow_overflowing_double_width_glyphs = true, + .overflowing_glyphs = true, .grapheme_shaping = false, .grapheme_width_method = GRAPHEME_WIDTH_DOUBLE, .delayed_render_lower_ns = 500000, /* 0.5ms */ @@ -2844,7 +2838,6 @@ config_load(struct config *conf, const char *conf_path, .damage_whole_window = false, .box_drawing_base_thickness = 0.04, .box_drawing_solid_shades = true, - .pua_double_width = false, }, .notifications = tll_init(), diff --git a/config.h b/config.h index 190ea427..729eba3e 100644 --- a/config.h +++ b/config.h @@ -245,7 +245,7 @@ struct config { struct { enum fcft_scaling_filter fcft_filter; - bool allow_overflowing_double_width_glyphs; + bool overflowing_glyphs; bool grapheme_shaping; enum {GRAPHEME_WIDTH_WCSWIDTH, GRAPHEME_WIDTH_DOUBLE} grapheme_width_method; bool render_timer_osd; @@ -256,7 +256,6 @@ struct config { off_t max_shm_pool_size; float box_drawing_base_thickness; bool box_drawing_solid_shades; - bool pua_double_width; } tweak; user_notifications_t notifications; diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 6ceaf3b9..8b2f1dc8 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -847,34 +847,24 @@ any of these options. Default: _lanczos3_. -*allow-overflowing-double-width-glyphs* - Boolean. When enabled, double width glyphs with a character width - of 1 are allowed to overflow into the neighbouring cell. +*overflowing-glyphs* + Boolean. When enabled, glyphs wider than their cell(s) are allowed + to render into one additional neighbouring cell. - One use case for this is fonts "icon" characters in the Unicode - private usage area, e.g. Nerd Fonts, or Powerline Fonts. Without - this option, such glyphs will appear "cut off". + One use case for this are fonts with wide italic characters that + "bend" into the next cell. Without this option, such glyphs will + appear "cut off". - Another use case are legacy emoji characters like *WHITE FROWNING - FACE*. + Another use case are fonts with "icon" characters in the Unicode + private usage area, e.g. Nerd Fonts, or Powerline Fonts and legacy + emoji characters like *WHITE FROWNING FACE*. - Note: this feature uses _heuristics_ to determine *which* glyphs - should be allowed to overflow. - - See also: *pua-double-width* + Note: might impact performance depending on the font used. + Especially small font sizes can cause many overflowing glyphs + because of subpixel rendering. Default: _yes_. -*pua-double-width* - Boolean. When enabled, Unicode code points from the private usage - area (PUA) are always considered to be double width, regardless of - the actual glyph width. - - Ignored if *allow-overflowing-double-width-glyphs* has been - disabled. - - Default: _no_. - *render-timer* Enables a frame rendering timer, that prints the time it takes to render each frame, in microseconds, either on-screen, to stderr, diff --git a/render.c b/render.c index 8e66bf00..41a20226 100644 --- a/render.c +++ b/render.c @@ -437,6 +437,20 @@ draw_cursor(const struct terminal *term, const struct cell *cell, } } +static inline void +render_cell_prepass(struct terminal *term, struct row *row, int col) +{ + for (; col < term->cols - 1; col++) { + if (row->cells[col].attrs.confined || + (row->cells[col].attrs.clean == row->cells[col + 1].attrs.clean)) { + break; + } + + row->cells[col].attrs.clean = 0; + row->cells[col + 1].attrs.clean = 0; + } +} + static int render_cell(struct terminal *term, pixman_image_t *pix, struct row *row, int col, int row_no, bool has_cursor) @@ -446,6 +460,7 @@ render_cell(struct terminal *term, pixman_image_t *pix, return 0; cell->attrs.clean = 1; + cell->attrs.confined = true; int width = term->cell_width; int height = term->cell_height; @@ -597,51 +612,32 @@ render_cell(struct terminal *term, pixman_image_t *pix, cell_cols = max(1, min(cell_cols, cols_left)); /* - * Hack! - * - * Deal with double-width glyphs for which wcwidth() returns - * 1. Typically Unicode private usage area characters, - * e.g. powerline, or nerd hack fonts. - * - * Users can enable a tweak option that lets this glyphs - * overflow/bleed into the neighbouring cell. - * - * We only apply this workaround if: - * - the user has explicitly enabled this feature - * - the *character* width is 1 - * - the *glyph* width is at least 1.5 cells - * - the *glyph* width is less than 3 cells - * - *this* column isn’t the last column - * - *this* cells is followed by an empty cell, or a space + * Determine cells that will bleed into their right neighbor and remember + * them for cleanup in the next frame. */ - if (term->conf->tweak.allow_overflowing_double_width_glyphs && - glyph_count > 0 && - cell_cols == 1 && - col < term->cols - 1 && - ((glyphs[0]->x + glyphs[0]->width >= term->cell_width * 15 / 10 && - glyphs[0]->x + glyphs[0]->width < 3 * term->cell_width) || - (term->conf->tweak.pua_double_width && - ((base >= 0x00e000 && base <= 0x00f8ff) || - (base >= 0x0f0000 && base <= 0x0ffffd) || - (base >= 0x100000 && base <= 0x10fffd)))) && - (row->cells[col + 1].wc == 0 || row->cells[col + 1].wc == L' ')) + int render_width = cell_cols * width; + if (term->conf->tweak.overflowing_glyphs && + glyph_count > 0) { - cell_cols = 2; + int glyph_width = 0, advance = 0; + for (size_t i = 0; i < glyph_count; i++) { + glyph_width = max(glyph_width, + advance + glyphs[i]->x + glyphs[i]->width); + advance += glyphs[i]->advance.x; + } - /* - * Ensure the cell we’re overflowing into gets re-rendered, to - * ensure it is erased if *this* cell is erased. Note that we - * do *not* mark the row as dirty - we don’t need to re-render - * the cell if nothing else on the row has changed. - */ - row->cells[col].attrs.clean = 0; - row->cells[col + 1].attrs.clean = 0; + if (glyph_width > render_width) { + render_width = min(glyph_width, render_width + width); + + for (int i = 0; i < cell_cols; i++) + row->cells[col + i].attrs.confined = false; + } } pixman_region32_t clip; pixman_region32_init_rect( &clip, x, y, - cell_cols * term->cell_width, term->cell_height); + render_width, term->cell_height); pixman_image_set_clip_region32(pix, &clip); /* Background */ @@ -771,6 +767,10 @@ static void render_row(struct terminal *term, pixman_image_t *pix, struct row *row, int row_no, int cursor_col) { + if (term->conf->tweak.overflowing_glyphs) + for (int col = term->cols - 1; col >= 0; col--) + render_cell_prepass(term, row, col); + for (int col = term->cols - 1; col >= 0; col--) render_cell(term, pix, row, col, row_no, cursor_col == col); } @@ -1192,8 +1192,10 @@ render_sixel(struct terminal *term, pixman_image_t *pix, (last_col_needs_erase && last_col)) { render_cell(term, pix, row, col, term_row_no, cursor_col == col); - } else + } else { cell->attrs.clean = 1; + cell->attrs.confined = 1; + } } } } diff --git a/terminal.h b/terminal.h index 12a637a0..5ffa6154 100644 --- a/terminal.h +++ b/terminal.h @@ -42,11 +42,12 @@ struct attributes { uint32_t fg:24; bool clean:1; + bool confined:1; bool have_fg:1; bool have_bg:1; uint32_t selected:2; bool url:1; - uint32_t reserved:2; + uint32_t reserved:1; uint32_t bg:24; }; static_assert(sizeof(struct attributes) == 8, "VT attribute struct too large"); -- cgit v1.3 From 7d8884fec4fac371430cb2f0ba85a9d09e3cd171 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 18 Jul 2021 15:38:46 +0200 Subject: changelog: crash when \E[3J was executed with a selection in the scrollback --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index f12a8b53..11dce7f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,9 @@ * Scrollback indicator being incorrectly rendered when window size is very small. * Reduced memory usage in URL mode. +* Crash when the `E3` escape (`\E[3J`) was executed, and there was a + selection in the scrollback + (https://codeberg.org/dnkl/foot/issues/633). ### Security -- cgit v1.3 From e8e9cd559529b91968af9f776df8b87751df7b97 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 18 Jul 2021 16:31:33 +0200 Subject: term: erase_scrollback(): destroy sixels that touch the scrollback --- CHANGELOG.md | 2 +- terminal.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 55 insertions(+), 13 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 11dce7f7..7e44d8a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,7 +74,7 @@ very small. * Reduced memory usage in URL mode. * Crash when the `E3` escape (`\E[3J`) was executed, and there was a - selection in the scrollback + selection, or sixel image, in the scrollback (https://codeberg.org/dnkl/foot/issues/633). diff --git a/terminal.c b/terminal.c index b16cf19a..af5172bb 100644 --- a/terminal.c +++ b/terminal.c @@ -2014,9 +2014,16 @@ term_erase(struct terminal *term, const struct coord *start, const struct coord void term_erase_scrollback(struct terminal *term) { - const int mask = term->grid->num_rows - 1; + const int num_rows = term->grid->num_rows; + const int mask = num_rows - 1; + const int start = (term->grid->offset + term->rows) & mask; const int end = (term->grid->offset - 1) & mask; + + const int scrollback_start = term->grid->offset + term->rows; + const int rel_start = (start - scrollback_start + num_rows) & mask; + const int rel_end = (end - scrollback_start + num_rows) & mask; + const int sel_start = term->selection.start.row; const int sel_end = term->selection.end.row; @@ -2035,18 +2042,9 @@ term_erase_scrollback(struct terminal *term) * thus means the row is further *down* in the scrollback, * closer to the screen bottom. */ - int scrollback_start = term->grid->offset + term->rows; - int rel_sel_start = sel_start - scrollback_start + term->grid->num_rows; - int rel_sel_end = sel_end - scrollback_start + term->grid->num_rows; - - int rel_start = start - scrollback_start + term->grid->num_rows; - int rel_end = end - scrollback_start + term->grid->num_rows; - - rel_sel_start &= mask; - rel_sel_end &= mask; - rel_start &= mask; - rel_end &= mask; + const int rel_sel_start = (sel_start - scrollback_start + num_rows) & mask; + const int rel_sel_end = (sel_end - scrollback_start + num_rows) & mask; if ((rel_sel_start <= rel_start && rel_sel_end >= rel_start) || (rel_sel_start <= rel_end && rel_sel_end >= rel_end) || @@ -2056,6 +2054,20 @@ term_erase_scrollback(struct terminal *term) } } + tll_foreach(term->grid->sixel_images, it) { + struct sixel *six = &it->item; + const int six_start = (six->pos.row - scrollback_start + num_rows) & mask; + const int six_end = (six->pos.row + six->rows - 1 - scrollback_start + num_rows) & mask; + + if ((six_start <= rel_start && six_end >= rel_start) || + (six_start <= rel_end && six_end >= rel_end) || + (six_start >= rel_start && six_end <= rel_end)) + { + sixel_destroy(six); + tll_remove(term->grid->sixel_images, it); + } + } + for (int i = start;; i = (i + 1) & mask) { struct row *row = term->grid->rows[i]; if (row != NULL) { @@ -2164,6 +2176,36 @@ UNITTEST xassert(term.selection.end.row == 16); xassert(term.selection.kind == SELECTION_CHAR_WISE); + term.selection.start = (struct coord){-1, -1}; + term.selection.end = (struct coord){-1, -1}; + term.selection.kind = SELECTION_NONE; + + /* + * Test case 4 - sixel that touch the scrollback + */ + + struct sixel six = { + .rows = 5, + .pos = { + .row = 15, + }, + }; + tll_push_back(term.normal.sixel_images, six); + populate_scrollback(); + term_erase_scrollback(&term); + xassert(tll_length(term.normal.sixel_images) == 0); + + /* + * Test case 5 - sixel that does *not* touch the scrollback + */ + six.rows = 3; + tll_push_back(term.normal.sixel_images, six); + populate_scrollback(); + term_erase_scrollback(&term); + xassert(tll_length(term.normal.sixel_images) == 1); + + /* Cleanup */ + tll_free(term.normal.sixel_images); close(term.selection.auto_scroll.fd); for (int i = 0; i < scrollback_rows; i++) grid_row_free(term.normal.rows[i]); -- cgit v1.3 From 318385040c4af386e944e009bec839a9161defb6 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 18 Jul 2021 17:16:17 +0200 Subject: changelog: remove entries that are no longer relevant The tweak.allow-overflowing-double-width-glyphs option have been superseded by tweak.overflowing-glyphs. --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e44d8a7..a25599fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,10 +56,6 @@ ### Fixed -* Glyph offset not being taken into account when applying - `tweak.allow-overflowing-double-width-glyphs`. -* Regression: crash when a single-char, double-width glyph is in the - last column, and `tweak.allow-overflowing-double-width-glyphs=yes`. * FD exhaustion when repeatedly entering/exiting URL mode with many URLs. * Double free of URL while removing duplicated and/or overlapping URLs -- cgit v1.3