diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-12-02 14:13:24 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-12-02 14:13:24 +0200 |
commit | 7ff943044e9b261768253404b48d5c6419d2f143 (patch) | |
tree | 289b1b97c3cffe233d53e59ff4a10d6c084657c1 | |
parent | 7f0bef47dddbcbdaa12b9fc4aa25e0c41ac340a2 (diff) | |
download | emacs-7ff943044e9b261768253404b48d5c6419d2f143.tar.gz emacs-7ff943044e9b261768253404b48d5c6419d2f143.tar.bz2 emacs-7ff943044e9b261768253404b48d5c6419d2f143.zip |
Fix setting cursor when the window's op line has 'line-prefix'
* src/xdisp.c (set_cursor_from_row): Skip glyphs that come from a
string if their 'avoid_cursor_p' flag is set. (Bug#67486)
-rw-r--r-- | src/xdisp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index eb38ebba17b..5a56b116708 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17859,7 +17859,8 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, else if (dpos == 0) match_with_avoid_cursor = true; } - else if (STRINGP (glyph->object)) + else if (STRINGP (glyph->object) + && !glyph->avoid_cursor_p) { Lisp_Object chprop; ptrdiff_t glyph_pos = glyph->charpos; @@ -18085,7 +18086,8 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, /* Any glyphs that come from the buffer are here because of bidi reordering. Skip them, and only pay attention to glyphs that came from some string. */ - if (STRINGP (glyph->object)) + if (STRINGP (glyph->object) + && !glyph->avoid_cursor_p) { Lisp_Object str; ptrdiff_t tem; |