From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kyotaro HORIGUCHI Newsgroups: gmane.emacs.devel Subject: vertical-motion on stretch glyph Date: Wed, 30 Nov 2005 17:44:06 +0900 (JST) Message-ID: <20051130.174406.105718982.horiguti@horiguti.meadowy.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1133359260 17989 80.91.229.2 (30 Nov 2005 14:01:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2005 14:01:00 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 30 15:00:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhPsd-0001af-8z for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2005 12:12:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhPsJ-0007Dy-BF for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2005 06:11:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EhNZb-0006qh-LA for emacs-devel@gnu.org; Wed, 30 Nov 2005 03:44:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EhNZW-0006pd-M2 for emacs-devel@gnu.org; Wed, 30 Nov 2005 03:44:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhNZU-0006pE-2I for emacs-devel@gnu.org; Wed, 30 Nov 2005 03:44:12 -0500 Original-Received: from [202.224.39.197] (helo=mail.asahi-net.or.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EhNZT-0000Ra-UF for emacs-devel@gnu.org; Wed, 30 Nov 2005 03:44:12 -0500 Original-Received: from localhost (g052188.ppp.asahi-net.or.jp [211.132.52.188]) by mail.asahi-net.or.jp (Postfix) with ESMTP id 20DCD25807; Wed, 30 Nov 2005 17:44:08 +0900 (JST) Original-To: emacs-devel@gnu.org User-Agent: Mew version 4.2.54 on Emacs 22.0 / Mule 5.0 =?iso-2022-jp?B?KBskQjpnGyhCKQ==?= / Meadow-3.00-dev =?iso-2022-jp?B?KBskQjVGGyhCKQ==?= X-Weather: =?iso-2022-jp?B?GyRCTEBGfCROP0BGYEBuOCkkT0AyJGwkRyQ5GyhC?= 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:46807 Archived-At: (vertical-motion 1) on stretch glyph results in no motion of point. After evaluating the exporession below in *scratch*, M-: (vertical-motion 1) makes no movement of point. (save-excursion (let ((a "12ABC")) (put-text-property 0 2 'display '(space :width 10) a) (insert a))) The following patch fixes this problem. -- Kyotaro HORIGUCHI Index: indent.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/indent.c,v retrieving revision 1.180 diff -u -2 -r1.180 indent.c --- indent.c 7 Aug 2005 12:33:17 -0000 1.180 +++ indent.c 30 Nov 2005 06:52:17 -0000 @@ -2075,5 +2075,5 @@ int it_start; int oselective; - int start_on_image_p; + int start_on_image_or_stretch_p; SET_TEXT_POS (pt, PT, PT_BYTE); @@ -2087,5 +2087,6 @@ PT had. */ it_start = IT_CHARPOS (it); - start_on_image_p = (it.method == GET_FROM_IMAGE); + start_on_image_or_stretch_p = (it.method == GET_FROM_IMAGE + || it.method == GET_FROM_STRETCH); reseat_at_previous_visible_line_start (&it); it.current_x = it.hpos = 0; @@ -2098,7 +2099,8 @@ /* Move back if we got too far. This may happen if truncate-lines is on and PT is beyond right margin. - It may also happen if it_start is on an image -- - in that case, don't go back. */ - if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 && !start_on_image_p) + It may also happen if it_start is on an image or a stretch + glyph -- in that case, don't go back. */ + if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 + && !start_on_image_or_stretch_p) move_it_by_lines (&it, -1, 0);