From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Jonas Bernoulli <jonas@bernoul.li>
Cc: 19188-done@debbugs.gnu.org
Subject: bug#19188: point adjustemnt moves *into* invisible text
Date: Mon, 22 Dec 2014 23:11:27 -0500 [thread overview]
Message-ID: <jwvmw6fj9cf.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87ioh3cwfd.fsf@bernoul.li> (Jonas Bernoulli's message of "Mon, 22 Dec 2014 20:32:38 +0100")
> Also required is this hack which relies on `get-text-property' and
> `get-pos-property' disagreeing about the value of `invisible'.
> (add-hook 'post-command-hook #'magit-post-command-adjust-point t t)
> (defun magit-post-command-adjust-point ()
> (when (and (get-text-property (point) 'invisible)
> (not (if (fboundp 'get-pos-property) ; since 24.4, see #1671
> (get-pos-property (point) 'invisible)
> (get-text-property (1+ (point)) 'invisible))))
> (goto-char (next-single-char-property-change (point) 'invisible))))
> Is there a better way?
I don't know, because I don't know what it's trying to do.
> It is especially confusing when only point is adjusted and the cursor
> stays were it would have been without the adjustment of point.
IIUC you're describing a situation where the display is incorrect, so
I think this would be a bug.
>> But indeed C-n gets me to position 5, which is wrong (and doing M-: (point)
>> returns 5 but moves me to position 3, so doing it again returns 3 :-( ).
>> So we do have a bug here.
I filed a separate bug report about this problem.
Stefan
prev parent reply other threads:[~2014-12-23 4:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 3:07 bug#19188: point adjustemnt moves *into* invisible text Jonas Bernoulli
2014-11-26 14:51 ` Stefan Monnier
2014-12-22 19:32 ` Jonas Bernoulli
2014-12-23 4:11 ` Stefan Monnier [this message]
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=jwvmw6fj9cf.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=19188-done@debbugs.gnu.org \
--cc=jonas@bernoul.li \
/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).