From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: vertical-motion bug Date: Sat, 15 Jul 2006 10:58:55 -0400 Message-ID: <87hd1ic3tc.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1152975581 31534 80.91.229.2 (15 Jul 2006 14:59:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2006 14:59:41 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 15 16:59:39 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G1lcF-0005He-Gc for ged-emacs-devel@m.gmane.org; Sat, 15 Jul 2006 16:59:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G1lcF-00006d-19 for ged-emacs-devel@m.gmane.org; Sat, 15 Jul 2006 10:59:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G1lbu-0008PS-EZ for emacs-devel@gnu.org; Sat, 15 Jul 2006 10:59:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G1lbt-0008OK-Nb for emacs-devel@gnu.org; Sat, 15 Jul 2006 10:59:13 -0400 Original-Received: from [18.72.1.2] (helo=south-station-annex.mit.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G1le8-0006zF-6N for emacs-devel@gnu.org; Sat, 15 Jul 2006 11:01:32 -0400 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id k6FExCwZ007541 for ; Sat, 15 Jul 2006 10:59:12 -0400 (EDT) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id k6FEww4r004860 for ; Sat, 15 Jul 2006 10:58:58 -0400 (EDT) Original-Received: from cyd (SYDNEYPACIFIC-NINETY-NINE.MIT.EDU [18.95.5.99]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id k6FEwtwB008118 for ; Sat, 15 Jul 2006 10:58:55 -0400 (EDT) Original-Received: from cyd by cyd with local (Exim 3.36 #1 (Debian)) id 1G1lbb-0007hq-00 for ; Sat, 15 Jul 2006 10:58:55 -0400 Original-To: emacs-devel@gnu.org X-Spam-Score: 1.47 X-Scanned-By: MIMEDefang 2.42 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57047 Archived-At: In a scratch buffer: M-< M-: (insert (propertize "a" 'display "a\nb\nc\n")) RET M-< C-n (or M-: (vertical-motion 1)) Result: point moves down three lines. The expected behavior, based on the `vertical-motion' docstring, is to move just one line. This behavior was broken by something in the following change: 2006-06-14 Kim F. Storm * dispextern.h (IT_STACK_SIZE): New macro specifying size of iterator stack (instead of hardcoded number). Increase from 2 to 4 to make room for propertized overlay strings before and after a display string, image or composition. (struct it): Add image_id and method members to iterator stack. * xdisp.c (init_from_display_pos): Don't set it->method and overlay_string_index after pop_it. Add asserts. (handle_stop): Look for overlay strings around a display string, image, or composition. Handle properties on those strings. (next_overlay_string): Don't set string, pos or method after pop_it. (get_overlay_strings_1): Split from get_overlay_strings; don't modify it if no overlay strings are found. (get_overlay_strings): Use get_overlay_strings_1. Always set it->string and it->method. (push_it): Push it->image_id and it->method. Push it->object instead of it->string if method is GET_FROM_IMAGE. (pop_it): Pop it->image_id and it->method. Ppo it->object instead of it->string if method is GET_FROM_IMAGE. Reset it->current.string_pos if popped it->string is nil. (reseat_1): Remove comment dated 19 May 2003. It expressed doubt whether a given change was correct; but the change is correct. Clear it->string_from_display_prop_p. (set_iterator_to_next): Rely on it->method and it->image_id from iterator stack, instead of setting them explicitly after pop_it.