diff options
| author | Richard M. Stallman | 1998-05-08 02:28:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-08 02:28:22 +0000 |
| commit | 33fe7d20594231746cb7c0be094c2a924f8dee43 (patch) | |
| tree | d43ea70abf0c1914686fa53166d1d2d5dc05230d /src | |
| parent | 64f6f0d84bca16d4359618fd8d06512b3743766b (diff) | |
| download | emacs-33fe7d20594231746cb7c0be094c2a924f8dee43.tar.gz emacs-33fe7d20594231746cb7c0be094c2a924f8dee43.zip | |
(compute_motion): Undo both May 7 changes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/indent.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/indent.c b/src/indent.c index 8f29b9cc24f..639cfdae818 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1223,9 +1223,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1223 | } | 1223 | } |
| 1224 | 1224 | ||
| 1225 | /* Stop if past the target buffer position or screen position. */ | 1225 | /* Stop if past the target buffer position or screen position. */ |
| 1226 | if (pos > to | 1226 | if (pos > to) |
| 1227 | || vpos > tovpos | ||
| 1228 | || vpos == tovpos && tohpos >= 0 && hpos > tohpos) | ||
| 1229 | { | 1227 | { |
| 1230 | /* Go back to the previous position. */ | 1228 | /* Go back to the previous position. */ |
| 1231 | pos = prev_pos; | 1229 | pos = prev_pos; |
| @@ -1258,6 +1256,24 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1258 | break; | 1256 | break; |
| 1259 | } | 1257 | } |
| 1260 | 1258 | ||
| 1259 | if (vpos > tovpos || vpos == tovpos && hpos >= tohpos) | ||
| 1260 | { | ||
| 1261 | if (contin_hpos && prev_hpos == 0 | ||
| 1262 | && ((hpos > tohpos && contin_hpos == width) | ||
| 1263 | || (wide_column_end_hpos > width))) | ||
| 1264 | { /* Line breaks because we can't put the character at the | ||
| 1265 | previous line any more. It is not the multi-column | ||
| 1266 | character continued in middle. Go back to previous | ||
| 1267 | buffer position, screen position, and set tab offset | ||
| 1268 | to previous value. It's the beginning of the | ||
| 1269 | line. */ | ||
| 1270 | pos = prev_pos; | ||
| 1271 | pos_byte = prev_pos_byte; | ||
| 1272 | hpos = prev_hpos; | ||
| 1273 | tab_offset = prev_tab_offset; | ||
| 1274 | } | ||
| 1275 | break; | ||
| 1276 | } | ||
| 1261 | if (pos == ZV) /* We cannot go beyond ZV. Stop here. */ | 1277 | if (pos == ZV) /* We cannot go beyond ZV. Stop here. */ |
| 1262 | break; | 1278 | break; |
| 1263 | 1279 | ||