mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 21:37:58 +01:00
beep if trying to delete the last tab which is already an empty tab
This commit is contained in:
@@ -661,8 +661,10 @@ function Events() //{{{
|
|||||||
vimperator.input.pendingArgMap = null;
|
vimperator.input.pendingArgMap = null;
|
||||||
vimperator.input.pendingMotionMap = null;
|
vimperator.input.pendingMotionMap = null;
|
||||||
|
|
||||||
stop = false; // command was not a vimperator command, maybe it is a firefox command
|
// allow key to be passed to firefox if we can't handle it
|
||||||
|
stop = false;
|
||||||
|
|
||||||
|
// TODO: see if this check is needed or are all motion commands already mapped in these modes?
|
||||||
if (!vimperator.hasMode(vimperator.modes.COMMAND_LINE))
|
if (!vimperator.hasMode(vimperator.modes.COMMAND_LINE))
|
||||||
vimperator.beep();
|
vimperator.beep();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,10 +156,16 @@ function Tabs() //{{{
|
|||||||
if (getBrowser().mTabs.length > 1)
|
if (getBrowser().mTabs.length > 1)
|
||||||
getBrowser().removeTab(tab);
|
getBrowser().removeTab(tab);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (vimperator.buffer.URL != "about:blank" ||
|
||||||
|
getWebNavigation().sessionHistory.count > 0)
|
||||||
{
|
{
|
||||||
vimperator.open("about:blank", vimperator.NEW_BACKGROUND_TAB);
|
vimperator.open("about:blank", vimperator.NEW_BACKGROUND_TAB);
|
||||||
getBrowser().removeTab(tab);
|
getBrowser().removeTab(tab);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
vimperator.beep();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count < 1)
|
if (count < 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user