From aaa1d51a4c85fcc627e88ef7cf5292d9c5f5f840 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 8 Jun 2025 20:54:29 +0200 Subject: ^S/^Y calculates the glyph offsets earlier * Previously, deleting text after a text match or insertion could result in wrong ^S/^Y results. In particular, the amount of characters deleted by at the end of a buffer couldn't be queried. * This also fixes the M#rf (reflow paragraph) macro. --- src/core-commands.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core-commands.h') diff --git a/src/core-commands.h b/src/core-commands.h index 432ec38..9f62da8 100644 --- a/src/core-commands.h +++ b/src/core-commands.h @@ -44,8 +44,8 @@ TECO_DECLARE_STATE(teco_state_ctlc_control); TECO_DECLARE_STATE(teco_state_ecommand); typedef struct { - gsize from; /*< start position in bytes */ - gsize to; /*< end position in bytes */ + teco_int_t from; /*< start position in glyphs */ + teco_int_t to; /*< end position in glyphs */ } teco_range_t; extern guint teco_ranges_count; -- cgit v1.2.3