unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* vertical-motion on stretch glyph
@ 2005-11-30  8:44 Kyotaro HORIGUCHI
  2005-11-30 12:54 ` Kyotaro HORIGUCHI
  0 siblings, 1 reply; 2+ messages in thread
From: Kyotaro HORIGUCHI @ 2005-11-30  8:44 UTC (permalink / raw)


(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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vertical-motion on stretch glyph
  2005-11-30  8:44 vertical-motion on stretch glyph Kyotaro HORIGUCHI
@ 2005-11-30 12:54 ` Kyotaro HORIGUCHI
  0 siblings, 0 replies; 2+ messages in thread
From: Kyotaro HORIGUCHI @ 2005-11-30 12:54 UTC (permalink / raw)


I've forgotten one more condition.

> (vertical-motion 1) on stretch glyph

 at the beginning of line

> results in no motion of
> point.

-- 
Kyotaro HORIGUCHI

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-30 12:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-30  8:44 vertical-motion on stretch glyph Kyotaro HORIGUCHI
2005-11-30 12:54 ` Kyotaro HORIGUCHI

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).