Changeset d574d61
- Timestamp:
- Sep 18, 2010, 5:07:39 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- fa23002
- Parents:
- 9eb38bb
- git-author:
- David Benjamin <davidben@mit.edu> (08/01/10 14:50:27)
- git-committer:
- David Benjamin <davidben@mit.edu> (09/18/10 17:07:39)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
viewwin.c
r9eb38bb rd574d61 116 116 } 117 117 118 void owl_viewwin_pagedown(owl_viewwin *v) 119 { 120 int winlines; 121 owl_window_get_position(v->window, &winlines, 0, 0, 0); 122 v->topline+=winlines - BOTTOM_OFFSET; 118 void owl_viewwin_down(owl_viewwin *v, int amount) { 119 int winlines; 120 owl_window_get_position(v->window, &winlines, 0, 0, 0); 121 v->topline += amount; 123 122 if ( (v->topline+winlines-BOTTOM_OFFSET) > v->textlines) { 124 123 v->topline = v->textlines - winlines + BOTTOM_OFFSET; … … 127 126 } 128 127 128 void owl_viewwin_up(owl_viewwin *v, int amount) 129 { 130 v->topline -= amount; 131 if (v->topline<0) v->topline=0; 132 owl_viewwin_dirty(v); 133 } 134 135 void owl_viewwin_pagedown(owl_viewwin *v) 136 { 137 int winlines; 138 owl_window_get_position(v->window, &winlines, 0, 0, 0); 139 owl_viewwin_down(v, winlines - BOTTOM_OFFSET); 140 } 141 129 142 void owl_viewwin_linedown(owl_viewwin *v) 130 143 { 131 int winlines; 132 owl_window_get_position(v->window, &winlines, 0, 0, 0); 133 v->topline++; 134 if ( (v->topline+winlines-BOTTOM_OFFSET) > v->textlines) { 135 v->topline = v->textlines - winlines + BOTTOM_OFFSET; 136 } 137 owl_viewwin_dirty(v); 144 owl_viewwin_down(v, 1); 138 145 } 139 146 … … 142 149 int winlines; 143 150 owl_window_get_position(v->window, &winlines, 0, 0, 0); 144 v->topline-=winlines; 145 if (v->topline<0) v->topline=0; 146 owl_viewwin_dirty(v); 147 151 owl_viewwin_up(v, winlines - BOTTOM_OFFSET); 148 152 } 149 153 150 154 void owl_viewwin_lineup(owl_viewwin *v) 151 155 { 152 v->topline--; 153 if (v->topline<0) v->topline=0; 154 owl_viewwin_dirty(v); 156 owl_viewwin_up(v, 1); 155 157 } 156 158
Note: See TracChangeset
for help on using the changeset viewer.