emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 b544ab5: Fix return value of vertical-motion at Z


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-24 b544ab5: Fix return value of vertical-motion at ZV (Bug#19553)
Date: Sat, 10 Jan 2015 13:05:14 +0000

branch: emacs-24
commit b544ab561fcb575790c963a2eda51524fa366409
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Fix return value of vertical-motion at ZV  (Bug#19553)
    
     src/indent.c (Fvertical_motion): Return zero if we started from ZV
     and there's an overlay after-string there.
---
 src/ChangeLog |    5 +++++
 src/indent.c  |    7 ++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 49152c8..6296302 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-10  Eli Zaretskii  <address@hidden>
+
+       * indent.c (Fvertical_motion): Return zero if we started from ZV
+       and there's an overlay after-string there.  (Bug#19553)
+
 2015-01-09  Eli Zaretskii  <address@hidden>
 
        * emacs.c (usage_message): Fix the description of the -nl switch.
diff --git a/src/indent.c b/src/indent.c
index 8b6ecd1..cadafcf 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2137,10 +2137,15 @@ whether or not it is currently displayed in some 
window.  */)
              if (nlines > 1)
                move_it_by_lines (&it, min (PTRDIFF_MAX, nlines - 1));
            }
-         else
+         else  /* it_start = ZV */
            {
              it.vpos = 0;
              move_it_by_lines (&it, min (PTRDIFF_MAX, nlines));
+             /* We could have some display or overlay string at ZV,
+                in which case it.vpos will be nonzero now, while
+                actually we didn't move vertically at all.  */
+             if (IT_CHARPOS (it) == CHARPOS (pt) && CHARPOS (pt) == it_start)
+               it.vpos = 0;
            }
        }
 



reply via email to

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