summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/tv_action.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/text_viewer/tv_action.c')
-rw-r--r--apps/plugins/text_viewer/tv_action.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/text_viewer/tv_action.c b/apps/plugins/text_viewer/tv_action.c
index fb7fdb40e6..1f2ad78666 100644
--- a/apps/plugins/text_viewer/tv_action.c
+++ b/apps/plugins/text_viewer/tv_action.c
@@ -89,7 +89,7 @@ void tv_scroll_up(enum tv_vertical_scroll_mode mode)
89 int offset_line = -1; 89 int offset_line = -1;
90 90
91 if ((mode == TV_VERTICAL_SCROLL_PAGE) || 91 if ((mode == TV_VERTICAL_SCROLL_PAGE) ||
92 (mode == TV_VERTICAL_SCROLL_PREFS && prefs->scroll_mode == PAGE)) 92 (mode == TV_VERTICAL_SCROLL_PREFS && prefs->vertical_scroll_mode == PAGE))
93 { 93 {
94 offset_page--; 94 offset_page--;
95#ifdef HAVE_LCD_BITMAP 95#ifdef HAVE_LCD_BITMAP
@@ -105,7 +105,7 @@ void tv_scroll_down(enum tv_vertical_scroll_mode mode)
105 int offset_line = 1; 105 int offset_line = 1;
106 106
107 if ((mode == TV_VERTICAL_SCROLL_PAGE) || 107 if ((mode == TV_VERTICAL_SCROLL_PAGE) ||
108 (mode == TV_VERTICAL_SCROLL_PREFS && prefs->scroll_mode == PAGE)) 108 (mode == TV_VERTICAL_SCROLL_PREFS && prefs->vertical_scroll_mode == PAGE))
109 { 109 {
110 offset_page++; 110 offset_page++;
111#ifdef HAVE_LCD_BITMAP 111#ifdef HAVE_LCD_BITMAP
@@ -120,7 +120,8 @@ void tv_scroll_left(enum tv_horizontal_scroll_mode mode)
120 int offset_window = 0; 120 int offset_window = 0;
121 int offset_column = 0; 121 int offset_column = 0;
122 122
123 if (mode == TV_HORIZONTAL_SCROLL_COLUMN) 123 if ((mode == TV_HORIZONTAL_SCROLL_COLUMN) ||
124 (mode == TV_HORIZONTAL_SCROLL_PREFS && prefs->horizontal_scroll_mode == COLUMN))
124 { 125 {
125 /* Scroll left one column */ 126 /* Scroll left one column */
126 offset_column--; 127 offset_column--;
@@ -138,7 +139,8 @@ void tv_scroll_right(enum tv_horizontal_scroll_mode mode)
138 int offset_window = 0; 139 int offset_window = 0;
139 int offset_column = 0; 140 int offset_column = 0;
140 141
141 if (mode == TV_HORIZONTAL_SCROLL_COLUMN) 142 if ((mode == TV_HORIZONTAL_SCROLL_COLUMN) ||
143 (mode == TV_HORIZONTAL_SCROLL_PREFS && prefs->horizontal_scroll_mode == COLUMN))
142 { 144 {
143 /* Scroll right one column */ 145 /* Scroll right one column */
144 offset_column++; 146 offset_column++;
@@ -159,7 +161,7 @@ void tv_top(void)
159void tv_bottom(void) 161void tv_bottom(void)
160{ 162{
161 tv_move_screen(0, 0, SEEK_END); 163 tv_move_screen(0, 0, SEEK_END);
162 if (prefs->scroll_mode == PAGE) 164 if (prefs->vertical_scroll_mode == PAGE)
163 tv_move_screen(0, -tv_get_screen_pos()->line, SEEK_CUR); 165 tv_move_screen(0, -tv_get_screen_pos()->line, SEEK_CUR);
164} 166}
165 167
@@ -172,7 +174,7 @@ enum tv_menu_result tv_menu(void)
172 res = tv_display_menu(); 174 res = tv_display_menu();
173 175
174 tv_convert_fpos(cur_file_pos, &cur_pos); 176 tv_convert_fpos(cur_file_pos, &cur_pos);
175 if (prefs->scroll_mode == PAGE) 177 if (prefs->vertical_scroll_mode == PAGE)
176 cur_pos.line = 0; 178 cur_pos.line = 0;
177 179
178 tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET); 180 tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET);