[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `vertical-motion', `goto-line' set point to invisible text

From: Eli Zaretskii
Subject: Re: `vertical-motion', `goto-line' set point to invisible text
Date: Tue, 05 Jul 2011 03:56:55 -0400

> From: Dmitry Kurochkin <address@hidden>
> Cc: address@hidden
> Date: Tue, 05 Jul 2011 07:52:09 +0400
>   (progn (switch-to-buffer "test")
>          (insert "aline1\nbline2\ncline3\n")
>          (put-text-property 7 14 'invisible t)
>          (goto-char (point-min)))
> Now if you run M-: (progn (end-of-visual-line) (point)), it moves to
> point 14, which is end of line 2 as expected.  But then emacs adjusts
> the point and moves it to beginning of line3, C-x = says point is 15.

Interestingly, the first time you do this, there's no adjustment from
14 to 15.  Sounds like some snafu with the last point position?

I can confirm that this happens because point adjustment: setting
global-disable-point-adjustment to non-nil eliminates the problem:
point stays at position 14.

Also, C-e behaves correctly no matter what.  So it's something
specific to end-of-visual-line or vertical-motion.

Perhaps stepping through adjust_point_for_property with a debugger
will show what's wrong.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]