From 8b658634882c5d90c3f6612bcd837797522dcbd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= Date: Tue, 10 Mar 2009 20:54:31 +0100 Subject: [PATCH 01/33] Fix disappearing 'q{0-9a-zA-Z}' in repeat.html Bonus: typo in regressions.js, downcase 'Command-line' in cmdline.txt (as it's not speaking about mode, hope thesnowdog will agree) Signed-off-by: Doug Kearns --- vimperator/locale/en-US/cmdline.txt | 2 +- vimperator/locale/en-US/repeat.txt | 2 +- vimperator/regressions.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vimperator/locale/en-US/cmdline.txt b/vimperator/locale/en-US/cmdline.txt index ddf50772..3ee75fef 100644 --- a/vimperator/locale/en-US/cmdline.txt +++ b/vimperator/locale/en-US/cmdline.txt @@ -25,7 +25,7 @@ ________________________________________________________________________________ |c_| + |||| ________________________________________________________________________________ -Expand a Command-line abbreviation. +Expand a command-line abbreviation. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/repeat.txt b/vimperator/locale/en-US/repeat.txt index 2817c980..975cbea7 100644 --- a/vimperator/locale/en-US/repeat.txt +++ b/vimperator/locale/en-US/repeat.txt @@ -7,7 +7,7 @@ Vimperator can repeat a number of commands and record macros. section:Macros[macros,complex-repeat] |q| -||q{0-9a-zA-Z}|| + +||q\\{0-9a-zA-Z}|| + ____________________________________________________________________________ Record a key sequence into a macro. Available macros are {0-9a-zA-Z} (uppercase to append). diff --git a/vimperator/regressions.js b/vimperator/regressions.js index fd7f043a..36f96192 100644 --- a/vimperator/regressions.js +++ b/vimperator/regressions.js @@ -1,7 +1,7 @@ // Script to find regressions // // It should use as few liberator methods as possible, but fall back to standard mozilla/DOM methods -// The reason it, we don't want to find regressions in the regressions script, and it should survive +// The reason is, we don't want to find regressions in the regressions script, and it should survive // massive changes in the internal liberator API, but just test for functionality of // user-visible commands/mappings // From f909cc128e4f9749e68ea1e7fcf3350d9e5ae611 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 12 Mar 2009 00:31:59 +1100 Subject: [PATCH 02/33] Cancel the isReplaying macro mode when a macro is interrupted. --- common/content/events.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/content/events.js b/common/content/events.js index 6c655cf7..c7449d64 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1375,8 +1375,11 @@ function Events() //{{{ if (key == "" && !event.isMacro) { events.feedingKeys = false; - if (lastMacro) + if (modes.isReplaying) + { + modes.isReplaying = false; setTimeout(function () { liberator.echomsg("Canceled playback of macro '" + lastMacro + "'"); }, 100); + } event.preventDefault(); event.stopPropagation(); return true; From 93f59df6e730de8ec5d302dbd5b0522bfb4f9d38 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 12 Mar 2009 22:00:46 -0400 Subject: [PATCH 03/33] Fix some bugs---which bugs, I have no idea. --- common/content/completion.js | 15 ++++++++++++--- common/content/events.js | 13 +++++++------ common/content/tabs.js | 1 + common/content/ui.js | 5 +---- vimperator/content/bookmarks.js | 2 ++ 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/common/content/completion.js b/common/content/completion.js index 9cd8010a..ee86368d 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -658,7 +658,11 @@ CompletionContext.prototype = { this.tabPressed = false; this.title = ["Completions"]; this.updateAsync = false; - this.waitingForTab = false; + try + { + this.waitingForTab = false; + } + catch (e) {} this.cancelAll(); @@ -677,7 +681,11 @@ CompletionContext.prototype = { for each (let context in this.contexts) { context.hasItems = false; - context.incomplete = false; + try + { + context.incomplete = false; + } + catch (e) {} } }, @@ -685,8 +693,9 @@ CompletionContext.prototype = { * Wait for all subcontexts to complete. * * @param {boolean} interruptible When true, the call may be interrupted - * via . In this case, "Interrupted" may be thrown. + * via , in which case, "Interrupted" may be thrown. * @param {number} timeout The maximum time, in milliseconds, to wait. + * If 0 or null, wait indefinately. */ wait: function wait(interruptable, timeout) { diff --git a/common/content/events.js b/common/content/events.js index a8d6290c..622aacdb 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1695,7 +1695,7 @@ function Events() //{{{ { setTimeout(statusline.updateUrl, 100); }, - setOverLink : function (link, b) + setOverLink: function (link, b) { let ssli = options["showstatuslinks"]; if (link && ssli) @@ -1759,11 +1759,12 @@ function Events() //{{{ window.XULBrowserWindow = self.progressListener; window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIWebNavigation) - .QueryInterface(Ci.nsIDocShellTreeItem).treeOwner - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIXULWindow) - .XULBrowserWindow = window.XULBrowserWindow; + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShellTreeItem) + .treeOwner + .QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIXULWindow) + .XULBrowserWindow = self.progressListener; try { getBrowser().addProgressListener(self.progressListener, Ci.nsIWebProgress.NOTIFY_ALL); diff --git a/common/content/tabs.js b/common/content/tabs.js index 8f5f6578..3d44fbcb 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -623,6 +623,7 @@ function Tabs() //{{{ completer: function (context) { context.anchored = false; + context.compare = CompletionContext.Sort.unsorted; context.keys = { text: function (item) item.state.entries[0].url, description: "title" }; context.completions = tabs.closedTabs; }, diff --git a/common/content/ui.js b/common/content/ui.js index f9b90b4f..de7052e1 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1273,20 +1273,17 @@ function CommandLine() //{{{ } else if (event.type == "input") { - //liberator.dump("input: " + command); this.resetCompletions(); liberator.triggerCallback("change", currentExtendedMode, command); } else if (event.type == "keypress") { + let key = events.toString(event); if (completions) completions.previewClear(); if (!currentExtendedMode) return true; - let key = events.toString(event); - //liberator.log("command line handling key: " + key + "\n"); - // user pressed ENTER to carry out a command // user pressing ESCAPE is handled in the global onEscape // FIXME: should trigger "cancel" event diff --git a/vimperator/content/bookmarks.js b/vimperator/content/bookmarks.js index f099b36e..3a9ad0ec 100644 --- a/vimperator/content/bookmarks.js +++ b/vimperator/content/bookmarks.js @@ -737,6 +737,7 @@ function History() //{{{ context.anchored = false; context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index, 0, -1))]; context.keys = { text: function (item) item.URI.spec, description: "title" }; + context.compare = CompletionContext.Sort.unsorted; }, count: true, literal: 0 @@ -783,6 +784,7 @@ function History() //{{{ context.anchored = false; context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index + 1, sh.count))]; context.keys = { text: function (item) item.URI.spec, description: "title" }; + context.compare = CompletionContext.Sort.unsorted; }, count: true, literal: 0 From a37f61028d9c1d47e281edf02e086eaf7344d964 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 12 Mar 2009 22:44:13 +1100 Subject: [PATCH 04/33] Fix editor#pasteClipboard on Windows. --- common/content/editor.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/content/editor.js b/common/content/editor.js index b62aad98..8c983475 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -623,6 +623,13 @@ function Editor() //{{{ pasteClipboard: function () { + if (liberator.has("Win32")) + { + this.executeCommand("cmd_paste"); + return; + } + + // FIXME: #93 ( in the bottom of a long textarea bounces up) let elem = window.document.commandDispatcher.focusedElement; if (elem.setSelectionRange && util.readFromClipboard()) From 7955e6ce246ab33c617b05ed02c09a226ee493e7 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 14 Mar 2009 17:08:30 +1100 Subject: [PATCH 05/33] Fix mode string case in 'editor' help. --- vimperator/locale/en-US/options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index 2e2be474..bf042502 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -266,7 +266,7 @@ ____ ||'editor'|| string (default: "gvim -f") ____ Set the external text editor. -Sets the editor to run when [m][m] is pressed in INSERT and TEXTAREA +Sets the editor to run when [m][m] is pressed in Insert and TextArea modes. Warning: Vimperator will not behave correctly if the editor forks its own From 4d9cefa754a6e2a07a2ea34fbf6668396a75d809 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 14 Mar 2009 17:11:24 +1100 Subject: [PATCH 06/33] Fix regressions.js modeline. --- vimperator/regressions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/regressions.js b/vimperator/regressions.js index 36f96192..6c4d53ec 100644 --- a/vimperator/regressions.js +++ b/vimperator/regressions.js @@ -249,4 +249,4 @@ commands.addUserCommand(["regr[essions]"], count: true }); -// vimperator: set et sts=4 sw=4 : +// vim: set et sts=4 sw=4 : From 9de03780e4266015b22e2adc50fff078593b78dc Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 14 Mar 2009 17:14:17 +1100 Subject: [PATCH 07/33] Add @returns attribute to io#getRCFile documentation. --- common/content/io.js | 1 + 1 file changed, 1 insertion(+) diff --git a/common/content/io.js b/common/content/io.js index ef3c3abd..ffebc794 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -555,6 +555,7 @@ function IO() //{{{ * * @param {string} dir The directory to search. * @default $HOME. + * @returns {nsIFile} The RC file or null if none is found. */ getRCFile: function (dir) { From b23c9289221fb27f868dcf962d8afe5d3cf75589 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 14 Mar 2009 18:10:44 +1100 Subject: [PATCH 08/33] Don't source the user RC file twice when 'exrc' is set. When started from $HOME, the 'exrc' file and the user RC file are the same file. --- common/content/liberator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/content/liberator.js b/common/content/liberator.js index 19fe896f..c0798fae 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -1291,12 +1291,12 @@ const liberator = (function () //{{{ setTimeout(function () { let init = services.get("environment").get(config.name.toUpperCase() + "_INIT"); + let rcFile = io.getRCFile("~"); + if (init) liberator.execute(init); else { - let rcFile = io.getRCFile("~"); - if (rcFile) io.source(rcFile.path, true); else @@ -1306,7 +1306,7 @@ const liberator = (function () //{{{ if (options["exrc"]) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); - if (localRCFile) + if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } From 079bc1a933b44de46d1604827542c69bd2ba4ee4 Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Sat, 14 Mar 2009 12:37:01 +0200 Subject: [PATCH 09/33] Vimperator 2.0 beta 3 --- vimperator/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/Makefile b/vimperator/Makefile index 639ea591..954aa83a 100644 --- a/vimperator/Makefile +++ b/vimperator/Makefile @@ -1,6 +1,6 @@ #### configuration -VERSION = 2.0b3pre +VERSION = 2.0b3 NAME = vimperator include ../common/Makefile.common From 5c2d82468f38b156be40ff1f00668e3afe507e86 Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Sat, 14 Mar 2009 12:43:26 +0200 Subject: [PATCH 10/33] Post Vimperator 2.0 beta 3 --- vimperator/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/Makefile b/vimperator/Makefile index 954aa83a..5eea2ebb 100644 --- a/vimperator/Makefile +++ b/vimperator/Makefile @@ -1,6 +1,6 @@ #### configuration -VERSION = 2.0b3 +VERSION = 2.0b4pre NAME = vimperator include ../common/Makefile.common From ae150a373e7992b68732c006989be2a0a282d177 Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Sun, 15 Mar 2009 03:24:29 +0200 Subject: [PATCH 11/33] Fix bug #93 the hacky way, thanks to Conrad Irwin for the patch. --- common/content/editor.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/content/editor.js b/common/content/editor.js index 8c983475..59d1c9dd 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -636,6 +636,10 @@ function Editor() //{{{ // readFromClipboard would return 'undefined' if not checked // dunno about .setSelectionRange { + // This is a hacky fix - but it works. + let curTop = elem.scrollTop; + let curLeft = elem.scrollLeft; + let rangeStart = elem.selectionStart; // caret position let rangeEnd = elem.selectionEnd; let tempStr1 = elem.value.substring(0, rangeStart); @@ -644,6 +648,9 @@ function Editor() //{{{ elem.value = tempStr1 + tempStr2 + tempStr3; elem.selectionStart = rangeStart + tempStr2.length; elem.selectionEnd = elem.selectionStart; + + elem.scrollTop = curTop; + elem.scrollLeft = curLeft; } }, From c1ec3989a973a7ee591c0ccd2dd2c96c9be4d50f Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 15 Mar 2009 13:39:58 +1100 Subject: [PATCH 12/33] Add support for image map hinting (Conrad Irwin). --- common/content/hints.js | 72 +++++++++++++++++++++++++++++++++++++++-- vimperator/AUTHORS | 1 + 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/common/content/hints.js b/common/content/hints.js index cf877078..5e27d0c4 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -165,8 +165,76 @@ function Hints() //{{{ text = elem.textContent.toLowerCase(); span = baseNodeAbsolute.cloneNode(true); - span.style.left = Math.max((rect.left + scrollX), scrollX) + "px"; - span.style.top = Math.max((rect.top + scrollY), scrollY) + "px"; + + let leftpos = Math.max((rect.left + scrollX), scrollX); + let toppos = Math.max((rect.top + scrollY), scrollY); + + if (tagname == "area") + { + // TODO: Maybe put the following into a seperate function + try + { + // Need to add the offset to the area element. + // Always try to find the top-left point, as per vimperator default. + let shape = elem.getAttribute("shape").toLowerCase(); + let coordstr = elem.getAttribute("coords"); + // Technically it should be only commas, but hey + coordstr = coordstr.replace(/\s+[;,]\s+/g, ",").replace(/\s+/g, ","); + let coords = coordstr.split(",").map(Number); + + if ((shape == "rect" || shape == "rectangle") && coords.length == 4) + { + leftpos += coords[0]; + toppos += coords[1]; + } + else if (shape == "circle" && coords.length == 3) + { + leftpos += coords[0] - coords[2] / Math.sqrt(2); + toppos += coords[1] - coords[2] / Math.sqrt(2); + } + else if ((shape == "poly" || shape == "polygon") && coords.length % 2 == 0) + { + let leftbound = Infinity; + let topbound = Infinity; + + // First find the top-left corner of the bounding rectangle (offset from image topleft can be noticably suboptimal) + for (let i = 0; i < coords.length; i += 2) + { + leftbound = Math.min(coords[i], leftbound); + topbound = Math.min(coords[i+1], topbound); + } + + let curtop = null; + let curleft = null; + let curdist = Infinity; + + // Then find the closest vertex. (we could generalise to nearest point on an edge, but I doubt there is a need) + for (let i = 0; i < coords.length; i += 2) + { + let leftoffset = coords[i] - leftbound; + let topoffset = coords[i+1] - topbound; + let dist = Math.sqrt(leftoffset * leftoffset + topoffset * topoffset); + if (dist < curdist) + { + curdist = dist; + curleft = coords[i]; + curtop = coords[i+1]; + } + } + + // If we found a satisfactory offset, let's use it. + if (curdist < Infinity) + { + leftpos += curleft; + toppos += curtop; + } + } + } + catch (e) {} //badly formed document, or shape == "default" in which case we don't move the hint + } + + span.style.left = leftpos + "px"; + span.style.top = toppos + "px"; fragment.appendChild(span); pageHints.push([elem, text, span, null, elem.style.backgroundColor, elem.style.color]); diff --git a/vimperator/AUTHORS b/vimperator/AUTHORS index 8d939af8..b8d2e205 100644 --- a/vimperator/AUTHORS +++ b/vimperator/AUTHORS @@ -38,3 +38,4 @@ Patches (in no special order): * Ryan Zheng (ctrl-x/a support) * Dan Boger (:set online support) * Štěpán Němec (help copy-editing and favicon support) + * Conrad Irwin (image map hints) From c8a405cec529f3c06c095493e2a40724f1865c85 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 16 Mar 2009 16:28:05 +1100 Subject: [PATCH 13/33] Move Conrad to the developers list. --- vimperator/AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/AUTHORS b/vimperator/AUTHORS index b8d2e205..7f809a95 100644 --- a/vimperator/AUTHORS +++ b/vimperator/AUTHORS @@ -11,6 +11,7 @@ Developers: * anekos * teramako * janus_wel + * Conrad Irwin Inactive/former developers: * Viktor Kojouharov (Виктор Кожухаров) @@ -38,4 +39,3 @@ Patches (in no special order): * Ryan Zheng (ctrl-x/a support) * Dan Boger (:set online support) * Štěpán Němec (help copy-editing and favicon support) - * Conrad Irwin (image map hints) From 924aba8f54529221cb6000aa8fa4a03d9fa4ecdc Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 16 Mar 2009 12:28:34 +0000 Subject: [PATCH 14/33] Commandline completion for hinted file inputs When an is selected with hints, it will cause an "Upload file: " prompt in the commandline. (Selection with tab and mouse is left unchanged and will cause the firefox dialog to display) --- common/content/buffer.js | 10 ++++++++++ common/content/ui.js | 2 ++ vimperator/NEWS | 2 ++ 3 files changed, 14 insertions(+) diff --git a/common/content/buffer.js b/common/content/buffer.js index 7f535692..458daa21 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1019,6 +1019,11 @@ function Buffer() //{{{ elem.contentWindow.focus(); return; } + else if (elemTagName == "input" && elem.getAttribute('type').toLowerCase() == "file") + { + commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value}); + return; + } elem.focus(); @@ -1124,6 +1129,11 @@ function Buffer() //{{{ offsetX = Number(coords[0]) + 1; offsetY = Number(coords[1]) + 1; } + else if (localName == "input" && elem.getAttribute('type').toLowerCase() == "file") + { + commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value}); + return; + } let ctrlKey = false, shiftKey = false; switch (where) diff --git a/common/content/ui.js b/common/content/ui.js index 18cb7059..d01f2a2c 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1201,6 +1201,8 @@ function CommandLine() //{{{ * for the user's input. * @... {string} promptHighlight - The HighlightGroup used for the * prompt. @default "Question" + * @... {string} default - The initial value that will be returned + * if the user presses straightaway. @default "" */ input: function _input(prompt, callback, extra) { diff --git a/vimperator/NEWS b/vimperator/NEWS index 8cd7d8b1..c33ef4b9 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -21,6 +21,8 @@ * IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages. * IMPORTANT: $VIMPERATOR_HOME is no longer used. + * Selecting an with hints now causes the commandline to prompt + for file input (instead of doing nothing). * [count] now goes to the [count]th next tab rather than the [count]th tab. * add ~/.vimperator/info/{profile}/, similar to viminfo * add $VIMPERATOR_RUNTIME, $VIMPERATOR_INIT From 238e45482cf928d89093043948a1c37a56ae961a Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 18 Mar 2009 00:45:47 +0000 Subject: [PATCH 15/33] Fix bug #189, now uses first completion On discussion with maxauthority this is probably the best way of doing things for now. --- common/content/ui.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/content/ui.js b/common/content/ui.js index d01f2a2c..a23e5de7 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1298,8 +1298,15 @@ function CommandLine() //{{{ // user pressed ENTER to carry out a command // user pressing ESCAPE is handled in the global onEscape // FIXME: should trigger "cancel" event + // FIXME: This should not be waiting, some kind of callback mechanism on completion would be better. if (events.isAcceptKey(key)) { + while (completions.context.incomplete) + { + liberator.threadYield(true); + command = this.command; + } + let mode = currentExtendedMode; // save it here, as modes.pop() resets it keepCommand = true; currentExtendedMode = null; // Don't let modes.pop trigger "cancel" From 202975b3f1eb63ca768ae18f795527f97473ff64 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 17 Mar 2009 00:29:16 +1100 Subject: [PATCH 16/33] Add extension ID update reminder to TODO. --- vimperator/TODO | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimperator/TODO b/vimperator/TODO index c2175204..d6f0d711 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -39,6 +39,8 @@ BUGS: - URLs in :ls output are no longer hyperlinks FEATURES: +9 change the extension ID to vimperator@vimperator.org rather than + vimperator@mozdev.org 9 finish :help TODOs 9 fix local options 9 adaptive timeout for auto-completions, :set completions can be updated more often than From 79ef0f67eb89d240f448afa614d5ffee5048088f Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 18 Mar 2009 20:32:41 +1100 Subject: [PATCH 17/33] Don't bother forking colorscheme completion. It was an attempt to improve on Vim's colorscheme completion, across multiple runtime paths, but that's more buggy than useful. --- common/content/completion.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/common/content/completion.js b/common/content/completion.js index ee86368d..5c8e9d2d 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -1426,15 +1426,17 @@ function Completion() //{{{ colorScheme: function colorScheme(context) { - // TODO: use path for the description? + let colors = []; + io.getRuntimeDirectories("colors").forEach(function (dir) { - context.fork(dir.path, 0, null, function (context) { - context.filter = dir.path + io.pathSeparator + context.filter; - completion.file(context); - context.title = ["Color Scheme"]; - context.quote = ["", function (text) text.replace(/\.vimp$/, ""), ""]; + io.readDirectory(dir).forEach(function (file) { + if (/\.vimp$/.test(file.leafName) && !colors.some(function (c) c.leafName == file.leafName)) + colors.push(file); }); }); + + context.title = ["Color Scheme", "Runtime Path"]; + context.completions = [[c.leafName.replace(/\.vimp$/, ""), c.parent.path] for ([,c] in Iterator(colors))] }, command: function command(context) From 855bc5b9fe26ad0a4d4734ed64fe965af51ed2bb Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Wed, 18 Mar 2009 22:39:32 +0200 Subject: [PATCH 18/33] Revert "Fix bug #189, now uses first completion" This reverts commit f18efe4ec792afb65c4bace11073526aef31725e. --- common/content/ui.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/common/content/ui.js b/common/content/ui.js index a23e5de7..d01f2a2c 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1298,15 +1298,8 @@ function CommandLine() //{{{ // user pressed ENTER to carry out a command // user pressing ESCAPE is handled in the global onEscape // FIXME: should trigger "cancel" event - // FIXME: This should not be waiting, some kind of callback mechanism on completion would be better. if (events.isAcceptKey(key)) { - while (completions.context.incomplete) - { - liberator.threadYield(true); - command = this.command; - } - let mode = currentExtendedMode; // save it here, as modes.pop() resets it keepCommand = true; currentExtendedMode = null; // Don't let modes.pop trigger "cancel" From f82ca27c6e09204ce90b39bf75a7d120ca4da3cd Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Mon, 23 Mar 2009 11:30:01 +0200 Subject: [PATCH 19/33] Update maxVersion of vimperator to latest Minefield --- vimperator/install.rdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/install.rdf b/vimperator/install.rdf index e709b06d..0d203952 100644 --- a/vimperator/install.rdf +++ b/vimperator/install.rdf @@ -20,7 +20,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 3.0 - 3.2a1pre + 3.6a1pre From b4b62fc8360a51d000313fc18be2ac5ad645bfa9 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 23 Mar 2009 12:36:05 +0000 Subject: [PATCH 20/33] Fix #141 by not splitting URLs on quoted commas. Added a new function util.splitLiteral(str, RegExp). --- common/content/util.js | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/common/content/util.js b/common/content/util.js index ad41bd18..8ea3d22a 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -249,6 +249,40 @@ const util = { //{{{ return delimiter + str.replace(/([\\'"])/g, "\\$1").replace("\n", "\\n", "g").replace("\t", "\\t", "g") + delimiter; }, + /** + * Split a string on literal occurances of a marker. + * + * Specifically this ignores occurences preceded by a backslash, or + * contained within 'single' or "double" quotes. + * + * It assumes backslash escaping on strings, and will thus not count quotes + * that are preceded by a backslash or within other quotes as starting or + * ending quoted sections of the string. + * + * @param {string} str + * @param {RegExp} marker + */ + splitLiteral: function splitLiteral(str, marker) + { + let results = []; + let resep = RegExp(/^(([^\\'"]|\\.|'([^\\']|\\.)*'|"([^\\"]|\\.)*")*?)/.source + marker.source); + let cont = true; + + while (cont) + { + cont = false; + str = str.replace(resep, function (match, before) + { + results.push(before); + cont = true; + return ""; + }); + } + + results.push(str); + return results; + }, + /** * Converts bytes to a pretty printed data size string. * @@ -618,7 +652,7 @@ const util = { //{{{ */ stringToURLArray: function stringToURLArray(str) { - let urls = str.split(RegExp("\\s*" + options["urlseparator"] + "\\s*")); + let urls = util.splitLiteral(str, RegExp("\\s*" + options["urlseparator"] + "\\s*")); return urls.map(function (url) { try From 53b5a54a1f5ea96d4e013ddaec41ec410291deb3 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 23 Mar 2009 14:41:41 +0000 Subject: [PATCH 21/33] Fix #198, Unicode escape next and previous pattern --- common/content/buffer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 458daa21..4cd9fdeb 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -146,13 +146,13 @@ function Buffer() //{{{ getter: function () window.fullScreen }); - options.add(["nextpattern"], + options.add(["nextpattern"], // \u00BB is » (>> in a single char) "Patterns to use when guessing the 'next' page in a document sequence", - "stringlist", "\\bnext\\b,^>$,^(>>|»)$,^(>|»),(>|»)$,\\bmore\\b"); + "stringlist", "\\bnext\\b,^>$,^(>>|\u00BB)$,^(>|\u00BB),(>|\u00BB)$,\\bmore\\b"); - options.add(["previouspattern"], + options.add(["previouspattern"], // \u00AB is « (<< in a single char) "Patterns to use when guessing the 'previous' page in a document sequence", - "stringlist", "\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$"); + "stringlist", "\\bprev|previous\\b,^<$,^(<<|\u00AB)$,^(<|\u00AB),(<|\u00AB)$"); options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm", { From b6cb5785adbef0cb7bef5d74d7b36176e6679a74 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 24 Mar 2009 15:02:56 +1100 Subject: [PATCH 22/33] Fix :help :back/:forward formatting. --- vimperator/locale/en-US/browsing.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vimperator/locale/en-US/browsing.txt b/vimperator/locale/en-US/browsing.txt index 9b44fa8a..c2a7dbba 100644 --- a/vimperator/locale/en-US/browsing.txt +++ b/vimperator/locale/en-US/browsing.txt @@ -160,7 +160,7 @@ ________________________________________________________________________________ section:Navigating[navigating] |H| || |CTRL-O| |:ba| |:back| -||:[count]ba[ck] [url]|| + +||:[count]ba[ck] [a][url][a]|| + ||:ba[ck]!|| + ||CTRL-o|| ________________________________________________________________________________ @@ -171,7 +171,7 @@ ________________________________________________________________________________ |L| || |CTRL-i| |:fo| |:fw| |:forward| -||:[count]fo[rward] [url]|| + +||:[count]fo[rward] [a][url][a]|| + ||:fo[rward]!|| + ||CTRL-i|| ________________________________________________________________________________ From 16eb0a11484be077b5f9b13f5fc0329353dd3059 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 25 Mar 2009 12:44:00 +1100 Subject: [PATCH 23/33] Fix typo in LocationChange autocomd description. --- vimperator/content/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/content/config.js b/vimperator/content/config.js index 1a37841a..ab6b0193 100644 --- a/vimperator/content/config.js +++ b/vimperator/content/config.js @@ -49,7 +49,7 @@ const config = { //{{{ ["DOMLoad", "Triggered when a page's DOM content has fully loaded"], ["DownloadPost", "Triggered when a download has completed"], ["Fullscreen", "Triggered when the browser's fullscreen state changes"], - ["LocationChange", "Triggered when changing tabs or when naviagtion to a new location"], + ["LocationChange", "Triggered when changing tabs or when navigation to a new location"], ["PageLoadPre", "Triggered after a page load is initiated"], ["PageLoad", "Triggered when a page gets (re)loaded/opened"], ["ShellCmdPost", "Triggered after executing a shell command with :!cmd"], From d6238f84a43b848b86bca5ba55b465fad9bdba73 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 25 Mar 2009 01:58:39 +0000 Subject: [PATCH 24/33] Treat strings containing / as URLs In lieu of getting proper hostname detection, allow localhost/ and other similar URLs to work. --- common/content/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/util.js b/common/content/util.js index 8ea3d22a..24a167e2 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -675,7 +675,7 @@ const util = { //{{{ // Ok, not a valid proto. If it looks like URL-ish (foo.com/bar), // let Gecko figure it out. - if (/[.]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url)) + if (/[.\/]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url)) return url; // TODO: it would be clearer if the appropriate call to From bda0c5bda592560fb131c832259be3ab6edfb3e1 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 26 Mar 2009 02:48:55 +0000 Subject: [PATCH 25/33] Fix #180. User can no-longer interrupt macros. Buffers any keystrokes recieved during a macro expansion and plays them after it has finished. --- common/content/events.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index 5e1b7e02..3c58afc2 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -898,6 +898,7 @@ function Events() //{{{ let wasFeeding = this.feedingKeys; this.feedingKeys = true; + this.duringFeed = this.duringFeed || ""; let wasSilent = commandline.silent; if (silent) commandline.silent = silent; @@ -993,6 +994,15 @@ function Events() //{{{ this.feedingKeys = wasFeeding; if (silent) commandline.silent = wasSilent; + + if (this.duringFeed != "") + { + //Create a scalar constant for closure. + let duringFeed = this.duringFeed; + this.duringFeed = ""; + + setTimeout(function () events.feedkeys(duringFeed, false, false, true), 0); + } } return i == keys.length; }, @@ -1370,9 +1380,9 @@ function Events() //{{{ // we can differentiate between a recorded // interrupting whatever it's started and a real // interrupting our playback. - if (events.feedingKeys) + if (events.feedingKeys && !event.isMacro) { - if (key == "" && !event.isMacro) + if (key == "") { events.feedingKeys = false; if (modes.isReplaying) @@ -1384,6 +1394,13 @@ function Events() //{{{ event.stopPropagation(); return true; } + else + { + events.duringFeed += key; + event.preventDefault(); + event.stopPropagation(); + return true; + } } let stop = true; // set to false if we should NOT consume this event but let Firefox handle it From 4282b07d77372c549efd6ec8209d7a6be2aaacdb Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 26 Mar 2009 03:11:17 +0000 Subject: [PATCH 26/33] Fix uploading of files by relative path name. Use io.getFile(path).path instead of just path in order to create an absolute path. --- common/content/buffer.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 4cd9fdeb..a9cb4831 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1021,7 +1021,16 @@ function Buffer() //{{{ } else if (elemTagName == "input" && elem.getAttribute('type').toLowerCase() == "file") { - commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value}); + commandline.input("Upload file: ", function (path) + { + let file = io.getFile(path); + + if (!file.exists()) + return liberator.beep(); + + elem.value = file.path; + } + , {completer: completion.file, default: elem.value}); return; } @@ -1131,7 +1140,16 @@ function Buffer() //{{{ } else if (localName == "input" && elem.getAttribute('type').toLowerCase() == "file") { - commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value}); + commandline.input("Upload file: ", function (path) + { + let file = io.getFile(path); + + if (!file.exists()) + return liberator.beep(); + + elem.value = file.path; + } + , {completer: completion.file, default: elem.value}); return; } From 702f8f9a3eceeb9729f95ac6a793c45c72eed85e Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Thu, 26 Mar 2009 09:34:10 +0200 Subject: [PATCH 27/33] Doc fixes (thanks Xie&Tian) --- vimperator/AUTHORS | 2 +- vimperator/locale/en-US/browsing.txt | 2 +- vimperator/locale/en-US/buffer.txt | 26 +++++++++++++------------- vimperator/locale/en-US/eval.txt | 2 +- vimperator/locale/en-US/gui.txt | 4 ++-- vimperator/locale/en-US/index.txt | 8 ++++---- vimperator/locale/en-US/map.txt | 2 +- vimperator/locale/en-US/marks.txt | 4 ++-- vimperator/locale/en-US/options.txt | 10 +++++----- vimperator/locale/en-US/repeat.txt | 2 +- vimperator/locale/en-US/tutorial.txt | 2 +- vimperator/locale/en-US/various.txt | 6 +++--- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/vimperator/AUTHORS b/vimperator/AUTHORS index 7f809a95..d2ec10d5 100644 --- a/vimperator/AUTHORS +++ b/vimperator/AUTHORS @@ -19,7 +19,7 @@ Inactive/former developers: Patches (in no special order): * Ruud Grosmann ('followhints' option) - * Xie&Tian (multibyte support for hints) + * Xie&Tian (multibyte support for hints, doc fixes) * Juergen Descher * Kazuo (count support for ctrl-^) * Daniel Schaffrath (;b support) diff --git a/vimperator/locale/en-US/browsing.txt b/vimperator/locale/en-US/browsing.txt index c2a7dbba..95a4cbe4 100644 --- a/vimperator/locale/en-US/browsing.txt +++ b/vimperator/locale/en-US/browsing.txt @@ -51,7 +51,7 @@ Each token is analyzed and in this order: to set a custom name, you can change it with [c]:dialog searchengines[c]. 3. Opened with the default search engine or keyword (specified with the 'defsearch' option) if the first word is no search engine ([c]:open linus - torvalds[c] opens a Google search for linux torvalds). + torvalds[c] opens a Google search for linus torvalds). 4. Passed directly to Firefox in all other cases ([c]:open www.osnews.com, www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new background tab). diff --git a/vimperator/locale/en-US/buffer.txt b/vimperator/locale/en-US/buffer.txt index 95d6bab0..0fe91f6e 100644 --- a/vimperator/locale/en-US/buffer.txt +++ b/vimperator/locale/en-US/buffer.txt @@ -123,6 +123,16 @@ set). ________________________________________________________________________________ +|| |l| + +||[count]l|| +________________________________________________________________________________ +Scroll document to the right. If [count] is specified then move [count] times +as much to the right. + +If the document cannot scroll more, a beep is emitted (unless 'visualbell' is +set). +________________________________________________________________________________ + + || + ||[count]|| ________________________________________________________________________________ @@ -141,16 +151,6 @@ first set to this value. ________________________________________________________________________________ -|| |l| + -||[count]l|| -________________________________________________________________________________ -Scroll document to the right. If [count] is specified then move [count] times -as much to the right. + -If the document cannot scroll more, a beep is emitted (unless 'visualbell' is -set). -________________________________________________________________________________ - - || || || + ||[count]|| ________________________________________________________________________________ @@ -235,7 +235,7 @@ default zoom levels are 30%, 50%, 67%, 80%, 90%, 100%, 110%, 120%, 133%, 150%, The available zoom range can be changed by setting the \'http://kb.mozillazine.org/Zoom.minPercent[zoom.minPercent]' and -\'http://kb.mozillazine.org/Zoom.minPercent[zoom.maxPercent]' Firefox +\'http://kb.mozillazine.org/Zoom.maxPercent[zoom.maxPercent]' Firefox preferences. The zoom levels can be changed using the \'http://kb.mozillazine.org/Toolkit.zoomManager.zoomValues[toolkit.ZoomManager.zoomLevels]' preference. @@ -274,7 +274,7 @@ ________________________________________________________________________________ |zz| + ||[count]zz|| ________________________________________________________________________________ -Set text zoom value of current web page. Zoom value can be between 30 and 300%. +Set text zoom value of current web page. Zoom value can be between 30% and 300%. If it is omitted, text zoom is reset to 100%. ________________________________________________________________________________ @@ -320,7 +320,7 @@ ________________________________________________________________________________ ||:zo[om][!] +{value} | -{value}|| + ________________________________________________________________________________ Set zoom value of current web page. [a][value][a] can be an absolute value -between 30 and 300% or a relative value if prefixed with "-" or "+". If +between 30% and 300% or a relative value if prefixed with "-" or "+". If [a][value][a] is omitted, zoom is reset to 100%. Normally this command operates on the text zoom, if used with [!] it operates diff --git a/vimperator/locale/en-US/eval.txt b/vimperator/locale/en-US/eval.txt index 17c71dda..bbc0d5ba 100644 --- a/vimperator/locale/en-US/eval.txt +++ b/vimperator/locale/en-US/eval.txt @@ -70,7 +70,7 @@ ________________________________________________________________________________ ________________________________________________________________________________ Sets or lists a variable. Sets the variable {var-name} to the value of the expression {expr1}. If no expression is given, the value of the variable is -displayed.Without arguments, displays a list of all variables. +displayed. Without arguments, displays a list of all variables. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/gui.txt b/vimperator/locale/en-US/gui.txt index 4da826c5..bec1f78b 100644 --- a/vimperator/locale/en-US/gui.txt +++ b/vimperator/locale/en-US/gui.txt @@ -20,7 +20,7 @@ ________________________________________________________________________________ |:addo| |:addons| + ||:addo[ns]|| ________________________________________________________________________________ -Show available Browser Extensions and Themes. +Show available browser Extensions and Themes. You can add/remove/disable browser extensions from this dialog. Be aware that not all Firefox extensions work, because Vimperator overrides some key bindings and changes Firefox's GUI. @@ -34,7 +34,7 @@ Open a Firefox dialog. Available dialogs: `------------------`----------------------------------- -*about* About Firefox +*about* About Mozilla Firefox *addbookmark* Add bookmark for the current page *addons* Manage Add-ons *bookmarks* List your bookmarks diff --git a/vimperator/locale/en-US/index.txt b/vimperator/locale/en-US/index.txt index 5a6a2fbb..085792e3 100644 --- a/vimperator/locale/en-US/index.txt +++ b/vimperator/locale/en-US/index.txt @@ -170,7 +170,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index] ||[c]:delmarks[c]|| Delete the specified marks + ||[c]:delqmarks[c]|| Delete the specified QuickMarks + ||[c]:delstyle[c]|| Delete any matching styles + -||[c]:dialog[c]|| Open a undefined dialog + +||[c]:dialog[c]|| Open a Firefox dialog + ||[c]:doautoall[c]|| Apply the autocommands matching the specified URL to all buffers + ||[c]:doautocmd[c]|| Apply the autocommands matching the specified URL to the current buffer + ||[c]:downloads[c]|| Show progress of current downloads + @@ -217,11 +217,11 @@ section:Ex{nbsp}commands[ex-cmd-index,:index] ||[c]:qmark[c]|| Mark a URL with a letter for quick access + ||[c]:qmarks[c]|| Show all QuickMarks + ||[c]:quit[c]|| Quit current tab + -||[c]:quitall[c]|| Quit undefined + +||[c]:quitall[c]|| Quit Vimperator + ||[c]:redraw[c]|| Redraw the screen + ||[c]:reload[c]|| Reload current page + ||[c]:reloadall[c]|| Reload all tab pages + -||[c]:restart[c]|| Force undefined to restart + +||[c]:restart[c]|| Force the browser to restart + ||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' + ||[c]:saveas[c]|| Save current document to disk + ||[c]:sbclose[c]|| Close the sidebar window + @@ -261,7 +261,7 @@ section:Options[option-index] ||'activate'|| Define when tabs are automatically activated + ||'cdpath'|| List of directories searched when executing [c]:cd[c] + -||'complete'|| Items which are completed at the [c]:[tab]open prompt[c] + +||'complete'|| Items which are completed at the [c]:[tab]open[c] prompt + ||'defsearch'|| Set the default search engine + ||'editor'|| Set the external text editor + ||'errorbells'|| Ring the bell when an error message is displayed + diff --git a/vimperator/locale/en-US/map.txt b/vimperator/locale/en-US/map.txt index 6dce047a..b1073ffe 100644 --- a/vimperator/locale/en-US/map.txt +++ b/vimperator/locale/en-US/map.txt @@ -346,7 +346,7 @@ Custom completion Custom completion can be provided by specifying the "custom,{func}" argument to -complete. The {func} is called with two arguments, a completion context, and an object describing the command's arguments. It should set the context's -\'completions' property, or return an object, with \'start' and \'items' +\'completions' property, or return an object, with \'items' and \'start' properties, describing the completions and where the replacement is to start. *start* is the index into the word being completed at which the returned values diff --git a/vimperator/locale/en-US/marks.txt b/vimperator/locale/en-US/marks.txt index 837268be..7a6e1239 100644 --- a/vimperator/locale/en-US/marks.txt +++ b/vimperator/locale/en-US/marks.txt @@ -80,7 +80,7 @@ section:History[history] ||[count]|| ________________________________________________________________________________ Go to an older position in the jump list. The jump list is just the browser -history for now. +history for now. If [count] is specified go back [count] pages. ________________________________________________________________________________ @@ -88,7 +88,7 @@ ________________________________________________________________________________ ||[count]|| ________________________________________________________________________________ Go to a newer position in the jump list. The jump list is just the browser -history for now. +history for now. If [count] is specified go forward [count] pages. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index bf042502..c434cb79 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -252,7 +252,7 @@ Sets the default search engine. The default search engine name is used in the [c]:[tab]open [arg][c] command if [a][arg][a] neither looks like a URL or like a specified search engine/keyword. -This means, it you set 'defsearch' to "youtube", then [c]:open arnold +This means, if you set 'defsearch' to "youtube", then [c]:open arnold schwarzenegger[c] will be exactly the same as [c]:open youtube arnold schwarzenegger[c]. Therefore, you need to add a keyword or search engine "youtube" first. @@ -472,7 +472,7 @@ ____ |\'nolpl'| |\'lpl'| |\'noloadplugins'| |\'loadplugins'| -||'loadplugins' 'lpl'|| boolean (default on) +||'loadplugins' 'lpl'|| boolean (default: on) ____ Load plugin scripts when starting up. When on, yet unloaded plugins are automatically loaded after the vimperatorrc file has been sourced. To @@ -527,7 +527,7 @@ ____ |\'noonline'| |\'online'| -||'online'|| boolean (default on) +||'online'|| boolean (default: on) ____ Show and set the \'work offline' behavior. ____ @@ -571,7 +571,7 @@ ____ |\'nopreload'| |\'preload'| ||'preload' 'nopreload'|| boolean (default: on) ____ -Speed up first time history/bookmark completion +Speed up first time history/bookmark completion. History access can be quite slow for a large history. Vimperator maintains a cache to speed it up significantly on subsequent access. @@ -751,7 +751,7 @@ ____ |\'wildcase'| |\'wic'| ||'wildcase' 'wic'|| string (default: "smart") ____ -Defines how completions are matched with regard to character case. +Defines how completions are matched with regard to character case. Possible values: `---------------`------------------------ "smart" Case is significant when capital letters are typed diff --git a/vimperator/locale/en-US/repeat.txt b/vimperator/locale/en-US/repeat.txt index 975cbea7..8d1adb3a 100644 --- a/vimperator/locale/en-US/repeat.txt +++ b/vimperator/locale/en-US/repeat.txt @@ -132,7 +132,7 @@ section:Profiling[profile,profiling] |:time| ||:[count]time[!] {code|:command}|| + ________________________________________________________________________________ -Profile a piece of code or a command. Run {code} [count] times (default 1) +Profile a piece of code or a command. Run {code} [count] times (default: 1) and returns the elapsed time. {code} is always passed to JavaScript's eval(), which might be slow, so take the results with a grain of salt. diff --git a/vimperator/locale/en-US/tutorial.txt b/vimperator/locale/en-US/tutorial.txt index 21b5e285..f85af34f 100644 --- a/vimperator/locale/en-US/tutorial.txt +++ b/vimperator/locale/en-US/tutorial.txt @@ -57,7 +57,7 @@ Similarly, help on configurable options is available with [c]:help '{option_name}'[c]. (Note the single quotes around the option name as in Vim.) Information on all available options is, predictably, [c]:help options[c]. -and you can find out about the [m]gt[m] and [m]gT[m] mapping with +And you can find out about the [m]gt[m] and [m]gT[m] mapping with \{nbsp}[c]:help gt[c] + \{nbsp}[c]:help gT[c] diff --git a/vimperator/locale/en-US/various.txt b/vimperator/locale/en-US/various.txt index 79d485dc..7110495f 100644 --- a/vimperator/locale/en-US/various.txt +++ b/vimperator/locale/en-US/various.txt @@ -11,9 +11,9 @@ ________________________________________________________________________________ || |CTRL-L| |:redr| |:redraw| + ||:redr[aw]|| -____ +________________________________________________________________________________ Redraws the screen. Useful to update the screen halfway executing a script or function. -____ +________________________________________________________________________________ |:norm| |:normal| ||:norm[al][!] {commands}|| + @@ -54,7 +54,7 @@ ________________________________________________________________________________ Open help window. The default page, as specified by 'helpfile' is shown unless [a][subject][a] is specified. If you need help for a specific topic, try [c]:help overview[c]. -____________________________________________________________________________ +________________________________________________________________________________ |:exu| |:exusage| + From 26fec12cade6cf62a3e30b8d51fbb8c1b20c6018 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 27 Mar 2009 13:31:31 +1100 Subject: [PATCH 28/33] Fix #204. Fixes #204 (statusbar should follow "site identification button" color codes). --- common/content/events.js | 11 +++++++---- common/content/style.js | 7 ++++--- common/content/ui.js | 4 +++- vimperator/locale/en-US/styling.txt | 1 + 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index 3c58afc2..51d1ecb8 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1684,13 +1684,16 @@ function Events() //{{{ } }, // for notifying the user about secure web pages - onSecurityChange: function (webProgress, aRequest, aState) + onSecurityChange: function (webProgress, request, state) { - if (aState & Ci.nsIWebProgressListener.STATE_IS_INSECURE) + // TODO: do something useful with STATE_SECURE_MED and STATE_SECURE_LOW + if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE) statusline.setClass("insecure"); - else if (aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN) + else if (state & Ci.nsIWebProgressListener.STATE_IS_BROKEN) statusline.setClass("broken"); - else if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE) + else if (state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL) + statusline.setClass("extended"); + else if (state & Ci.nsIWebProgressListener.STATE_SECURE_HIGH) statusline.setClass("secure"); }, onStatusChange: function (webProgress, request, status, message) diff --git a/common/content/style.js b/common/content/style.js index d994dbd6..24a05657 100644 --- a/common/content/style.js +++ b/common/content/style.js @@ -71,9 +71,10 @@ Highlights.prototype.CSS = Date: Sun, 15 Mar 2009 13:03:17 +0100 Subject: [PATCH 29/33] Fix muttator for new nighlies --- common/content/liberator.js | 7 ++++++- muttator/install.rdf | 2 +- vimperator/Donors | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/common/content/liberator.js b/common/content/liberator.js index c0798fae..9c0b2279 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -1225,7 +1225,12 @@ const liberator = (function () //{{{ config.features.push(getPlatformFeature()); config.defaults = config.defaults || {}; config.guioptions = config.guioptions || {}; - config.browserModes = config.browserModes || [modes.NORMAL]; + + // -> we can't use this, since config.browserModes might already be defined as a getter-only + // TODO: also change the other config.* defaults? + // config.browserModes = config.browserModes || [modes.NORMAL]; + if (!config.browserModes) + config.browserModes = [modes.NORMAL]; config.mailModes = config.mailModes || [modes.NORMAL]; // TODO: suitable defaults? //config.mainWidget diff --git a/muttator/install.rdf b/muttator/install.rdf index 3785bda0..81010653 100644 --- a/muttator/install.rdf +++ b/muttator/install.rdf @@ -20,7 +20,7 @@ {3550f703-e582-4d05-9a08-453d09bdfdc6} 3.0b2pre - 3.0b2 + 3.0b3 diff --git a/vimperator/Donors b/vimperator/Donors index e94055cb..7bb5b379 100644 --- a/vimperator/Donors +++ b/vimperator/Donors @@ -2,6 +2,10 @@ Continuous donations: * Daniel Bainton (web hosting) 2009: +* Fabien Benetou +* Arvin Moezzi +* Calogero Lo Leggio +* Sapan Bhatia * Gavin Sinclair * Stephen Borchert * Convolution From c342cdd7c963fa37052c4f770b5b6d143e0cac26 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Fri, 27 Mar 2009 11:43:45 +0100 Subject: [PATCH 30/33] updated donors --- vimperator/Donors | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vimperator/Donors b/vimperator/Donors index 7bb5b379..6dd5baac 100644 --- a/vimperator/Donors +++ b/vimperator/Donors @@ -2,6 +2,9 @@ Continuous donations: * Daniel Bainton (web hosting) 2009: +* Christoph Petzold +* Bjoern Steinbrink +* Erlend Hamberg * Fabien Benetou * Arvin Moezzi * Calogero Lo Leggio From 09c653062c9cc1d170917903e8227d15ef58f5ed Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sat, 28 Mar 2009 23:10:10 +0100 Subject: [PATCH 31/33] Remove text shadow, should fix tabs on mac os --- common/content/bindings.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/content/bindings.xml b/common/content/bindings.xml index 09693199..d2fd0254 100644 --- a/common/content/bindings.xml +++ b/common/content/bindings.xml @@ -47,11 +47,9 @@ - - From 5ab1771e3c00fa4861d7f933f6efeedd47829880 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sat, 28 Mar 2009 23:38:33 +0100 Subject: [PATCH 32/33] changed my email address --- License.txt | 2 +- common/content/buffer.js | 2 +- common/content/commands.js | 2 +- common/content/completion.js | 2 +- common/content/editor.js | 2 +- common/content/events.js | 2 +- common/content/find.js | 2 +- common/content/help.css | 2 +- common/content/hints.js | 2 +- common/content/io.js | 2 +- common/content/liberator.js | 2 +- common/content/liberator.xul | 2 +- common/content/mappings.js | 2 +- common/content/modes.js | 2 +- common/content/options.js | 2 +- common/content/tabs.js | 2 +- common/content/template.js | 2 +- common/content/ui.js | 2 +- common/content/util.js | 2 +- common/skin/liberator.css | 2 +- muttator/AUTHORS | 2 +- muttator/License.txt | 2 +- muttator/content/compose/compose.xul | 2 +- muttator/content/compose/liberator.xul | 120 ++++++++++++++++++++++++- muttator/content/config.js | 2 +- muttator/content/mail.js | 2 +- muttator/content/muttator.xul | 2 +- muttator/locale/en-US/asciidoc.conf | 2 +- muttator/locale/en-US/intro.txt | 2 +- vimperator/AUTHORS | 2 +- vimperator/Makefile | 2 +- vimperator/content/bookmarks.js | 2 +- vimperator/content/config.js | 2 +- vimperator/content/vimperator.xul | 2 +- vimperator/locale/en-US/asciidoc.conf | 2 +- vimperator/locale/en-US/intro.txt | 2 +- 36 files changed, 154 insertions(+), 36 deletions(-) mode change 120000 => 100644 muttator/content/compose/liberator.xul diff --git a/License.txt b/License.txt index 7efdb050..39f969f2 100644 --- a/License.txt +++ b/License.txt @@ -10,7 +10,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/buffer.js b/common/content/buffer.js index a9cb4831..237e2930 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/commands.js b/common/content/commands.js index d6417a23..6cc8ab97 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/completion.js b/common/content/completion.js index 5c8e9d2d..16e1d1a4 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/editor.js b/common/content/editor.js index 59d1c9dd..073e88cf 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/events.js b/common/content/events.js index 51d1ecb8..8d5dfe29 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/find.js b/common/content/find.js index 90a73868..89ebcb1f 100644 --- a/common/content/find.js +++ b/common/content/find.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/help.css b/common/content/help.css index 67bdba86..c8107467 100644 --- a/common/content/help.css +++ b/common/content/help.css @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/hints.js b/common/content/hints.js index 5e27d0c4..c263ae30 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/io.js b/common/content/io.js index ffebc794..bc0d1a15 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Code based on venkman Alternatively, the contents of this file may be used under the terms of diff --git a/common/content/liberator.js b/common/content/liberator.js index 9c0b2279..188bb145 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/liberator.xul b/common/content/liberator.xul index e7609f52..d26700a7 100644 --- a/common/content/liberator.xul +++ b/common/content/liberator.xul @@ -13,7 +13,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/mappings.js b/common/content/mappings.js index 0f222d64..26864c2b 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/modes.js b/common/content/modes.js index b00ec691..5166e3e8 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/options.js b/common/content/options.js index 1442ce23..fb9bbeae 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/tabs.js b/common/content/tabs.js index 3d44fbcb..d990a346 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/template.js b/common/content/template.js index ea6cf3a1..9f4df824 100644 --- a/common/content/template.js +++ b/common/content/template.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/ui.js b/common/content/ui.js index 56abd03b..4048bcb8 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/content/util.js b/common/content/util.js index 24a167e2..ce1705d4 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/common/skin/liberator.css b/common/skin/liberator.css index 677adbef..c4475f59 100644 --- a/common/skin/liberator.css +++ b/common/skin/liberator.css @@ -11,7 +11,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/muttator/AUTHORS b/muttator/AUTHORS index cdad350d..763ced8e 100644 --- a/muttator/AUTHORS +++ b/muttator/AUTHORS @@ -1,5 +1,5 @@ Main developer/Project founder: - * Martin Stubenschrott (stubenschrott@gmx.net) + * Martin Stubenschrott (stubenschrott@vimperator.org) Developers: * Daniel Bainton (dpb .AT. driftaway .DOT. org) diff --git a/muttator/License.txt b/muttator/License.txt index 7efdb050..39f969f2 100644 --- a/muttator/License.txt +++ b/muttator/License.txt @@ -10,7 +10,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/muttator/content/compose/compose.xul b/muttator/content/compose/compose.xul index f7466a7a..a0db3f57 100644 --- a/muttator/content/compose/compose.xul +++ b/muttator/content/compose/compose.xul @@ -13,7 +13,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Copyright (c) 2006-2009 by Martin Stubenschrott +Copyright (c) 2006-2009 by Martin Stubenschrott Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or diff --git a/muttator/content/compose/liberator.xul b/muttator/content/compose/liberator.xul deleted file mode 120000 index e6fca064..00000000 --- a/muttator/content/compose/liberator.xul +++ /dev/null @@ -1 +0,0 @@ -../../../common/content/liberator.xul \ No newline at end of file diff --git a/muttator/content/compose/liberator.xul b/muttator/content/compose/liberator.xul new file mode 100644 index 00000000..d26700a7 --- /dev/null +++ b/muttator/content/compose/liberator.xul @@ -0,0 +1,119 @@ + + + + + + +]> + + + +