diff options
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 3373771d..8f2fc437 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -132,6 +132,7 @@ enum iDocumentWidgetFlag { | |||
132 | noHoverWhileScrolling_DocumentWidgetFlag = iBit(2), | 132 | noHoverWhileScrolling_DocumentWidgetFlag = iBit(2), |
133 | showLinkNumbers_DocumentWidgetFlag = iBit(3), | 133 | showLinkNumbers_DocumentWidgetFlag = iBit(3), |
134 | setHoverViaKeys_DocumentWidgetFlag = iBit(4), | 134 | setHoverViaKeys_DocumentWidgetFlag = iBit(4), |
135 | newTabViaHomeKeys_DocumentWidgetFlag = iBit(5), | ||
135 | }; | 136 | }; |
136 | 137 | ||
137 | enum iDocumentLinkOrdinalMode { | 138 | enum iDocumentLinkOrdinalMode { |
@@ -1789,6 +1790,8 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
1789 | iChangeFlags(d->flags, showLinkNumbers_DocumentWidgetFlag, iTrue); | 1790 | iChangeFlags(d->flags, showLinkNumbers_DocumentWidgetFlag, iTrue); |
1790 | iChangeFlags(d->flags, setHoverViaKeys_DocumentWidgetFlag, | 1791 | iChangeFlags(d->flags, setHoverViaKeys_DocumentWidgetFlag, |
1791 | argLabel_Command(cmd, "hover") != 0); | 1792 | argLabel_Command(cmd, "hover") != 0); |
1793 | iChangeFlags(d->flags, newTabViaHomeKeys_DocumentWidgetFlag, | ||
1794 | argLabel_Command(cmd, "newtab") != 0); | ||
1792 | } | 1795 | } |
1793 | invalidateVisibleLinks_DocumentWidget_(d); | 1796 | invalidateVisibleLinks_DocumentWidget_(d); |
1794 | refresh_Widget(d); | 1797 | refresh_Widget(d); |
@@ -2203,7 +2206,10 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
2203 | } | 2206 | } |
2204 | else { | 2207 | else { |
2205 | postCommandf_App("open newtab:%d url:%s", | 2208 | postCommandf_App("open newtab:%d url:%s", |
2206 | openTabMode_Sym(SDL_GetModState()), | 2209 | d->ordinalMode == |
2210 | numbersAndAlphabet_DocumentLinkOrdinalMode | ||
2211 | ? openTabMode_Sym(SDL_GetModState()) | ||
2212 | : (d->flags & newTabViaHomeKeys_DocumentWidgetFlag ? 1 : 0), | ||
2207 | cstr_String(absoluteUrl_String( | 2213 | cstr_String(absoluteUrl_String( |
2208 | d->mod.url, linkUrl_GmDocument(d->doc, run->linkId)))); | 2214 | d->mod.url, linkUrl_GmDocument(d->doc, run->linkId)))); |
2209 | } | 2215 | } |