summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-28 11:49:23 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-28 11:49:23 +0200
commit0ccabb2c8e0e894be520c621bca8023a6d5de2e2 (patch)
tree9d74b83793e31adac34ccd88b32b0eabe79d9547 /src
parentb6d0231a53abe3be35f71aa73ddda8654835833f (diff)
DocumentWidget: Markers disappear when scrolling
IssueID #46
Diffstat (limited to 'src')
-rw-r--r--src/ui/documentwidget.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index c82e823d..4de25b58 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -2840,6 +2840,19 @@ static void draw_DocumentWidget_(const iDocumentWidget *d) {
2840 isDark_ColorTheme(colorTheme_App()) ? SDL_BLENDMODE_ADD 2840 isDark_ColorTheme(colorTheme_App()) ? SDL_BLENDMODE_ADD
2841 : SDL_BLENDMODE_BLEND); 2841 : SDL_BLENDMODE_BLEND);
2842 ctx.viewPos = topLeft_Rect(docBounds); 2842 ctx.viewPos = topLeft_Rect(docBounds);
2843 /* Marker starting outside the visible range? */
2844 if (d->firstVisibleRun) {
2845 if (!isEmpty_Range(&d->selectMark) &&
2846 d->selectMark.start < d->firstVisibleRun->text.start &&
2847 d->selectMark.end > d->firstVisibleRun->text.start) {
2848 ctx.inSelectMark = iTrue;
2849 }
2850 if (isEmpty_Range(&d->foundMark) &&
2851 d->foundMark.start < d->firstVisibleRun->text.start &&
2852 d->foundMark.end > d->firstVisibleRun->text.start) {
2853 ctx.inFoundMark = iTrue;
2854 }
2855 }
2843 render_GmDocument(d->doc, vis, drawMark_DrawContext_, &ctx); 2856 render_GmDocument(d->doc, vis, drawMark_DrawContext_, &ctx);
2844 SDL_SetRenderDrawBlendMode(renderer_Window(get_Window()), SDL_BLENDMODE_NONE); 2857 SDL_SetRenderDrawBlendMode(renderer_Window(get_Window()), SDL_BLENDMODE_NONE);
2845 } 2858 }