[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17777: [Emacs-diffs] emacs-24 r117241: Fix bug #17777 with keyboard
bug#17777: [Emacs-diffs] emacs-24 r117241: Fix bug #17777 with keyboard macros and visual-order cursor movement.
Sun, 15 Jun 2014 19:12:29 +0300
> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Sun, 15 Jun 2014 00:14:06 -0400
> >> > if (w->window_end_valid
> >> > + && NILP (Vexecuting_kbd_macro)
> >> > && !windows_or_buffers_changed
> >> > && b
> >> > && !b->clip_changed
> >> NILP (Vexecuting_kbd_macro) seems like a workaround.
> > It isn't.
> >> Why can't the glyph matrix be used in this case?
> > Because cursor position is not up-to-date in that case.
> >> I means which part of the glyph matrix is wrong in the OP's recipe
> >> (since this makes no change to the buffer)?
> > The cursor position.
> But that can occur even without executing kbd macros, no?
Not sure what you mean by that.
> Wouldn't it be better to ignore the cursor position given in the glyph
> matrix and use (point) instead?
For the method that is based on up-to-date glyph matrices, I need to
know the glyph where the cursor is displayed. The glyph coordinates
of that glyph are stored in the w->cursor structure, and updated by
redisplay. The problem in the case in point was that redisplay is not
called as long as a macro is running. So the coordinates from which
move-point-visually starts are incorrect.
I see no easy way of finding the cursor glyph coordinates by starting
from point; a (not so easy) way is the second method used by that