diff options
| author | Paul Eggert | 2011-04-15 00:48:51 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-15 00:48:51 -0700 |
| commit | 4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9 (patch) | |
| tree | e993b231bb5555c9c961f5d0b20d90ac76f77bbd /src/scroll.c | |
| parent | 1963a2e0bb07cc8dee6d27f972f93d9cfd7c6b2d (diff) | |
| parent | 49093f601b69d91126aefd328ee8f6bfeb797407 (diff) | |
| download | emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.tar.gz emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.zip | |
Merge from mainline.
Diffstat (limited to 'src/scroll.c')
| -rw-r--r-- | src/scroll.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/scroll.c b/src/scroll.c index fcec596daa3..ba012874460 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -882,44 +882,6 @@ scrolling_max_lines_saved (int start, int end, | |||
| 882 | return matchcount; | 882 | return matchcount; |
| 883 | } | 883 | } |
| 884 | 884 | ||
| 885 | /* Return a measure of the cost of moving the lines starting with vpos | ||
| 886 | FROM, up to but not including vpos TO, down by AMOUNT lines (AMOUNT | ||
| 887 | may be negative). */ | ||
| 888 | |||
| 889 | int | ||
| 890 | scroll_cost (FRAME_PTR frame, int from, int to, int amount) | ||
| 891 | { | ||
| 892 | /* Compute how many lines, at bottom of frame, | ||
| 893 | will not be involved in actual motion. */ | ||
| 894 | EMACS_INT limit = to; | ||
| 895 | EMACS_INT offset; | ||
| 896 | EMACS_INT height = FRAME_LINES (frame); | ||
| 897 | |||
| 898 | if (amount == 0) | ||
| 899 | return 0; | ||
| 900 | |||
| 901 | if (! FRAME_SCROLL_REGION_OK (frame)) | ||
| 902 | limit = height; | ||
| 903 | else if (amount > 0) | ||
| 904 | limit += amount; | ||
| 905 | |||
| 906 | if (amount < 0) | ||
| 907 | { | ||
| 908 | int temp = to; | ||
| 909 | to = from + amount; | ||
| 910 | from = temp + amount; | ||
| 911 | amount = - amount; | ||
| 912 | } | ||
| 913 | |||
| 914 | offset = height - limit; | ||
| 915 | |||
| 916 | return | ||
| 917 | (FRAME_INSERT_COST (frame)[offset + from] | ||
| 918 | + (amount - 1) * FRAME_INSERTN_COST (frame)[offset + from] | ||
| 919 | + FRAME_DELETE_COST (frame)[offset + to] | ||
| 920 | + (amount - 1) * FRAME_DELETEN_COST (frame)[offset + to]); | ||
| 921 | } | ||
| 922 | |||
| 923 | /* Calculate the line insertion/deletion | 885 | /* Calculate the line insertion/deletion |
| 924 | overhead and multiply factor values */ | 886 | overhead and multiply factor values */ |
| 925 | 887 | ||