# HG changeset patch # User Richard M. Stallman # Date 894594502 0 # Node ID e244c4d9b0ca0db8215c1d7019f0b7121eefd1f2 # Parent 3a95abf581d715413aa0668c275c5638f338de15 (compute_motion): Undo both May 7 changes. diff -r 3a95abf581d7 -r e244c4d9b0ca src/indent.c --- a/src/indent.c Fri May 08 02:20:38 1998 +0000 +++ b/src/indent.c Fri May 08 02:28:22 1998 +0000 @@ -1223,9 +1223,7 @@ } /* Stop if past the target buffer position or screen position. */ - if (pos > to - || vpos > tovpos - || vpos == tovpos && tohpos >= 0 && hpos > tohpos) + if (pos > to) { /* Go back to the previous position. */ pos = prev_pos; @@ -1258,6 +1256,24 @@ break; } + if (vpos > tovpos || vpos == tovpos && hpos >= tohpos) + { + if (contin_hpos && prev_hpos == 0 + && ((hpos > tohpos && contin_hpos == width) + || (wide_column_end_hpos > width))) + { /* Line breaks because we can't put the character at the + previous line any more. It is not the multi-column + character continued in middle. Go back to previous + buffer position, screen position, and set tab offset + to previous value. It's the beginning of the + line. */ + pos = prev_pos; + pos_byte = prev_pos_byte; + hpos = prev_hpos; + tab_offset = prev_tab_offset; + } + break; + } if (pos == ZV) /* We cannot go beyond ZV. Stop here. */ break;