@@ -204,14 +204,14 @@ const Tabs = Module("tabs", {
204
204
* 1 - Focus the tab to the right of the remove tab.
205
205
* 0 - Focus the altanate tab of the remove tab. if alternate tab is none, same as 1
206
206
* -1 - Focus the tab to the left of the remove tab.
207
- * @param {number } quitOnLastTab Whether to quit if the tab being
207
+ * @param {number } forceQuitOnLastTab Whether to quit if the tab being
208
208
* deleted is the only tab in the tab list:
209
209
* 1 - quit without saving session
210
210
* 2 - quit and save session
211
211
* @param {boolean } force Close even if the tab is an app tab.
212
212
*/
213
213
// FIXME: what is quitOnLastTab {1,2} all about then, eh? --djk
214
- remove : function ( tab , count , orientation , quitOnLastTab , force ) {
214
+ remove : function ( tab , count , orientation , forceQuitOnLastTab , force ) {
215
215
let vTabs = config . tabbrowser . visibleTabs ;
216
216
let removeOrBlankTab = {
217
217
Firefox : function ( tab ) {
@@ -239,11 +239,14 @@ const Tabs = Module("tabs", {
239
239
if ( typeof count != "number" || count < 1 )
240
240
count = 1 ;
241
241
242
- if ( quitOnLastTab >= 1 && config . tabbrowser . mTabs . length <= count ) {
242
+ if ( options . getPref ( "browser.tabs.closeWindowWithLastTab" ) && ! forceQuitOnLastTab )
243
+ forceQuitOnLastTab = 1 ;
244
+
245
+ if ( forceQuitOnLastTab >= 1 && config . tabbrowser . mTabs . length <= count ) {
243
246
if ( liberator . windows . length > 1 )
244
247
window . close ( ) ;
245
248
else
246
- liberator . quit ( quitOnLastTab == 2 ) ;
249
+ liberator . quit ( forceQuitOnLastTab == 2 ) ;
247
250
248
251
return ;
249
252
}
0 commit comments