GNU bug report logs - #19188
point adjustemnt moves *into* invisible text

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Wed, 26 Nov 2014 03:10:02 UTC

Severity: normal

Tags: notabug

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


Message #18 received at 19188-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: 19188-done <at> debbugs.gnu.org
Subject: Re: bug#19188: point adjustemnt moves *into* invisible text
Date: Mon, 22 Dec 2014 23:11:27 -0500
> 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




This bug report was last modified 10 years and 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.