emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r107481: Fix bug #10902 with cursor p


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107481: Fix bug #10902 with cursor positioning at EOB.
Date: Fri, 02 Mar 2012 13:35:51 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107481
fixes bug(s): http://debbugs.gnu.org/10902
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2012-03-02 13:35:51 +0200
message:
  Fix bug #10902 with cursor positioning at EOB.
  
   src/xdisp.c (try_window_reusing_current_matrix): Don't move cursor
   position past the first glyph_row that ends at ZV.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-03-02 02:57:19 +0000
+++ b/src/ChangeLog     2012-03-02 11:35:51 +0000
@@ -1,3 +1,8 @@
+2012-03-02  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
+       position past the first glyph_row that ends at ZV.  (Bug#10902)
+
 2012-03-02  Glenn Morris  <address@hidden>
 
        * buffer.c (buffer-list-update-hook): Doc fix.

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-02-29 17:50:24 +0000
+++ b/src/xdisp.c       2012-03-02 11:35:51 +0000
@@ -16322,7 +16322,10 @@
           ++first_row_to_display)
        {
          if (PT >= MATRIX_ROW_START_CHARPOS (first_row_to_display)
-             && PT < MATRIX_ROW_END_CHARPOS (first_row_to_display))
+             && (PT < MATRIX_ROW_END_CHARPOS (first_row_to_display)
+                 || (PT == MATRIX_ROW_END_CHARPOS (first_row_to_display)
+                     && first_row_to_display->ends_at_zv_p
+                     && pt_row == NULL)))
            pt_row = first_row_to_display;
        }
 
@@ -16414,7 +16417,9 @@
       if (pt_row)
        {
          for (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos);
-              row < bottom_row && PT >= MATRIX_ROW_END_CHARPOS (row);
+              row < bottom_row
+                && PT >= MATRIX_ROW_END_CHARPOS (row)
+                && !row->ends_at_zv_p;
               row++)
            {
              w->cursor.vpos++;


reply via email to

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