diff options
-rw-r--r-- | src/ui/documentwidget.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index b9aa551f..e35892cf 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1533,11 +1533,14 @@ static const int homeRowKeys_[] = { | |||
1533 | static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) { | 1533 | static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) { |
1534 | iWidget *w = as_Widget(d); | 1534 | iWidget *w = as_Widget(d); |
1535 | if (equal_Command(cmd, "window.resized") || equal_Command(cmd, "font.changed")) { | 1535 | if (equal_Command(cmd, "window.resized") || equal_Command(cmd, "font.changed")) { |
1536 | const iBool isHorizontalOnly = | 1536 | const iBool isVerticalOnly = |
1537 | argLabel_Command(cmd, "horiz") != 0 && !argLabel_Command(cmd, "vert"); | 1537 | !argLabel_Command(cmd, "horiz") && argLabel_Command(cmd, "vert"); |
1538 | /* Alt/Option key may be involved in window size changes. */ | 1538 | /* Alt/Option key may be involved in window size changes. */ |
1539 | iChangeFlags(d->flags, showLinkNumbers_DocumentWidgetFlag, iFalse); | 1539 | iChangeFlags(d->flags, showLinkNumbers_DocumentWidgetFlag, iFalse); |
1540 | if (isHorizontalOnly) { | 1540 | if (isVerticalOnly) { |
1541 | scroll_DocumentWidget_(d, 0); /* prevent overscroll */ | ||
1542 | } | ||
1543 | else { | ||
1541 | const iGmRun *mid = middleRun_DocumentWidget_(d); | 1544 | const iGmRun *mid = middleRun_DocumentWidget_(d); |
1542 | const char *midLoc = (mid ? mid->text.start : NULL); | 1545 | const char *midLoc = (mid ? mid->text.start : NULL); |
1543 | setWidth_GmDocument(d->doc, documentWidth_DocumentWidget_(d)); | 1546 | setWidth_GmDocument(d->doc, documentWidth_DocumentWidget_(d)); |
@@ -1549,9 +1552,6 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
1549 | } | 1552 | } |
1550 | } | 1553 | } |
1551 | } | 1554 | } |
1552 | else { | ||
1553 | scroll_DocumentWidget_(d, 0); /* prevent overscroll */ | ||
1554 | } | ||
1555 | updateSideIconBuf_DocumentWidget_(d); | 1555 | updateSideIconBuf_DocumentWidget_(d); |
1556 | updateOutline_DocumentWidget_(d); | 1556 | updateOutline_DocumentWidget_(d); |
1557 | invalidate_DocumentWidget_(d); | 1557 | invalidate_DocumentWidget_(d); |