From 8fedd523deb07a33fc6ef786d57fd904ffecc8f5 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 18 Oct 2024 14:28:08 +0300 Subject: fixed the "Editing local registers in macro calls" check * The previous check could result in false positives if you are editing a local Q-Register, that will be destroyed at the end of the current macro frame, and call another non-colon modified macro. * It must instead be invalid to keep the register edited only if it belongs to the local Q-Registers that are about to be freed. In other words, the table that the currently edited Q-Register belongs to, must be the one we're about to destroy. * This fixes the solarized.toggle (F5) macro when using the Solarized color scheme. --- src/ring.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ring.c') diff --git a/src/ring.c b/src/ring.c index 6a4eae5..d6fadda 100644 --- a/src/ring.c +++ b/src/ring.c @@ -264,6 +264,7 @@ teco_ring_edit_by_name(const gchar *filename, GError **error) { teco_buffer_t *buffer = teco_ring_find(filename); + teco_qreg_table_current = NULL; teco_qreg_current = NULL; if (buffer) { teco_ring_current = buffer; @@ -310,6 +311,7 @@ teco_ring_edit_by_id(teco_int_t id, GError **error) return FALSE; } + teco_qreg_table_current = NULL; teco_qreg_current = NULL; teco_ring_current = buffer; teco_buffer_edit(buffer); -- cgit v1.2.3