GNU bug report logs -
#17744
24.3.91; Cursor drawn at EOL while it's at BOL
Previous Next
Reported by: Stefan <monnier <at> iro.umontreal.ca>
Date: Tue, 10 Jun 2014 05:48:02 UTC
Severity: normal
Found in version 24.3.91
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 17744 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan <monnier <at> iro.umontreal.ca>
> Date: Tue, 10 Jun 2014 01:18:20 -0400
>
>
> emacs -Q
>
> (progn (goto-char (point-min)) (forward-line 1)
> (let ((ol (make-overlay (point) (point)))
> (str "TOTO"))
> (put-text-property 0 1 'cursor 1 str)
> (overlay-put ol 'after-string str)))
>
> Then do:
>
> M-<
> C-n
>
> Notice that the cursor is drawn at EOL whereas it should be drawn at BOL.
The patch below fixes this. However, since this problem exists in
Emacs 24.3 as well, and so is not really a regression, I need your
permission to install on the release branch.
--- src/xdisp.c~0 2014-05-26 06:51:21 +0300
+++ src/xdisp.c 2014-06-10 18:37:35 +0300
@@ -14421,7 +14421,7 @@ set_cursor_from_row (struct window *w, s
pos_after, 0);
if (prop_pos >= pos_before)
- bpos_max = prop_pos - 1;
+ bpos_max = prop_pos;
}
if (INTEGERP (chprop))
{
@@ -14495,7 +14495,7 @@ set_cursor_from_row (struct window *w, s
pos_after, 0);
if (prop_pos >= pos_before)
- bpos_max = prop_pos - 1;
+ bpos_max = prop_pos;
}
if (INTEGERP (chprop))
{
@@ -14525,7 +14525,7 @@ set_cursor_from_row (struct window *w, s
GLYPH_BEFORE and GLYPH_AFTER. */
if (!((row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end)
&& BUFFERP (glyph->object) && glyph->charpos == pt_old)
- && !(bpos_max < pt_old && pt_old <= bpos_covered))
+ && !(bpos_max <= pt_old && pt_old <= bpos_covered))
{
/* An empty line has a single glyph whose OBJECT is zero and
whose CHARPOS is the position of a newline on that line.
This bug report was last modified 10 years and 350 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.