Deleted Added
sdiff udiff text old ( 161475 ) new ( 170256 )
full compact
1/*
2 * Copyright (C) 1984-2007 Mark Nudelman
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information about less, or for information on how to
8 * contact the author, see the README file.
9 */
10

--- 86 unchanged lines hidden (view full) ---

97 pos_clear();
98 jump_loc(scrpos.pos, scrpos.ln);
99}
100
101/*
102 * Jump to a specified percentage into the file.
103 */
104 public void
105jump_percent(percent, fraction)
106 int percent;
107 long fraction;
108{
109 POSITION pos, len;
110
111 /*
112 * Determine the position in the file
113 * (the specified percentage of the file's length).
114 */
115 if ((len = ch_length()) == NULL_POSITION)
116 {
117 ierror("Determining length of file", NULL_PARG);
118 ch_end_seek();
119 }
120 if ((len = ch_length()) == NULL_POSITION)
121 {
122 error("Don't know length of file", NULL_PARG);
123 return;
124 }
125 pos = percent_pos(len, percent, fraction);
126 if (pos >= len)
127 pos = len-1;
128
129 jump_line_loc(pos, jump_sline);
130}
131
132/*
133 * Jump to a specified position in the file.

--- 142 unchanged lines hidden (view full) ---

276 */
277 back(nline+1, tpos, 1, 0);
278 if (show_attn)
279 repaint_hilite(1);
280 return;
281 }
282 }
283 lastmark();
284 if (!top_scroll)
285 clear();
286 else
287 home();
288 screen_trashed = 0;
289 add_back_pos(pos);
290 back(sc_height-1, pos, 1, 0);
291 }
292}