summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1992-04-18 16:01:05 +0000
committerRichard M. Stallman <rms@gnu.org>1992-04-18 16:01:05 +0000
commit0c93770b96596d283859d5229c5937a98d1bc7b2 (patch)
tree0edf2ea0a6cee1e4bdcb4f795db0eeed613c2859
parentc362f2be4149b6db5fca8c8f988baab7c256d856 (diff)
downloademacs-0c93770b96596d283859d5229c5937a98d1bc7b2.tar.gz
*** empty log message ***
-rw-r--r--src/indent.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/indent.c b/src/indent.c
index 977383d3b40..50536120d8b 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -461,7 +461,7 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
{
while (++pos < to && FETCH_CHAR (pos) != '\n');
}
- while (selective > 0 && position_indentation (pos + 1) >= selective);
+ while (pos < to && position_indentation (pos + 1) >= selective);
pos--;
/* Allow for the " ..." that is displayed for them. */
if (selective_rlen)
@@ -470,16 +470,17 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
if (hpos >= width)
hpos = width;
}
+ /* We have skipped the invis text, but not the newline after. */
}
else
{
/* A visible line. */
vpos++;
hpos = 0;
+ hpos -= hscroll;
+ if (hscroll > 0) hpos++; /* Count the ! on column 0 */
+ tab_offset = 0;
}
- hpos -= hscroll;
- if (hscroll > 0) hpos++; /* Count the ! on column 0 */
- tab_offset = 0;
}
else if (c == CR && selective < 0)
{
@@ -518,6 +519,7 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
/* Truncating: skip to newline. */
while (pos < to && FETCH_CHAR (pos) != '\n') pos++;
pos--;
+ hpos = width;
}
else
{