summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/viewer.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index a1de3f9017..79ee3d3f78 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -827,6 +827,8 @@ static void init_need_scrollbar(void) {
827 draw_columns = need_scrollbar? display_columns-glyph_width['o'] : display_columns; 827 draw_columns = need_scrollbar? display_columns-glyph_width['o'] : display_columns;
828 par_indent_spaces = draw_columns/(5*glyph_width[' ']); 828 par_indent_spaces = draw_columns/(5*glyph_width[' ']);
829} 829}
830#else
831#define init_need_scrollbar()
830#endif 832#endif
831 833
832static bool viewer_init(void) 834static bool viewer_init(void)
@@ -885,10 +887,8 @@ static bool viewer_init(void)
885 init file_pos, buffer_end, screen_top_ptr */ 887 init file_pos, buffer_end, screen_top_ptr */
886 viewer_top(); 888 viewer_top();
887 889
888#ifdef HAVE_LCD_BITMAP
889 /* Init need_scrollbar value */ 890 /* Init need_scrollbar value */
890 init_need_scrollbar(); 891 init_need_scrollbar();
891#endif
892 892
893 return true; 893 return true;
894} 894}
@@ -935,9 +935,7 @@ static void viewer_load_settings(void)
935 line_mode = rb->atoi(prefs->line_mode); 935 line_mode = rb->atoi(prefs->line_mode);
936 view_mode = rb->atoi(prefs->view_mode); 936 view_mode = rb->atoi(prefs->view_mode);
937 937
938#ifdef HAVE_LCD_BITMAP
939 init_need_scrollbar(); 938 init_need_scrollbar();
940#endif
941 /* the following settings are safety checked 939 /* the following settings are safety checked
942 * (file may have changed on disk) 940 * (file may have changed on disk)
943 */ 941 */
@@ -1062,9 +1060,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
1062 if (++word_mode == WORD_MODES) 1060 if (++word_mode == WORD_MODES)
1063 word_mode = 0; 1061 word_mode = 0;
1064 1062
1065#ifdef HAVE_LCD_BITMAP
1066 init_need_scrollbar(); 1063 init_need_scrollbar();
1067#endif 1064
1068 viewer_draw(col); 1065 viewer_draw(col);
1069 1066
1070 rb->splash(HZ, true, "%s %s", 1067 rb->splash(HZ, true, "%s %s",
@@ -1088,9 +1085,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
1088 line_mode = 0; 1085 line_mode = 0;
1089 } 1086 }
1090 1087
1091#ifdef HAVE_LCD_BITMAP
1092 init_need_scrollbar(); 1088 init_need_scrollbar();
1093#endif 1089
1094 viewer_draw(col); 1090 viewer_draw(col);
1095 1091
1096 rb->splash(HZ, true, "%s %s", 1092 rb->splash(HZ, true, "%s %s",
@@ -1125,9 +1121,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
1125 } 1121 }
1126 ***********/ 1122 ***********/
1127 1123
1128#ifdef HAVE_LCD_BITMAP
1129 init_need_scrollbar(); 1124 init_need_scrollbar();
1130#endif 1125
1131 viewer_draw(col); 1126 viewer_draw(col);
1132 1127
1133 rb->splash(HZ, true, "%s %s", 1128 rb->splash(HZ, true, "%s %s",