[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.
- Re: `vertical-motion', `goto-line' set point to invisible text, (continued)
- Re: `vertical-motion', `goto-line' set point to invisible text, Stefan Monnier, 2011/07/03
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/03
- Re: `vertical-motion', `goto-line' set point to invisible text, Stefan Monnier, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Stefan Monnier, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Dmitry Kurochkin, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Dmitry Kurochkin, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text,
Eli Zaretskii <=
- Re: `vertical-motion', `goto-line' set point to invisible text, Dmitry Kurochkin, 2011/07/09