diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-02-01 21:56:37 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-02-01 21:56:37 +0200 |
commit | 75a409c47a48f684c117f56122f84a3d8358f0b3 (patch) | |
tree | cd457ab228455d41788076b20bf2848bcc69ddc4 /src/ui/documentwidget.c | |
parent | 943faf3214a3cb2b5fe31ca0618f1e627437412f (diff) |
DocumentWidget: "file://" pages don't warn about ANSI colors
The warnings are site-specific, and there's no site for "file://".
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 67fca410..25559890 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -2902,10 +2902,14 @@ static void addBannerWarnings_DocumentWidget_(iDocumentWidget *d) { | |||
2902 | add_Banner(d->banner, warning_BannerType, none_GmStatusCode, title, str); | 2902 | add_Banner(d->banner, warning_BannerType, none_GmStatusCode, title, str); |
2903 | } | 2903 | } |
2904 | /* Warnings related to page contents. */ | 2904 | /* Warnings related to page contents. */ |
2905 | const int dismissed = | 2905 | int dismissed = |
2906 | value_SiteSpec(collectNewRange_String(urlRoot_String(d->mod.url)), | 2906 | value_SiteSpec(collectNewRange_String(urlRoot_String(d->mod.url)), |
2907 | dismissWarnings_SiteSpecKey) | | 2907 | dismissWarnings_SiteSpecKey) | |
2908 | (!prefs_App()->warnAboutMissingGlyphs ? missingGlyphs_GmDocumentWarning : 0); | 2908 | (!prefs_App()->warnAboutMissingGlyphs ? missingGlyphs_GmDocumentWarning : 0); |
2909 | /* File pages don't allow dismissing warnings, so skip it. */ | ||
2910 | if (equalCase_Rangecc(urlScheme_String(d->mod.url), "file")) { | ||
2911 | dismissed |= ansiEscapes_GmDocumentWarning; | ||
2912 | } | ||
2909 | const int warnings = warnings_GmDocument(d->view.doc) & ~dismissed; | 2913 | const int warnings = warnings_GmDocument(d->view.doc) & ~dismissed; |
2910 | if (warnings & missingGlyphs_GmDocumentWarning) { | 2914 | if (warnings & missingGlyphs_GmDocumentWarning) { |
2911 | add_Banner(d->banner, warning_BannerType, missingGlyphs_GmStatusCode, NULL, NULL); | 2915 | add_Banner(d->banner, warning_BannerType, missingGlyphs_GmStatusCode, NULL, NULL); |