emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: move-to-column inconsistent with invisible text


From: martin rudalics
Subject: Re: move-to-column inconsistent with invisible text
Date: Thu, 05 Apr 2007 11:32:10 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Consider the following example:

(progn
  (insert "1234567890")
  (let ((overlay (make-overlay (+ (point-at-bol) 2) (+ (point-at-bol) 4))))
    (overlay-put overlay 'invisible t)
    (let ((point-a (save-excursion (beginning-of-line)
                                   (move-to-column 6)
                                   (point)))
          (point-b (save-excursion (end-of-line)
                                   (move-to-column 6)
                                   (point))))
      (delete-overlay overlay)
      (message "%d %d" point-a point-b))))

point-a and point-b should be equal, but they are not.

Could you please try the attached patch.
*** indent.c.~1.191.~   Mon Apr  2 07:45:22 2007
--- indent.c    Thu Apr  5 11:28:08 2007
***************
*** 951,957 ****
    pos = PT;
    pos_byte = PT_BYTE;
    end = ZV;
-   next_boundary = pos;

    /* If we're starting past the desired column,
       back up to beginning of line and scan from there.  */
--- 951,956 ----
***************
*** 963,968 ****
--- 962,969 ----
        col = 0;
      }

+   next_boundary = pos;
+ 
    while (pos < end)
      {
        while (pos == next_boundary)

reply via email to

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