From: Eli Zaretskii <eliz@gnu.org>
To: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Cc: 11720@debbugs.gnu.org
Subject: bug#11720: 24.1; outline-mode : cursor and point mismatch ?
Date: Sat, 16 Jun 2012 14:55:18 +0300 [thread overview]
Message-ID: <83y5nneajd.fsf@gnu.org> (raw)
In-Reply-To: <4FDB4733.1050005@yahoo.fr>
> Date: Fri, 15 Jun 2012 16:31:15 +0200
> From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
>
> Say I have a buffer with the two lines:
> * A
> Some text
>
> and I hit C-c C-d (hide-subtree) and M-<. Now I have:
> * A...
> ^
> where '...' indicates hidden text and '^' indicates the
> position of the cursor (on the title line).
>
> Then hitting C-f a few times will advance the cursor successively :
> * A...
> ^
> * A...
> ^
> * A...
> ^ <- I did not expect this.
> * A...
> ^
Actually, the behavior in Emacs 24.1 is this:
* A...
^
* A...
^ <- I did not expect this.
* A...
^
> The behaviour that I expected was :
> * A...
> ^
> * A...
> ^
> * A...
> ^ <- different
> * A...
> ^
No, you expected this:
* A...
^
* A...
^ <- different
* A...
^
Anyway, I think I fixed this now, in revision 108626 on the trunk. If
you can build your own Emacs, the patch is below; please try it and
tell if the problem is solved for you, or there are any leftovers.
Thanks.
--- src/xdisp.c 2012-06-16 10:18:21 +0000
+++ src/xdisp.c 2012-06-16 11:47:44 +0000
@@ -13937,16 +13937,13 @@ set_cursor_from_row (struct window *w, s
break;
}
/* See if we've found a better approximation to
- POS_BEFORE or to POS_AFTER. Note that we want the
- first (leftmost) glyph of all those that are the
- closest from below, and the last (rightmost) of all
- those from above. */
+ POS_BEFORE or to POS_AFTER. */
if (0 > dpos && dpos > pos_before - pt_old)
{
pos_before = glyph->charpos;
glyph_before = glyph;
}
- else if (0 < dpos && dpos <= pos_after - pt_old)
+ else if (0 < dpos && dpos < pos_after - pt_old)
{
pos_after = glyph->charpos;
glyph_after = glyph;
@@ -14030,7 +14027,7 @@ set_cursor_from_row (struct window *w, s
pos_before = glyph->charpos;
glyph_before = glyph;
}
- else if (0 < dpos && dpos <= pos_after - pt_old)
+ else if (0 < dpos && dpos < pos_after - pt_old)
{
pos_after = glyph->charpos;
glyph_after = glyph;
next prev parent reply other threads:[~2012-06-16 11:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-15 14:31 bug#11720: 24.1; outline-mode : cursor and point mismatch ? Nicolas Richard
2012-06-16 11:55 ` Eli Zaretskii [this message]
2012-06-17 17:01 ` N.R.
2012-06-17 20:24 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83y5nneajd.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=11720@debbugs.gnu.org \
--cc=theonewiththeevillook@yahoo.fr \
/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 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.