]> git.eshelyaron.com Git - emacs.git/commitdiff
(try_cursor_movement): Fix handling of cursor in
authorGerd Moellmann <gerd@gnu.org>
Fri, 11 Aug 2000 13:01:28 +0000 (13:01 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 11 Aug 2000 13:01:28 +0000 (13:01 +0000)
partially visible line which is smaller than the window's
height.

src/ChangeLog
src/xdisp.c

index bd188fe670fb0d6715abaa9bab2f4ed2ee0f3f41..5d6e8ba61e17f8478b396b72047fd0b1cf03bc7f 100644 (file)
@@ -1,3 +1,14 @@
+2000-08-11  Gerd Moellmann  <gerd@gnu.org>
+
+       * fns.c (hashfn_eq, hashfn_eql): Don't handle strings specially
+       since they aren't relocated anymore.
+       (sxhash_string): Make sure returned hash code fits in a Lisp
+       integer.
+
+       * xdisp.c (try_cursor_movement): Fix handling of cursor in
+       partially visible line which is smaller than the window's
+       height.
+
 2000-08-11  Kenichi Handa  <handa@etl.go.jp>
 
        * ccl.c (CCL_READ_CHAR): If source is multibyte, pay attention to
index 9a52e1f2a35f056e6a5b143812a96e765f193bef..c27876623a1cd24ea1ef776b48f7ea9abce16b45 100644 (file)
@@ -8950,14 +8950,23 @@ try_cursor_movement (window, startp, scroll_step)
              /* if PT is not in the glyph row, give up.  */
              rc = -1;
            }
-         else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (row)
-                  && window_box_height (w) > row->height)
+         else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (row))
            {
              /* If we end up in a partially visible line, let's make it
                 fully visible, except when it's taller than the window,
                 in which case we can't do much about it.  */
-             *scroll_step = 1;
-             rc = -1;
+             if (row->height > window_box_height (w))
+               {
+                 *scroll_step = 1;
+                 rc = -1;
+               }
+             else
+               {
+                 set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
+                 try_window (window, startp);
+                 make_cursor_line_fully_visible (w);
+                 rc = 1;
+               }
            }
          else if (scroll_p)
            rc = -1;