[1mdiff --git a/res/about/version.gmi b/res/about/version.gmi[m
[1mindex f56e8d23..55469551 100644[m
[1m--- a/res/about/version.gmi[m
[1m+++ b/res/about/version.gmi[m
[36m@@ -6,6 +6,9 @@[m
[m
[32m+[m[32m## 1.16.5[m
[32m+[m[32m* "New Tab" (Ctrl+T/⌘T) and the tab bar [+] button append the tab to the right edge. Previously it was inserted next to the active tab.[m
[32m+[m
[1mdiff --git a/src/app.c b/src/app.c[m
[1mindex 0f8ba208..366037dd 100644[m
[1m--- a/src/app.c[m
[1m+++ b/src/app.c[m
[36m@@ -2961,7 +2961,6 @@[m [miDocumentWidget *document_Command(const char *cmd) {[m
[m
iDocumentWidget *newTab_App(const iDocumentWidget *duplicateOf, int newTabFlags) {[m
iWidget *tabs = findWidget_Root("doctabs");[m
[31m- size_t currentTabIndex = tabPageIndex_Widget(tabs, document_App());[m
setFlags_Widget(tabs, hidden_WidgetFlag, iFalse);[m
iWidget *newTabButton = findChild_Widget(tabs, "newtab");[m
removeChild_Widget(newTabButton->parent, newTabButton);[m
[36m@@ -2974,15 +2973,16 @@[m [miDocumentWidget *newTab_App(const iDocumentWidget *duplicateOf, int newTabFlags)[m
}[m
appendTabPage_Widget(tabs, as_Widget(doc), "", 0, 0);[m
iRelease(doc); /* now owned by the tabs */[m
[31m- /* Find and move to the insertion point. */ {[m
[32m+[m[32m /* Find and move to the insertion point. */[m
[32m+[m[32m if (~newTabFlags & append_NewTabFlag) {[m
const size_t insertAt = tabPageIndex_Widget([m
tabs, findChild_Widget(tabs, cstr_String(&get_Root()->tabInsertId)));[m
if (insertAt != iInvalidPos) {[m
moveTabPage_Widget(tabs, tabCount_Widget(tabs) - 1, insertAt + 1);[m
}[m
[31m- /* The next tab comes here. */[m
[31m- set_String(&as_Widget(doc)->root->tabInsertId, id_Widget(as_Widget(doc)));[m
}[m
[32m+[m[32m /* The next tab comes here. */[m
[32m+[m[32m set_String(&as_Widget(doc)->root->tabInsertId, id_Widget(as_Widget(doc)));[m
addTabCloseButton_Widget(tabs, as_Widget(doc), "tabs.close");[m
addChild_Widget(findChild_Widget(tabs, "tabs.buttons"), iClob(newTabButton));[m
showOrHideNewTabButton_Root(tabs->root);[m
[36m@@ -4302,8 +4302,10 @@[m [miBool handleCommand_App(const char *cmd) {[m
}[m
return iTrue;[m
}[m
[32m+[m[32m const iBool isAppend = argLabel_Command(cmd, "append") != 0;[m
const iBool isDuplicate = argLabel_Command(cmd, "duplicate") != 0;[m
[31m- newTab_App(isDuplicate ? document_App() : NULL, switchTo_NewTabFlag);[m
[32m+[m[32m newTab_App(isDuplicate ? document_App() : NULL,[m
[32m+[m[32m switchTo_NewTabFlag | (isAppend ? append_NewTabFlag : 0));[m
if (!isDuplicate) {[m
postCommandf_App("navigate.home focus:%d", deviceType_App() == desktop_AppDeviceType);[m
}[m
[1mdiff --git a/src/app.h b/src/app.h[m
[1mindex 47be3f19..5a533ff1 100644[m
[1m--- a/src/app.h[m
[1m+++ b/src/app.h[m
[36m@@ -79,6 +79,7 @@[m [menum iUserEventCode {[m
[m
enum iNewTabFlag {[m
switchTo_NewTabFlag = iBit(1),[m
[32m+[m[32m append_NewTabFlag = iBit(2),[m
};[m
[m
const iString *execPath_App (void);[m
[1mdiff --git a/src/macos.m b/src/macos.m[m
[1mindex 91e2d50c..fb8acf5a 100644[m
[1m--- a/src/macos.m[m
[1m+++ b/src/macos.m[m
[36m@@ -419,7 +419,7 @@[m [mstatic void appearanceChanged_MacOS_(NSString *name) {[m
return [[CommandButton alloc] initWithIdentifier:identifier[m
image:[NSImage imageNamed:NSImageNameTouchBarAddTemplate][m
widget:nil[m
[31m- command:@"tabs.new"];[m
[32m+[m[32m command:@"tabs.new append:1"];[m
}[m
return nil;[m
}[m
[1mdiff --git a/src/ui/keys.c b/src/ui/keys.c[m
[1mindex 3bfa9302..4913f582 100644[m
[1m--- a/src/ui/keys.c[m
[1m+++ b/src/ui/keys.c[m
[36m@@ -226,7 +226,7 @@[m [mstatic const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] =[m
#if !defined (iPlatformApple) /* Ctrl-Cmd-F on macOS */[m
{ 73, { "${keys.fullscreen}", SDLK_F11, 0, "window.fullscreen" }, 0 },[m
#endif[m
[31m- { 76, { "${keys.tab.new}", newTab_KeyShortcut, "tabs.new" }, 0 },[m
[32m+[m[32m { 76, { "${keys.tab.new}", newTab_KeyShortcut, "tabs.new append:1" }, 0 },[m
{ 77, { "${keys.tab.close}", closeTab_KeyShortcut, "tabs.close" }, 0 },[m
{ 78, { "${keys.tab.close.other}", SDLK_w, KMOD_SECONDARY, "tabs.close toleft:1 toright:1" }, 0 },[m
{ 79, { "${LC:menu.reopentab}", SDLK_t, KMOD_SECONDARY, "tabs.new reopen:1" }, 0 }, [m
[1mdiff --git a/src/ui/mobile.c b/src/ui/mobile.c[m
[1mindex 404c39a1..419298a5 100644[m
[1m--- a/src/ui/mobile.c[m
[1m+++ b/src/ui/mobile.c[m
[36m@@ -43,7 +43,7 @@[m [mconst iToolbarActionSpec toolbarActions_Mobile[max_ToolbarAction] = {[m
{ home_Icon, "${menu.home}", "navigate.home" },[m
{ upArrow_Icon, "${menu.parent}", "navigate.parent" },[m
{ reload_Icon, "${menu.reload}", "navigate.reload" },[m
[31m- { add_Icon, "${menu.newtab}", "tabs.new" },[m
[32m+[m[32m { add_Icon, "${menu.newtab}", "tabs.new append:1" },[m
{ close_Icon, "${menu.closetab}", "tabs.close" },[m
{ bookmark_Icon, "${menu.page.bookmark}", "bookmark.add" },[m
{ globe_Icon, "${menu.page.translate}", "document.translate" },[m
[1mdiff --git a/src/ui/root.c b/src/ui/root.c[m
[1mindex ac708342..bc7cf4b4 100644[m
[1m--- a/src/ui/root.c[m
[1m+++ b/src/ui/root.c[m
[36m@@ -55,7 +55,7 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m
[m
static const iMenuItem desktopNavMenuItems_[] = {[m
{ openWindow_Icon " ${menu.newwindow}", SDLK_n, KMOD_PRIMARY, "window.new" },[m
[31m- { add_Icon " ${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new" },[m
[32m+[m[32m { add_Icon " ${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new append:1" },[m
{ close_Icon " ${menu.closetab}", SDLK_w, KMOD_PRIMARY, "tabs.close" },[m
{ "${menu.openlocation}", SDLK_l, KMOD_PRIMARY, "navigate.focus" },[m
{ "---" },[m
[36m@@ -85,7 +85,7 @@[m [mstatic const iMenuItem desktopNavMenuItems_[] = {[m
};[m
[m
static const iMenuItem tabletNavMenuItems_[] = {[m
[31m- { add_Icon " ${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new" },[m
[32m+[m[32m { add_Icon " ${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new append:1" },[m
{ folder_Icon " ${menu.openfile}", SDLK_o, KMOD_PRIMARY, "file.open" },[m
{ "---" },[m
{ close_Icon " ${menu.closetab}", 'w', KMOD_PRIMARY, "tabs.close" },[m
[36m@@ -102,7 +102,7 @@[m [mstatic const iMenuItem tabletNavMenuItems_[] = {[m
};[m
[m
static const iMenuItem phoneNavMenuItems_[] = {[m
[31m- { add_Icon " ${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new" },[m
[32m+[m[32m { add_Icon " ${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new append:1" },[m
{ folder_Icon " ${menu.openfile}", SDLK_o, KMOD_PRIMARY, "file.open" },[m
{ "---" },[m
{ close_Icon " ${menu.closetab}", 'w', KMOD_PRIMARY, "tabs.close" },[m
[36m@@ -1792,7 +1792,8 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m
setBackgroundColor_Widget(buttons, uiBackground_ColorId);[m
}[m
setId_Widget([m
[31m- addChildFlags_Widget(buttons, iClob(newIcon_LabelWidget(add_Icon, 0, 0, "tabs.new")),[m
[32m+[m[32m addChildFlags_Widget(buttons,[m
[32m+[m[32m iClob(newIcon_LabelWidget(add_Icon, 0, 0, "tabs.new append:1")),[m
moveToParentRightEdge_WidgetFlag | collapse_WidgetFlag),[m
"newtab");[m
}[m
[1mdiff --git a/src/ui/window.c b/src/ui/window.c[m
[1mindex 94df1c7a..8c2a36ac 100644[m
[1m--- a/src/ui/window.c[m
[1m+++ b/src/ui/window.c[m
[36m@@ -73,7 +73,7 @@[m [miDefineTypeConstructionArgs(MainWindow, (iRect rect), rect)[m
[m
static const iMenuItem fileMenuItems_[] = {[m
{ "${menu.newwindow}", SDLK_n, KMOD_PRIMARY, "window.new" },[m
[31m- { "${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new" },[m
[32m+[m[32m { "${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new append:1" },[m
{ "${menu.openlocation}", SDLK_l, KMOD_PRIMARY, "navigate.focus" },[m
{ "${menu.reopentab}", SDLK_t, KMOD_SECONDARY, "tabs.new reopen:1" },[m
{ "---" },[m
text/plain
This content has been proxied by September (ba2dc).