* bug in vertical-motion?
@ 2005-08-23 2:29 Luc Teirlinck
0 siblings, 0 replies; 4+ messages in thread
From: Luc Teirlinck @ 2005-08-23 2:29 UTC (permalink / raw)
I should add that the described bug does not occur in Emacs-21.3.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug in vertical-motion?
@ 2005-08-23 2:22 Luc Teirlinck
2005-08-30 0:27 ` Richard M. Stallman
0 siblings, 1 reply; 4+ messages in thread
From: Luc Teirlinck @ 2005-08-23 2:22 UTC (permalink / raw)
Do `emacs -q' and then hold the `q' (or your favorite letter) key down
until you get a continuation line.
Put cursor on the next to last `q' on the screen line that is
continued. Then M-: (vertical-motion 0) carries you to the beginning
of the current screen line, as one would expect. But then put cursor
on the very last `q' of the continued screen line. Then
M-: (vertical-motion 0) carries you to the beginning of the _next_
screen line. This appears to be a bug.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug in vertical-motion?
2005-08-23 2:22 Luc Teirlinck
@ 2005-08-30 0:27 ` Richard M. Stallman
2005-08-30 2:01 ` Luc Teirlinck
0 siblings, 1 reply; 4+ messages in thread
From: Richard M. Stallman @ 2005-08-30 0:27 UTC (permalink / raw)
Cc: emacs-devel
Put cursor on the next to last `q' on the screen line that is
continued. Then M-: (vertical-motion 0) carries you to the beginning
of the current screen line, as one would expect. But then put cursor
on the very last `q' of the continued screen line. Then
M-: (vertical-motion 0) carries you to the beginning of the _next_
screen line. This appears to be a bug.
Do people get good results from this patch?
*** xdisp.c 27 Aug 2005 22:41:25 -0400 1.1045
--- xdisp.c 29 Aug 2005 20:14:40 -0400
***************
*** 6012,6017 ****
--- 6012,6019 ----
glyphs have the same width. */
int single_glyph_width = it->pixel_width / it->nglyphs;
int new_x;
+ int x_before_this_char = x;
+ int hpos_before_this_char = it->hpos;
for (i = 0; i < it->nglyphs; ++i, x = new_x)
{
***************
*** 6043,6050 ****
--- 6045,6066 ----
{
++it->hpos;
it->current_x = new_x;
+
+ /* The character's last glyph just barely fits
+ in this row. */
if (i == it->nglyphs - 1)
{
+ /* If this is the destination position,
+ return a position *before* it in this row,
+ now that we know it fits in this row. */
+ if (BUFFER_POS_REACHED_P ())
+ {
+ it->hpos = hpos_before_this_char;
+ it->current_x = x_before_this_char;
+ result = MOVE_POS_MATCH_OR_ZV;
+ break;
+ }
+
set_iterator_to_next (it, 1);
#ifdef HAVE_WINDOW_SYSTEM
if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug in vertical-motion?
2005-08-30 0:27 ` Richard M. Stallman
@ 2005-08-30 2:01 ` Luc Teirlinck
0 siblings, 0 replies; 4+ messages in thread
From: Luc Teirlinck @ 2005-08-30 2:01 UTC (permalink / raw)
Cc: emacs-devel
Richard Stallman wrote:
Put cursor on the next to last `q' on the screen line that is
continued. Then M-: (vertical-motion 0) carries you to the beginning
of the current screen line, as one would expect. But then put cursor
on the very last `q' of the continued screen line. Then
M-: (vertical-motion 0) carries you to the beginning of the _next_
screen line. This appears to be a bug.
Do people get good results from this patch?
*** xdisp.c 27 Aug 2005 22:41:25 -0400 1.1045
--- xdisp.c 29 Aug 2005 20:14:40 -0400
It appears to work.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-30 2:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-23 2:29 bug in vertical-motion? Luc Teirlinck
-- strict thread matches above, loose matches on Subject: below --
2005-08-23 2:22 Luc Teirlinck
2005-08-30 0:27 ` Richard M. Stallman
2005-08-30 2:01 ` Luc Teirlinck
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.