[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: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/src/indent.c,v |
Date: |
Sat, 12 Jul 2008 03:19:40 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/07/12 03:19:39
Index: indent.c
===================================================================
RCS file: /sources/emacs/emacs/src/indent.c,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -b -r1.209 -r1.210
--- indent.c 29 Jun 2008 13:56:50 -0000 1.209
+++ indent.c 12 Jul 2008 03:19:38 -0000 1.210
@@ -2055,12 +2055,11 @@
}
else
{
- int it_start;
- int oselective;
- int it_overshoot_expected;
+ int it_start, oselective, it_overshoot_expected, first_x;
SET_TEXT_POS (pt, PT, PT_BYTE);
start_display (&it, w, pt);
+ first_x = it.first_visible_x;
/* Scan from the start of the line containing PT. If we don't
do this, we start moving with IT->current_x == 0, while PT is
@@ -2118,11 +2117,21 @@
if (XINT (lines) >= 0 || IT_CHARPOS (it) > 0)
move_it_by_lines (&it, XINT (lines), 0);
+ /* Move to the goal column, if one was specified. */
if (!NILP (lcols))
+ {
+ /* If the window was originally hscrolled, move forward by
+ the hscrolled amount first. */
+ if (first_x > 0)
+ {
+ move_it_in_display_line (&it, ZV, first_x, MOVE_TO_X);
+ it.current_x = 0;
+ }
move_it_in_display_line
(&it, ZV,
(int)(cols * FRAME_COLUMN_WIDTH (XFRAME (w->frame)) + 0.5),
MOVE_TO_X);
+ }
SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/indent.c,v,
Chong Yidong <=