diff options
| author | Richard M. Stallman | 2004-03-02 16:04:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-03-02 16:04:57 +0000 |
| commit | 357589bfb4d63468960b3300cc26d8bdeb1aa549 (patch) | |
| tree | 31c00118591438640babf63f37323d218e12e138 /src | |
| parent | 886589d149a665588f56da6dc167d7acec5dfcce (diff) | |
| download | emacs-357589bfb4d63468960b3300cc26d8bdeb1aa549.tar.gz emacs-357589bfb4d63468960b3300cc26d8bdeb1aa549.zip | |
(compute_motion): Save vpos in prev_vpos, like hpos etc.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/indent.c | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7caf4240561..48fc3e13114 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-03-02 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * indent.c (compute_motion): Save vpos in prev_vpos, like hpos etc. | ||
| 4 | |||
| 1 | 2004-03-02 Kenichi Handa <handa@m17n.org> | 5 | 2004-03-02 Kenichi Handa <handa@m17n.org> |
| 2 | 6 | ||
| 3 | * doc.c (Fsubstitute_command_keys): Fix counding bytes. | 7 | * doc.c (Fsubstitute_command_keys): Fix counding bytes. |
diff --git a/src/indent.c b/src/indent.c index 0d9fe9aaf9c..9a2ab0956e5 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1197,7 +1197,6 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1197 | = (INTEGERP (current_buffer->selective_display) | 1197 | = (INTEGERP (current_buffer->selective_display) |
| 1198 | ? XINT (current_buffer->selective_display) | 1198 | ? XINT (current_buffer->selective_display) |
| 1199 | : !NILP (current_buffer->selective_display) ? -1 : 0); | 1199 | : !NILP (current_buffer->selective_display) ? -1 : 0); |
| 1200 | int prev_hpos = 0; | ||
| 1201 | int selective_rlen | 1200 | int selective_rlen |
| 1202 | = (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp)) | 1201 | = (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp)) |
| 1203 | ? XVECTOR (DISP_INVIS_VECTOR (dp))->size : 0); | 1202 | ? XVECTOR (DISP_INVIS_VECTOR (dp))->size : 0); |
| @@ -1225,6 +1224,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1225 | int wide_column_end_hpos = 0; | 1224 | int wide_column_end_hpos = 0; |
| 1226 | int prev_pos; /* Previous buffer position. */ | 1225 | int prev_pos; /* Previous buffer position. */ |
| 1227 | int prev_pos_byte; /* Previous buffer position. */ | 1226 | int prev_pos_byte; /* Previous buffer position. */ |
| 1227 | int prev_hpos = 0; | ||
| 1228 | int prev_vpos = 0; | ||
| 1228 | int contin_hpos; /* HPOS of last column of continued line. */ | 1229 | int contin_hpos; /* HPOS of last column of continued line. */ |
| 1229 | int prev_tab_offset; /* Previous tab offset. */ | 1230 | int prev_tab_offset; /* Previous tab offset. */ |
| 1230 | 1231 | ||
| @@ -1273,6 +1274,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1273 | pos = prev_pos; | 1274 | pos = prev_pos; |
| 1274 | pos_byte = prev_pos_byte; | 1275 | pos_byte = prev_pos_byte; |
| 1275 | hpos = prev_hpos; | 1276 | hpos = prev_hpos; |
| 1277 | vpos = prev_vpos; | ||
| 1276 | tab_offset = prev_tab_offset; | 1278 | tab_offset = prev_tab_offset; |
| 1277 | } | 1279 | } |
| 1278 | break; | 1280 | break; |
| @@ -1382,6 +1384,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1382 | if (pos >= next_boundary) | 1384 | if (pos >= next_boundary) |
| 1383 | next_boundary = pos + 1; | 1385 | next_boundary = pos + 1; |
| 1384 | prev_hpos = width; | 1386 | prev_hpos = width; |
| 1387 | prev_vpos = vpos; | ||
| 1385 | prev_tab_offset = tab_offset; | 1388 | prev_tab_offset = tab_offset; |
| 1386 | } | 1389 | } |
| 1387 | } | 1390 | } |
| @@ -1414,6 +1417,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1414 | pos = prev_pos; | 1417 | pos = prev_pos; |
| 1415 | pos_byte = prev_pos_byte; | 1418 | pos_byte = prev_pos_byte; |
| 1416 | hpos = prev_hpos; | 1419 | hpos = prev_hpos; |
| 1420 | vpos = prev_vpos; | ||
| 1417 | tab_offset = prev_tab_offset; | 1421 | tab_offset = prev_tab_offset; |
| 1418 | 1422 | ||
| 1419 | /* NOTE on contin_hpos, hpos, and prev_hpos. | 1423 | /* NOTE on contin_hpos, hpos, and prev_hpos. |
| @@ -1434,10 +1438,6 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1434 | hpos = contin_hpos; | 1438 | hpos = contin_hpos; |
| 1435 | vpos = vpos - 1; | 1439 | vpos = vpos - 1; |
| 1436 | } | 1440 | } |
| 1437 | else if (c == '\n') | ||
| 1438 | /* If previous character is NEWLINE, | ||
| 1439 | set VPOS back to previous line */ | ||
| 1440 | vpos = vpos - 1; | ||
| 1441 | break; | 1441 | break; |
| 1442 | } | 1442 | } |
| 1443 | 1443 | ||
| @@ -1455,6 +1455,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1455 | pos = prev_pos; | 1455 | pos = prev_pos; |
| 1456 | pos_byte = prev_pos_byte; | 1456 | pos_byte = prev_pos_byte; |
| 1457 | hpos = prev_hpos; | 1457 | hpos = prev_hpos; |
| 1458 | vpos = prev_vpos; | ||
| 1458 | tab_offset = prev_tab_offset; | 1459 | tab_offset = prev_tab_offset; |
| 1459 | } | 1460 | } |
| 1460 | break; | 1461 | break; |
| @@ -1463,6 +1464,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1463 | break; | 1464 | break; |
| 1464 | 1465 | ||
| 1465 | prev_hpos = hpos; | 1466 | prev_hpos = hpos; |
| 1467 | prev_vpos = vpos; | ||
| 1466 | prev_pos = pos; | 1468 | prev_pos = pos; |
| 1467 | prev_pos_byte = pos_byte; | 1469 | prev_pos_byte = pos_byte; |
| 1468 | wide_column_end_hpos = 0; | 1470 | wide_column_end_hpos = 0; |