summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index a3ac208a..20c0370a 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -3348,6 +3348,18 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
3348 d->contextLink->linkId) }); 3348 d->contextLink->linkId) });
3349 } 3349 }
3350 } 3350 }
3351 if (equalCase_Rangecc(scheme, "file")) {
3352 /* Local files may be deleted. */
3353 pushBack_Array(
3354 &items,
3355 &(iMenuItem){ delete_Icon " " uiTextCaution_ColorEscape
3356 " ${link.file.delete}",
3357 0,
3358 0,
3359 format_CStr("!file.delete confirm:1 path:%s",
3360 cstrCollect_String(
3361 localFilePathFromUrl_String(linkUrl))) });
3362 }
3351 } 3363 }
3352 else if (deviceType_App() == desktop_AppDeviceType) { 3364 else if (deviceType_App() == desktop_AppDeviceType) {
3353 if (!isEmpty_Range(&d->selectMark)) { 3365 if (!isEmpty_Range(&d->selectMark)) {
@@ -4484,7 +4496,7 @@ static void draw_DocumentWidget_(const iDocumentWidget *d) {
4484 /* Text markers. */ 4496 /* Text markers. */
4485 const iBool isTouchSelecting = (flags_Widget(w) & touchDrag_WidgetFlag) != 0; 4497 const iBool isTouchSelecting = (flags_Widget(w) & touchDrag_WidgetFlag) != 0;
4486 if (!isEmpty_Range(&d->foundMark) || !isEmpty_Range(&d->selectMark)) { 4498 if (!isEmpty_Range(&d->foundMark) || !isEmpty_Range(&d->selectMark)) {
4487 SDL_Renderer *render = renderer_Window(get_Window()); 4499 SDL_Renderer *render = renderer_Window(get_Window());
4488 ctx.firstMarkRect = zero_Rect(); 4500 ctx.firstMarkRect = zero_Rect();
4489 ctx.lastMarkRect = zero_Rect(); 4501 ctx.lastMarkRect = zero_Rect();
4490 SDL_SetRenderDrawBlendMode(render, 4502 SDL_SetRenderDrawBlendMode(render,