From c6067a50856b123b8cdef954e065e5bf8039ec9d Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 13 Jun 2011 20:08:39 -0400 Subject: [PATCH] :qa closes the current window (because Vim habits are hard to break and shouldn't be destructive). :exit quits the app. --- common/content/dactyl.js | 9 +++++++++ common/content/tabs.js | 5 +++-- common/locale/en-US/browsing.xml | 16 ++++++++++++++-- pentadactyl/NEWS | 2 ++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 9294572e..0291857d 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1839,6 +1839,15 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { literal: 0 }); + commands.add(["exit", "x"], + "Quit " + config.appName, + function (args) { + dactyl.quit(false, args.bang); + }, { + argCount: "0", + bang: true + }); + commands.add(["q[uit]"], dactyl.has("tabs") ? "Quit current tab" : "Quit application", function (args) { diff --git a/common/content/tabs.js b/common/content/tabs.js index 368fc1e4..fee88c92 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -747,8 +747,9 @@ var Tabs = Module("tabs", { }); commands.add(["quita[ll]", "qa[ll]"], - "Quit " + config.appName, - function (args) { dactyl.quit(false, args.bang); }, { + "Quit this " + config.appName + " window", + function (args) { window.close(); }, + { argCount: "0", bang: true }); diff --git a/common/locale/en-US/browsing.xml b/common/locale/en-US/browsing.xml index 6064c547..7b51b648 100644 --- a/common/locale/en-US/browsing.xml +++ b/common/locale/en-US/browsing.xml @@ -449,6 +449,18 @@ want to bypass &dactyl.appName;'s key handling and pass keys directly to

Quitting

+ + :x :exit + + :exit + +

+ Quit &dactyl.appName;, no matter how many tabs/windows + are open. The session is not stored. +

+
+
+ :q :quit @@ -467,8 +479,8 @@ want to bypass &dactyl.appName;'s key handling and pass keys directly to :quitall

- Quit &dactyl.appName;, no matter how many tabs/windows - are open. The session is not stored. + Close the current &dactyl.appName; window, no matter how + many tabs are open.

diff --git a/pentadactyl/NEWS b/pentadactyl/NEWS index 866c78bb..3efffdd3 100644 --- a/pentadactyl/NEWS +++ b/pentadactyl/NEWS @@ -90,6 +90,8 @@ and linking to source code locations). [b4] - :downloads now opens a download list in the multi-line output buffer. Added -sort flag. [b6][b7] + - :qa closes only the current window, per Vim. [b7] + - Added :exit command. [b7] - Added :dlclear command. [b7] - :extensions has been replaced with a more powerful :addons. [b6] - :javascript! now opens a Read Eval Print Loop. [b6]