diff options
| author | Karl Heuer | 1994-04-05 23:49:15 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-04-05 23:49:15 +0000 |
| commit | e37f06d7db86fad8daff7b1cba12dda2199556a6 (patch) | |
| tree | c051be4ddbc83402d5869d478d06bb7dc82fffd7 /src | |
| parent | 88af3af464269760aa7bb6975681cdfbde9e27e1 (diff) | |
| download | emacs-e37f06d7db86fad8daff7b1cba12dda2199556a6.tar.gz emacs-e37f06d7db86fad8daff7b1cba12dda2199556a6.zip | |
Add window argument on calls to compute_motion.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 2 | ||||
| -rw-r--r-- | src/window.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 23 |
3 files changed, 14 insertions, 13 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index dc109883b53..dbc8f59e7b3 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -1460,7 +1460,7 @@ buffer_posn_from_coords (window, col, line) | |||
| 1460 | ? minibuf_prompt_width : 0) | 1460 | ? minibuf_prompt_width : 0) |
| 1461 | + (hscroll ? 1 - hscroll : 0), | 1461 | + (hscroll ? 1 - hscroll : 0), |
| 1462 | ZV, line, col, | 1462 | ZV, line, col, |
| 1463 | window_width, hscroll, 0); | 1463 | window_width, hscroll, 0, window); |
| 1464 | 1464 | ||
| 1465 | current_buffer = old_current_buffer; | 1465 | current_buffer = old_current_buffer; |
| 1466 | 1466 | ||
diff --git a/src/window.c b/src/window.c index b253f7d612c..834d3784d6b 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -223,7 +223,7 @@ POS defaults to point; WINDOW, to the selected window.") | |||
| 223 | posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0), | 223 | posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0), |
| 224 | posint, height, 0, | 224 | posint, height, 0, |
| 225 | window_internal_width (w) - 1, | 225 | window_internal_width (w) - 1, |
| 226 | hscroll, 0); | 226 | hscroll, 0, w); |
| 227 | 227 | ||
| 228 | return posval.vpos < height ? Qt : Qnil; | 228 | return posval.vpos < height ? Qt : Qnil; |
| 229 | } | 229 | } |
diff --git a/src/xdisp.c b/src/xdisp.c index 894b46ff540..49d74cecf3c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -677,7 +677,7 @@ redisplay () | |||
| 677 | point, 2, - (1 << (SHORTBITS - 1)), | 677 | point, 2, - (1 << (SHORTBITS - 1)), |
| 678 | window_internal_width (w) - 1, | 678 | window_internal_width (w) - 1, |
| 679 | XINT (w->hscroll), | 679 | XINT (w->hscroll), |
| 680 | pos_tab_offset (w, tlbufpos)); | 680 | pos_tab_offset (w, tlbufpos), w); |
| 681 | if (pos.vpos < 1) | 681 | if (pos.vpos < 1) |
| 682 | { | 682 | { |
| 683 | FRAME_CURSOR_X (selected_frame) | 683 | FRAME_CURSOR_X (selected_frame) |
| @@ -1143,7 +1143,7 @@ redisplay_window (window, just_this_one) | |||
| 1143 | (hscroll ? 1 - hscroll : 0), | 1143 | (hscroll ? 1 - hscroll : 0), |
| 1144 | ZV, height / 2, | 1144 | ZV, height / 2, |
| 1145 | - (1 << (SHORTBITS - 1)), | 1145 | - (1 << (SHORTBITS - 1)), |
| 1146 | width, hscroll, pos_tab_offset (w, startp)); | 1146 | width, hscroll, pos_tab_offset (w, startp), w); |
| 1147 | SET_PT (pos.bufpos); | 1147 | SET_PT (pos.bufpos); |
| 1148 | if (w != XWINDOW (selected_window)) | 1148 | if (w != XWINDOW (selected_window)) |
| 1149 | Fset_marker (w->pointm, make_number (point), Qnil); | 1149 | Fset_marker (w->pointm, make_number (point), Qnil); |
| @@ -1178,7 +1178,7 @@ redisplay_window (window, just_this_one) | |||
| 1178 | { | 1178 | { |
| 1179 | pos = *compute_motion (startp, 0, (hscroll ? 1 - hscroll : 0), | 1179 | pos = *compute_motion (startp, 0, (hscroll ? 1 - hscroll : 0), |
| 1180 | point, height + 1, 10000, width, hscroll, | 1180 | point, height + 1, 10000, width, hscroll, |
| 1181 | pos_tab_offset (w, startp)); | 1181 | pos_tab_offset (w, startp), w); |
| 1182 | 1182 | ||
| 1183 | if (pos.vpos < height) | 1183 | if (pos.vpos < height) |
| 1184 | { | 1184 | { |
| @@ -1467,7 +1467,7 @@ try_window_id (window) | |||
| 1467 | /* Find position before which nothing is changed. */ | 1467 | /* Find position before which nothing is changed. */ |
| 1468 | bp = *compute_motion (start, 0, lmargin, | 1468 | bp = *compute_motion (start, 0, lmargin, |
| 1469 | min (ZV, beg_unchanged + BEG), height + 1, 0, | 1469 | min (ZV, beg_unchanged + BEG), height + 1, 0, |
| 1470 | width, hscroll, pos_tab_offset (w, start)); | 1470 | width, hscroll, pos_tab_offset (w, start), w); |
| 1471 | if (bp.vpos >= height) | 1471 | if (bp.vpos >= height) |
| 1472 | { | 1472 | { |
| 1473 | if (point < bp.bufpos && !bp.contin) | 1473 | if (point < bp.bufpos && !bp.contin) |
| @@ -1478,7 +1478,7 @@ try_window_id (window) | |||
| 1478 | any change in buffer size. */ | 1478 | any change in buffer size. */ |
| 1479 | bp = *compute_motion (start, 0, lmargin, | 1479 | bp = *compute_motion (start, 0, lmargin, |
| 1480 | Z, height, 0, | 1480 | Z, height, 0, |
| 1481 | width, hscroll, pos_tab_offset (w, start)); | 1481 | width, hscroll, pos_tab_offset (w, start), w); |
| 1482 | XFASTINT (w->window_end_vpos) = height; | 1482 | XFASTINT (w->window_end_vpos) = height; |
| 1483 | XFASTINT (w->window_end_pos) = Z - bp.bufpos; | 1483 | XFASTINT (w->window_end_pos) = Z - bp.bufpos; |
| 1484 | return 1; | 1484 | return 1; |
| @@ -1526,7 +1526,7 @@ try_window_id (window) | |||
| 1526 | /* Compute the cursor position after that newline. */ | 1526 | /* Compute the cursor position after that newline. */ |
| 1527 | ep = *compute_motion (pos, vpos, val.hpos, tem, | 1527 | ep = *compute_motion (pos, vpos, val.hpos, tem, |
| 1528 | height, - (1 << (SHORTBITS - 1)), | 1528 | height, - (1 << (SHORTBITS - 1)), |
| 1529 | width, hscroll, pos_tab_offset (w, bp.bufpos)); | 1529 | width, hscroll, pos_tab_offset (w, bp.bufpos), w); |
| 1530 | 1530 | ||
| 1531 | /* If changes reach past the text available on the frame, | 1531 | /* If changes reach past the text available on the frame, |
| 1532 | just display rest of frame. */ | 1532 | just display rest of frame. */ |
| @@ -1557,7 +1557,7 @@ try_window_id (window) | |||
| 1557 | epto = pos_tab_offset (w, ep.bufpos); | 1557 | epto = pos_tab_offset (w, ep.bufpos); |
| 1558 | xp = *compute_motion (ep.bufpos, ep.vpos, ep.hpos, | 1558 | xp = *compute_motion (ep.bufpos, ep.vpos, ep.hpos, |
| 1559 | Z - XFASTINT (w->window_end_pos), | 1559 | Z - XFASTINT (w->window_end_pos), |
| 1560 | 10000, 0, width, hscroll, epto); | 1560 | 10000, 0, width, hscroll, epto, w); |
| 1561 | scroll_amount = xp.vpos - XFASTINT (w->window_end_vpos); | 1561 | scroll_amount = xp.vpos - XFASTINT (w->window_end_vpos); |
| 1562 | 1562 | ||
| 1563 | /* Is everything on frame below the changes whitespace? | 1563 | /* Is everything on frame below the changes whitespace? |
| @@ -1580,13 +1580,14 @@ try_window_id (window) | |||
| 1580 | { | 1580 | { |
| 1581 | pp = *compute_motion (ep.bufpos, ep.vpos, ep.hpos, | 1581 | pp = *compute_motion (ep.bufpos, ep.vpos, ep.hpos, |
| 1582 | point, height, - (1 << (SHORTBITS - 1)), | 1582 | point, height, - (1 << (SHORTBITS - 1)), |
| 1583 | width, hscroll, epto); | 1583 | width, hscroll, epto, w); |
| 1584 | } | 1584 | } |
| 1585 | else | 1585 | else |
| 1586 | { | 1586 | { |
| 1587 | pp = *compute_motion (xp.bufpos, xp.vpos, xp.hpos, | 1587 | pp = *compute_motion (xp.bufpos, xp.vpos, xp.hpos, |
| 1588 | point, height, - (1 << (SHORTBITS - 1)), | 1588 | point, height, - (1 << (SHORTBITS - 1)), |
| 1589 | width, hscroll, pos_tab_offset (w, xp.bufpos)); | 1589 | width, hscroll, |
| 1590 | pos_tab_offset (w, xp.bufpos), w); | ||
| 1590 | } | 1591 | } |
| 1591 | if (pp.bufpos < point || pp.vpos == height) | 1592 | if (pp.bufpos < point || pp.vpos == height) |
| 1592 | return 0; | 1593 | return 0; |
| @@ -1786,7 +1787,7 @@ try_window_id (window) | |||
| 1786 | if (cursor_vpos < 0) | 1787 | if (cursor_vpos < 0) |
| 1787 | { | 1788 | { |
| 1788 | val = *compute_motion (start, 0, lmargin, point, 10000, 10000, | 1789 | val = *compute_motion (start, 0, lmargin, point, 10000, 10000, |
| 1789 | width, hscroll, pos_tab_offset (w, start)); | 1790 | width, hscroll, pos_tab_offset (w, start), w); |
| 1790 | /* Admit failure if point is off frame now */ | 1791 | /* Admit failure if point is off frame now */ |
| 1791 | if (val.vpos >= height) | 1792 | if (val.vpos >= height) |
| 1792 | { | 1793 | { |
| @@ -1805,7 +1806,7 @@ try_window_id (window) | |||
| 1805 | { | 1806 | { |
| 1806 | val = *compute_motion (start, 0, lmargin, ZV, | 1807 | val = *compute_motion (start, 0, lmargin, ZV, |
| 1807 | height, - (1 << (SHORTBITS - 1)), | 1808 | height, - (1 << (SHORTBITS - 1)), |
| 1808 | width, hscroll, pos_tab_offset (w, start)); | 1809 | width, hscroll, pos_tab_offset (w, start), w); |
| 1809 | if (val.vpos != XFASTINT (w->window_end_vpos)) | 1810 | if (val.vpos != XFASTINT (w->window_end_vpos)) |
| 1810 | abort (); | 1811 | abort (); |
| 1811 | if (XFASTINT (w->window_end_pos) | 1812 | if (XFASTINT (w->window_end_pos) |