summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-11-03 18:12:45 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-11-03 18:12:45 +0200
commit8913f836cba97fdd509314456eca9fb0df7aa035 (patch)
treeab09a9de3d75920687f1f12b576870b34f2b976b /src/ui/documentwidget.c
parentdb0f86a18a97fc719a1d7afbb971bf63594d0829 (diff)
parente84188ee0e03d60b9cd20df72ac10701dedae9e6 (diff)
Merge branch 'dev' of skyjake.fi:gemini/lagrange into dev
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 79bfea7b..8c24d4a9 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1702,6 +1702,7 @@ static void updateDocument_DocumentWidget_(iDocumentWidget *d,
1702 } 1702 }
1703 if (cachedDoc) { 1703 if (cachedDoc) {
1704 replaceDocument_DocumentWidget_(d, cachedDoc); 1704 replaceDocument_DocumentWidget_(d, cachedDoc);
1705 updateWidth_GmDocument(d->doc, documentWidth_DocumentWidget_(d), width_Widget(d));
1705 } 1706 }
1706 else if (setSource) { 1707 else if (setSource) {
1707 setSource_DocumentWidget(d, &str); 1708 setSource_DocumentWidget(d, &str);
@@ -2498,7 +2499,7 @@ static iBool updateDocumentWidthRetainingScrollPosition_DocumentWidget_(iDocumen
2498 /* TODO: First *fully* visible run? */ 2499 /* TODO: First *fully* visible run? */
2499 voffset = visibleRange_DocumentWidget_(d).start - top_Rect(run->visBounds); 2500 voffset = visibleRange_DocumentWidget_(d).start - top_Rect(run->visBounds);
2500 } 2501 }
2501 setWidth_GmDocument(d->doc, newWidth, (width_Widget(d) - newWidth) / 2); 2502 setWidth_GmDocument(d->doc, newWidth, width_Widget(d));
2502 setWidth_Banner(d->banner, newWidth); 2503 setWidth_Banner(d->banner, newWidth);
2503 documentRunsInvalidated_DocumentWidget_(d); 2504 documentRunsInvalidated_DocumentWidget_(d);
2504 if (runLoc && !keepCenter) { 2505 if (runLoc && !keepCenter) {
@@ -2734,6 +2735,9 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
2734 } 2735 }
2735 else if (equal_Command(cmd, "window.resized") || equal_Command(cmd, "font.changed") || 2736 else if (equal_Command(cmd, "window.resized") || equal_Command(cmd, "font.changed") ||
2736 equal_Command(cmd, "keyroot.changed")) { 2737 equal_Command(cmd, "keyroot.changed")) {
2738 if (equal_Command(cmd, "font.changed")) {
2739 invalidateCachedLayout_History(d->mod.history);
2740 }
2737 /* Alt/Option key may be involved in window size changes. */ 2741 /* Alt/Option key may be involved in window size changes. */
2738 setLinkNumberMode_DocumentWidget_(d, iFalse); 2742 setLinkNumberMode_DocumentWidget_(d, iFalse);
2739 d->phoneToolbar = findWidget_App("toolbar"); 2743 d->phoneToolbar = findWidget_App("toolbar");