[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/indent.c,v
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/indent.c,v |
Date: |
Fri, 05 Jan 2007 15:00:45 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kim F. Storm <kfstorm> 07/01/05 15:00:45
Index: indent.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/indent.c,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -b -r1.187 -r1.188
--- indent.c 20 Nov 2006 02:47:15 -0000 1.187
+++ indent.c 5 Jan 2007 15:00:45 -0000 1.188
@@ -2074,7 +2074,7 @@
{
int it_start;
int oselective;
- int it_overshoot_expected_p;
+ int it_overshoot_expected;
SET_TEXT_POS (pt, PT, PT_BYTE);
start_display (&it, w, pt);
@@ -2100,10 +2100,14 @@
while (s < e && *s != '\n')
++s;
- it_overshoot_expected_p = (s == e);
+ /* If there is no newline in the string, we need to check
+ whether there is a newline immediately after the string
+ in move_it_to below. This may happen if there is an
+ overlay with an after-string just before the newline. */
+ it_overshoot_expected = (s == e) ? -1 : 0;
}
else
- it_overshoot_expected_p = (it.method == GET_FROM_IMAGE
+ it_overshoot_expected = (it.method == GET_FROM_IMAGE
|| it.method == GET_FROM_STRETCH
|| it.method == GET_FROM_COMPOSITION);
@@ -2119,7 +2123,10 @@
truncate-lines is on and PT is beyond right margin.
Don't go back if the overshoot is expected (see above). */
if (IT_CHARPOS (it) > it_start && XINT (lines) > 0
- && !it_overshoot_expected_p)
+ && (!it_overshoot_expected
+ || (it_overshoot_expected < 0
+ && it.method == GET_FROM_BUFFER
+ && it.c == '\n')))
move_it_by_lines (&it, -1, 0);
it.vpos = 0;
- [Emacs-diffs] Changes to emacs/src/indent.c,v,
Kim F. Storm <=