]> git.eshelyaron.com Git - emacs.git/commitdiff
(display_text_line): Handle the case of point being in
authorRichard M. Stallman <rms@gnu.org>
Thu, 17 Jul 1997 06:29:36 +0000 (06:29 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 17 Jul 1997 06:29:36 +0000 (06:29 +0000)
the invisible part of the line beyond the left margin.

src/xdisp.c

index d7c0bfe34bc3f9cb4da56167ea6afad7d11f3e40..8b41cf9717d2b1641671c282a3aa4516f684f103 100644 (file)
@@ -2993,6 +2993,16 @@ display_text_line (w, start, vpos, hpos, taboffset, ovstr_done)
   next_boundary = pos;
   p1prev = p1;
   prevpos = pos;
+
+  /* If the window is hscrolled and point is in the invisible part of the
+     current line beyond the left margin we can record the cursor location
+     right away.  */
+  if (hscroll && start <= PT && PT < pos && cursor_vpos < 0)
+    {
+      cursor_vpos = vpos;
+      cursor_hpos = p1 - leftmargin;
+    }
+
   while (p1 < endp)
     {
       if (pos >= pause)