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. --- 17 unchanged lines hidden (view full) --- 26 27/* 28 * Jump to the end of the file. 29 */ 30 public void 31jump_forw() 32{ 33 POSITION pos; |
34 POSITION end_pos; |
35 36 if (ch_end_seek()) 37 { 38 error("Cannot seek to end of file", NULL_PARG); 39 return; 40 } 41 /* 42 * Position the last line in the file at the last screen line. 43 * Go back one line from the end of the file 44 * to get to the beginning of the last line. 45 */ |
46 pos_clear(); 47 end_pos = ch_tell(); 48 pos = back_line(end_pos); |
49 if (pos == NULL_POSITION) 50 jump_loc((POSITION)0, sc_height-1); 51 else |
52 { |
53 jump_loc(pos, sc_height-1); |
54 if (position(sc_height-1) != end_pos) 55 repaint(); 56 } |
57} 58 59/* 60 * Jump to line n in the file. 61 */ 62 public void 63jump_back(linenum) 64 LINENUM linenum; --- 235 unchanged lines hidden --- |