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.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/plugins/text_viewer/tv_action.c b/apps/plugins/text_viewer/tv_action.c
index 1f2ad78666..53a29ef021 100644
--- a/apps/plugins/text_viewer/tv_action.c
+++ b/apps/plugins/text_viewer/tv_action.c
@@ -173,11 +173,16 @@ enum tv_menu_result tv_menu(void)
173 173
174 res = tv_display_menu(); 174 res = tv_display_menu();
175 175
176 tv_convert_fpos(cur_file_pos, &cur_pos); 176 if (res == TV_MENU_RESULT_EXIT_MENU)
177 if (prefs->vertical_scroll_mode == PAGE) 177 {
178 cur_pos.line = 0; 178 tv_convert_fpos(cur_file_pos, &cur_pos);
179 if (prefs->vertical_scroll_mode == PAGE)
180 cur_pos.line = 0;
179 181
180 tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET); 182 tv_move_screen(cur_pos.page, cur_pos.line, SEEK_SET);
183 }
184 else if (res == TV_MENU_RESULT_MOVE_PAGE)
185 res = TV_MENU_RESULT_EXIT_MENU;
181 186
182 return res; 187 return res;
183} 188}