diff options
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2743,13 +2743,14 @@ iBool handleCommand_App(const char *cmd) { | |||
2743 | root = otherRoot_Window(as_Window(d->window), root); | 2743 | root = otherRoot_Window(as_Window(d->window), root); |
2744 | setKeyRoot_Window(as_Window(d->window), root); | 2744 | setKeyRoot_Window(as_Window(d->window), root); |
2745 | setCurrent_Root(root); /* need to change for widget creation */ | 2745 | setCurrent_Root(root); /* need to change for widget creation */ |
2746 | doc = document_Command(cmd); /* may be different */ | ||
2746 | } | 2747 | } |
2747 | if (newTab & (new_OpenTabFlag | newBackground_OpenTabFlag)) { | 2748 | if (newTab & (new_OpenTabFlag | newBackground_OpenTabFlag)) { |
2748 | doc = newTab_App(NULL, (newTab & new_OpenTabFlag) != 0); /* `newtab:2` to open in background */ | 2749 | doc = newTab_App(NULL, (newTab & new_OpenTabFlag) != 0); /* `newtab:2` to open in background */ |
2749 | } | 2750 | } |
2750 | iHistory *history = history_DocumentWidget(doc); | 2751 | iHistory *history = history_DocumentWidget(doc); |
2751 | const iBool isHistory = argLabel_Command(cmd, "history") != 0; | 2752 | const iBool isHistory = argLabel_Command(cmd, "history") != 0; |
2752 | int redirectCount = argLabel_Command(cmd, "redirect"); | 2753 | int redirectCount = argLabel_Command(cmd, "redirect"); |
2753 | if (!isHistory) { | 2754 | if (!isHistory) { |
2754 | if (redirectCount) { | 2755 | if (redirectCount) { |
2755 | replace_History(history, url); | 2756 | replace_History(history, url); |