From: "Richard M. Stallman" <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: bug in vertical-motion?
Date: Mon, 29 Aug 2005 20:27:36 -0400 [thread overview]
Message-ID: <E1E9tyS-0004ub-U1@fencepost.gnu.org> (raw)
In-Reply-To: <200508230222.j7N2MVh14683@raven.dms.auburn.edu> (message from Luc Teirlinck on Mon, 22 Aug 2005 21:22:31 -0500 (CDT))
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))
next prev parent reply other threads:[~2005-08-30 0:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-23 2:22 bug in vertical-motion? Luc Teirlinck
2005-08-30 0:27 ` Richard M. Stallman [this message]
2005-08-30 2:01 ` Luc Teirlinck
-- strict thread matches above, loose matches on Subject: below --
2005-08-23 2:29 Luc Teirlinck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1E9tyS-0004ub-U1@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).