From aa67f0a1949dc0e8f9b2c4c9cb488f6a267a0145 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 29 Jan 2009 12:56:51 +1100 Subject: [PATCH 01/13] Add TODO regarding Windows paths in messages. --- vimperator/TODO | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vimperator/TODO b/vimperator/TODO index 7ee8644c..9379beaf 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -29,10 +29,12 @@ BUGS: => it often overwrites the open command line while editing etc. - and autocmd 'keywords' are not available when adding a bookmark - they're being set after the observer triggers the autocmd event. -- MOW is broken for multiple commands when open E.g. :ls | ls +- MOW rendering is broken for multiple commands when open E.g. :ls | ls - completion height is broken, try :a...., when it wraps it's totally off. and even if it is not totally off, i had it jump by one pixel when wrapping around. If that's unfixable, i propose reverting the new completion height stuff. +- Windows paths have escaped backslashes in messages - presumably due to + String#quote change. FEATURES: 9 finish :help TODOs From 6d49a81d7f6dd062bc73137a226c3779357c1606 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 29 Jan 2009 13:09:36 +1100 Subject: [PATCH 02/13] Add TODO regarding :messages performance. --- vimperator/TODO | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimperator/TODO b/vimperator/TODO index 9379beaf..725fe02d 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -35,6 +35,8 @@ BUGS: If that's unfixable, i propose reverting the new completion height stuff. - Windows paths have escaped backslashes in messages - presumably due to String#quote change. +- :messages is _very_ slow for message history of several thousand lines -> + Unresponsive Script: util.js:79 (sometimes xmlToDom() and elsewhere) FEATURES: 9 finish :help TODOs From c1c6c659bc9e5a71c28afc8773ee7353b0260a8d Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 28 Jan 2009 22:06:26 -0500 Subject: [PATCH 03/13] TODO bugs: ":pageinfo" on ":help"; "g<" and "g" (*) Fix ":pageinfo" on ":help", (*) Prevent Vimp from taking "" mappings as literal characters --- vimperator/TODO | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vimperator/TODO b/vimperator/TODO index 725fe02d..e1937716 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -18,6 +18,12 @@ BUGS: - :sidebar improvements (:sidebar! Downloads while downloads is open should refocus the sidebar) - ;s saves the page rather than the image - http://cgiirc.blitzed.org?chan=%23debug is unusable after login in +- :pageinfo should at least fail gracefully on :help pages (now it throws + Error: Permission denied to call method XULControllers.getControllerForCommand) +- "g<" fails without a trailing escape because both "g<" and "g" + are mapped. Vimp should recognize "" as an atom that should not + be matched literally. In fact, typing "g" out literally is + equivalent to typing "g" and then . (recent CVS regressions): - :set noflashblock seems broken (= :set fb? afterwards says "fb"), let's see if that's a @@ -73,7 +79,7 @@ FEATURES: google to another page and click 10 links there, [d would take me back to the google page opera's fast forward does something like this 7 make an option to disable session saving by default when you close Firefox -7 The output of the pageinfo-command sould contain the security-information of ssl-encrypted sites +7 The output of the pageinfo-command should contain the security-information of ssl-encrypted sites 7 Add :every command 6 support private mode (and :set [no]private): http://ehsanakhgari.org/blog/2008-11-08/prepare-your-add-private-browsing 6 add [count] support to :b* and :tab* commands where missing From ce0e5c1879a5a29d150315ef76505f586740baa5 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sat, 31 Jan 2009 11:37:14 +0100 Subject: [PATCH 04/13] Updated Donors --- vimperator/Donors | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vimperator/Donors b/vimperator/Donors index ec93f6f7..9a96542d 100644 --- a/vimperator/Donors +++ b/vimperator/Donors @@ -2,6 +2,11 @@ Contiuous donations: * Daniel Bainton (web hosting) 2009: +* David C Foor +* Oliver Schaefer +* Paul Moss +* Yongji Zhang +* Brian Peiris * Peleg Michaeli ("Every hand revealed" from my amazon.de wishlist) * InspireFocus * Michael Fremont From 4de7cc8db8022ff0d06d226392fd0b6706091874 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sat, 31 Jan 2009 11:59:38 +0100 Subject: [PATCH 05/13] * Fixed strange completion height bug. One less blocker to 2.0beta1. * Doug: Might ui.js:701: elements[elements.length - 1].scrollIntoView(true); be the problem of your very slow MOW for multiple items? I just noticed that :echo liberator takes 0.25sec , but :echo liberator when the MOW already displas :echo window takes 0.47 sec --- common/content/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/content/ui.js b/common/content/ui.js index 622fb6ac..a9705489 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1758,7 +1758,7 @@ function ItemList(id) //{{{ , divNodes); doc.body.replaceChild(div, doc.body.firstChild); - div.scrollIntoView(true); + //div.scrollIntoView(true); items.contextList.forEach(function init_eachContext(context) { delete context.cache.nodes; @@ -1941,7 +1941,7 @@ function ItemList(id) //{{{ if (index >= 0) { getCompletion(index).setAttribute("selected", "true"); - getCompletion(index).scrollIntoView(false); + //getCompletion(index).scrollIntoView(false); } //if (index == 0) From 894a4c52a0cace82b75c8d966cb5eaf7597a5275 Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Sun, 1 Feb 2009 21:00:24 +0200 Subject: [PATCH 06/13] Add a TODO entry for accessing NEWS --- vimperator/TODO | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimperator/TODO b/vimperator/TODO index e1937716..c5c5e383 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -50,6 +50,8 @@ FEATURES: 9 adaptive timeout for auto-completions, :set completions can be updated more often than :open foo 9 use the storage module for autocommands +9 the NEWS file should be more easily available for users, via :help news or something + at the moment you need to unzip the xpi or check the sources to view it, which isn't user friendly 8 support 'activate' in buffer.followLink? Leave this to the bookmarks.tabs.loadInBackground. Hint activation should be nearly equivalent to the corresponding mouse motion, and that From f3971d13b51dfe977b35dd1c9b95c5b5bf8664fb Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sun, 1 Feb 2009 23:40:28 +0100 Subject: [PATCH 07/13] Fix resetting completions (hopefully) --- common/content/ui.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/content/ui.js b/common/content/ui.js index a9705489..c5493831 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1274,7 +1274,8 @@ function CommandLine() //{{{ } else if (event.type == "input") { - //this.resetCompletions(); -> already handled by "keypress" below (hopefully), so don't do it twice + liberator.dump("input: " + command); + this.resetCompletions(); // -> already handled by "keypress" below (hopefully), so don't do it twice liberator.triggerCallback("change", currentExtendedMode, command); } else if (event.type == "keypress") @@ -1322,7 +1323,7 @@ function CommandLine() //{{{ else if (key == "") { // reset the tab completion - this.resetCompletions(); + //this.resetCompletions(); // and blur the command line if there is no text left if (command.length == 0) @@ -1333,7 +1334,7 @@ function CommandLine() //{{{ } else // any other key { - this.resetCompletions(); + //this.resetCompletions(); } return true; // allow this event to be handled by Firefox } From c125a9dd66470e419f8d83ac295e45b390dea574 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Mon, 2 Feb 2009 00:18:04 +0100 Subject: [PATCH 08/13] updated TODO (:ha! seems broken) --- common/content/ui.js | 4 ++-- vimperator/TODO | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/content/ui.js b/common/content/ui.js index c5493831..9e3112ca 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1274,8 +1274,8 @@ function CommandLine() //{{{ } else if (event.type == "input") { - liberator.dump("input: " + command); - this.resetCompletions(); // -> already handled by "keypress" below (hopefully), so don't do it twice + //liberator.dump("input: " + command); + this.resetCompletions(); liberator.triggerCallback("change", currentExtendedMode, command); } else if (event.type == "keypress") diff --git a/vimperator/TODO b/vimperator/TODO index c5c5e383..8cc67312 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -43,6 +43,7 @@ BUGS: String#quote change. - :messages is _very_ slow for message history of several thousand lines -> Unresponsive Script: util.js:79 (sometimes xmlToDom() and elsewhere) +- :hardcopy! seems to be broken for me FEATURES: 9 finish :help TODOs From 8398287449ca68718f0f7cf802b43fa15c5b74f0 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Mon, 2 Feb 2009 09:29:11 -0500 Subject: [PATCH 09/13] Removed :pageinfo TODO. Problem was in a plugin. --- vimperator/TODO | 2 -- 1 file changed, 2 deletions(-) diff --git a/vimperator/TODO b/vimperator/TODO index 8cc67312..f743c6e3 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -18,8 +18,6 @@ BUGS: - :sidebar improvements (:sidebar! Downloads while downloads is open should refocus the sidebar) - ;s saves the page rather than the image - http://cgiirc.blitzed.org?chan=%23debug is unusable after login in -- :pageinfo should at least fail gracefully on :help pages (now it throws - Error: Permission denied to call method XULControllers.getControllerForCommand) - "g<" fails without a trailing escape because both "g<" and "g" are mapped. Vimp should recognize "" as an atom that should not be matched literally. In fact, typing "g" out literally is From e7c57052fa63eefeec655c13d0f5c160b5597afc Mon Sep 17 00:00:00 2001 From: anekos Date: Tue, 3 Feb 2009 20:08:00 +0900 Subject: [PATCH 10/13] Fix: commands.parseArgs raises "Invalid option: .." Error. When command(:foo) has NOARG option(-bar), ":foo -bar" raises the error. --- common/content/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/commands.js b/common/content/commands.js index 170568b1..d6417a23 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -573,7 +573,7 @@ function Commands() //{{{ count++; // to compensate the "=" character } - else if (!/\s/.test(sep)) // this isn't really an option as it has trailing characters, parse it as an argument + else if (!/\s/.test(sep) && sep != undefined) // this isn't really an option as it has trailing characters, parse it as an argument { invalid = true; } From 125f3057e96bfec72dda7e30ba968510cbe1583d Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Tue, 3 Feb 2009 22:32:40 +0100 Subject: [PATCH 11/13] fixed hintmatching with wordstartswith, thanks Daniel --- common/content/hints.js | 92 +++++++++++++---------------------------- 1 file changed, 28 insertions(+), 64 deletions(-) diff --git a/common/content/hints.js b/common/content/hints.js index 12f0ac57..50c4533a 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -399,87 +399,51 @@ function Hints() //{{{ let wordSplitRegex = RegExp(options["wordseparators"]); // What the **** does this do? --Kris + // + // This function matches hintStrings like 'hekho' to links like 'Hey Kris, how are you?' -> [HE]y [K]ris [HO]w are you --Daniel function charsAtBeginningOfWords(chars, words, allowWordOverleaping) { - let charIdx = 0; - let numMatchedWords = 0; - for (let [,word] in Iterator(words)) + function charMatches(charIdx, chars, wordIdx, words, inWordIdx, allowWordOverleaping) { - if (word.length == 0) - continue; - - let wcIdx = 0; - // Check if the current word matches same characters as the previous word. - // Each already matched word has matched at least one character. - if (charIdx > numMatchedWords) + let matches = (chars[charIdx] == words[wordIdx][inWordIdx]); + if ((matches == false && allowWordOverleaping) || words[wordIdx].length == 0) { - let matchingStarted = false; - for (let i in util.range(numMatchedWords, charIdx)) - { - if (chars[i] == word[wcIdx]) - { - matchingStarted = true; - wcIdx++; - } - else if (matchingStarted) - { - wcIdx = 0; - break; - } - } + let nextWordIdx = wordIdx + 1; + if (nextWordIdx == words.length) + return false; + + return charMatches(charIdx, chars, nextWordIdx, words, 0, allowWordOverleaping); } - // the current word matches same characters as the previous word - let prevCharIdx; - if (wcIdx > 0) + if (matches) { - prevCharIdx = charIdx; - // now check if it matches additional characters - for (; wcIdx < word.length && charIdx < chars.length; wcIdx++, charIdx++) - { - if (word[wcIdx] != chars[charIdx]) - break; - } + let nextCharIdx = charIdx + 1; + if (nextCharIdx == chars.length) + return true; - // the word doesn't match additional characters, now check if the - // already matched characters are equal to the next characters for matching, - // if yes, then consume them - if (prevCharIdx == charIdx) - { - for (let i = 0; i < wcIdx && charIdx < chars.length; i++, charIdx++) - { - if (word[i] != chars[charIdx]) - break; - } - } + let nextWordIdx = wordIdx + 1; + let beyondLastWord = (nextWordIdx == words.length); + let charMatched = false; + if (beyondLastWord == false) + charMatched = charMatches(nextCharIdx, chars, nextWordIdx, words, 0, allowWordOverleaping) - numMatchedWords++; - } - // the current word doesn't match same characters as the previous word, just - // try to match the next characters - else - { - prevCharIdx = charIdx; - for (let i = 0; i < word.length && charIdx < chars.length; i++, charIdx++) - { - if (word[i] != chars[charIdx]) - break; - } + if (charMatched) + return true; - if (prevCharIdx == charIdx) + if (charMatched == false || beyondLastWord == true) { - if (!allowWordOverleaping) + let nextInWordIdx = inWordIdx + 1; + if (nextInWordIdx == words[wordIdx].length) return false; + + return charMatches(nextCharIdx, chars, wordIdx, words, nextInWordIdx, allowWordOverleaping); } - else - numMatchedWords++; } - if (charIdx == chars.length) - return true; + return false; } - return (charIdx == chars.length); + return charMatches(0, chars, 0, words, 0, allowWordOverleaping); } function stringsAtBeginningOfWords(strings, words, allowWordOverleaping) From 5f5c437ddf02d9420730aa15b3db853cc6a63fa1 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Wed, 4 Feb 2009 14:51:29 +0100 Subject: [PATCH 12/13] Fixed muttator for recent TBs, minimum requirements are 3.0b2pre now --- common/content/hints.js | 2 +- muttator/content/mail.js | 7 ++--- muttator/install.rdf | 56 ++++++++++++++++++++-------------------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/common/content/hints.js b/common/content/hints.js index 50c4533a..d349ce58 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -425,7 +425,7 @@ function Hints() //{{{ let beyondLastWord = (nextWordIdx == words.length); let charMatched = false; if (beyondLastWord == false) - charMatched = charMatches(nextCharIdx, chars, nextWordIdx, words, 0, allowWordOverleaping) + charMatched = charMatches(nextCharIdx, chars, nextWordIdx, words, 0, allowWordOverleaping) if (charMatched) return true; diff --git a/muttator/content/mail.js b/muttator/content/mail.js index 61242230..1e523167 100644 --- a/muttator/content/mail.js +++ b/muttator/content/mail.js @@ -995,12 +995,13 @@ function Mail() //{{{ // TODO: find out why, and solve the problem try { - var msgs = folder.getMessages(msgWindow); + var msgs = folder.messages; } catch (e) { - liberator.dump("ERROR: " + folder.prettyName + " failed to getMessages\n"); - continue; + var msgs = folder.getMessages(msgWindow); // for older thunderbirds + liberator.dump("WARNING: " + folder.prettyName + " failed to getMessages, trying old API"); + //continue; } while (msgs.hasMoreElements()) diff --git a/muttator/install.rdf b/muttator/install.rdf index e02650d2..3785bda0 100644 --- a/muttator/install.rdf +++ b/muttator/install.rdf @@ -1,28 +1,28 @@ - - - - - - muttator@mozdev.org - Muttator - ###VERSION### - Make Thunderbird behave like Vim - Martin Stubenschrott - http://vimperator.org/ - chrome://muttator/skin/icon.png - - - content/muttator/ - - - - - - {3550f703-e582-4d05-9a08-453d09bdfdc6} - 3.0a1pre - 3.0b2pre - - - - - + + + + + + muttator@mozdev.org + Muttator + ###VERSION### + Make Thunderbird behave like Vim + Martin Stubenschrott + http://vimperator.org/ + chrome://muttator/skin/icon.png + + + content/muttator/ + + + + + + {3550f703-e582-4d05-9a08-453d09bdfdc6} + 3.0b2pre + 3.0b2 + + + + + From 946ab07254a4e6839713eec8cd23fd9bd277ecca Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 4 Feb 2009 22:58:35 -0500 Subject: [PATCH 13/13] Updated main Makefile to support 'make target1 target2' --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e44d7b9c..c0c3842b 100644 --- a/Makefile +++ b/Makefile @@ -9,5 +9,6 @@ $(TARGETS:%=\%.%): echo MAKE $@ $(MAKE) -C $* $(@:$*.%=%) -$(TARGETS): %: $(DIRS:%=%.%) +$(TARGETS): + $(MAKE) $(DIRS:%=%.$@)