[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d6e08ff459: Fix rare problems with current-column when text is in
From: |
Eli Zaretskii |
Subject: |
master d6e08ff459: Fix rare problems with current-column when text is invisible |
Date: |
Wed, 26 Oct 2022 10:22:47 -0400 (EDT) |
branch: master
commit d6e08ff459df4cda9eda0c5c842313d02851ba3d
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix rare problems with current-column when text is invisible
* src/indent.c (scan_for_column, compute_motion): Don't miss
compositions when the position to check for composition happens to
be inside invisible text. (Bug#58791)
---
src/indent.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/indent.c b/src/indent.c
index aa905f387b..4bf597a339 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -637,6 +637,11 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol,
scan_byte = CHAR_TO_BYTE (scan);
if (scan >= end)
goto endloop;
+ /* We may have over-stepped cmp_it.stop_pos while skipping
+ the invisible text. If so, update cmp_it.stop_pos. */
+ if (scan > cmp_it.stop_pos && cmp_it.id < 0)
+ composition_reseat_it (&cmp_it, scan, scan_byte, end,
+ w, -1, NULL, Qnil);
}
/* Test reaching the goal column. We do this after skipping
@@ -1358,6 +1363,9 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte,
EMACS_INT fromvpos,
pos = newpos;
pos_byte = CHAR_TO_BYTE (pos);
}
+ if (newpos > cmp_it.stop_pos && cmp_it.id < 0)
+ composition_reseat_it (&cmp_it, pos, pos_byte, to,
+ win, -1, NULL, Qnil);
rarely_quit (++quit_count);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d6e08ff459: Fix rare problems with current-column when text is invisible,
Eli Zaretskii <=