diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/documentwidget.c | 13 |
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 | } |