diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/viewer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index dcd49f806d..9ebc1d9cf6 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -1565,7 +1565,7 @@ static void viewer_draw(int col) | |||
1565 | /* display on screen the displayed part of the line */ | 1565 | /* display on screen the displayed part of the line */ |
1566 | if (col != -1) | 1566 | if (col != -1) |
1567 | { | 1567 | { |
1568 | bool in_page = (cline+i > display_lines); | 1568 | bool in_page = (cline+i <= display_lines); |
1569 | int dpage = cpage + (in_page ? 0 : 1); | 1569 | int dpage = cpage + (in_page ? 0 : 1); |
1570 | int dline = cline + i - (in_page ? 0 : display_lines); | 1570 | int dline = cline + i - (in_page ? 0 : display_lines); |
1571 | bool bflag = (viewer_find_bookmark(dpage, dline) >= 0); | 1571 | bool bflag = (viewer_find_bookmark(dpage, dline) >= 0); |
@@ -2595,6 +2595,7 @@ static void calc_page(void) | |||
2595 | fill_buffer(file_pos, buffer, buffer_size); | 2595 | fill_buffer(file_pos, buffer, buffer_size); |
2596 | line_end = line_begin = buffer; | 2596 | line_end = line_begin = buffer; |
2597 | 2597 | ||
2598 | /* update page and line of all bookmark */ | ||
2598 | for (i = 0; i < bookmark_count; i++) | 2599 | for (i = 0; i < bookmark_count; i++) |
2599 | { | 2600 | { |
2600 | sfp = bookmarks[i].file_position; | 2601 | sfp = bookmarks[i].file_position; |
@@ -3249,17 +3250,17 @@ enum plugin_status plugin_start(const void* file) | |||
3249 | if (idx < 0) | 3250 | if (idx < 0) |
3250 | { | 3251 | { |
3251 | if (bookmark_count >= MAX_BOOKMARKS-1) | 3252 | if (bookmark_count >= MAX_BOOKMARKS-1) |
3252 | rb->splash(HZ/2, "No more add bookmark."); | 3253 | rb->splash(HZ/2, "No more bookmarks"); |
3253 | else | 3254 | else |
3254 | { | 3255 | { |
3255 | viewer_add_bookmark(); | 3256 | viewer_add_bookmark(); |
3256 | rb->splash(HZ/2, "Bookmark add."); | 3257 | rb->splash(HZ/2, "Bookmark added"); |
3257 | } | 3258 | } |
3258 | } | 3259 | } |
3259 | else | 3260 | else |
3260 | { | 3261 | { |
3261 | viewer_remove_bookmark(idx); | 3262 | viewer_remove_bookmark(idx); |
3262 | rb->splash(HZ/2, "Bookmark remove."); | 3263 | rb->splash(HZ/2, "Bookmark removed"); |
3263 | } | 3264 | } |
3264 | viewer_draw(col); | 3265 | viewer_draw(col); |
3265 | } | 3266 | } |