From 347f12e5598b0e1b58a229a9f22fd5000ffd8661 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Wed, 12 Dec 2007 06:00:38 +0000 Subject: [PATCH] fixed timeout when changing from HINTS mode --- NEWS | 1 + TODO | 11 ++++++----- content/events.js | 3 ++- content/modes.js | 6 +++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 3a9947dc..42b78498 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ removed the following hint options: 'hintchars' 'maxhints' added the following hint options: 'hinttimeout' * IMPORTANT: changed 'I' key to Ctrl-Q to also work in textboxes + * scroll commands like j/k/gg/etc. have a much better heuristic to find a scrollable frame * imap, inoremap, iunmap and imapclear added * new g0 and g$ mappings to go to the first/last tab * new 'history' option for specifying the number of Ex commands and diff --git a/TODO b/TODO index 7c91dca7..e4efb8a7 100644 --- a/TODO +++ b/TODO @@ -5,24 +5,25 @@ Priority list: BUGS: - add window resize support to hints - can't reverse tab through the vimperator toolbar -- gu and gU don't work on local files properly - still valid? Doesn't work on Windows. +- gu and gU doesn't work on Windows. - pvh option not working - searching backwards incrementally does not work i.e. with 'incsearch' set +- http://msdn2.microsoft.com/en-us/library/ms535258.aspx does not scroll with j/k/etc. + same for http://forum.mootools.net/topic.php?id=3458 FEATURES: 9 :command for new commands -9 :map a :bmark and A should toggle the "starred" (=bookmarked) state of the current url -8 add an interface for navigating document relationships including usage of - the ] and [ keys to e.g. jump to the next heading ]], next image ]i, previous - textbox [t and so on 8 middleclick in content == p, and if command line is open, paste there the clipboard buffer 8 autocommands (BrowserStart, BrowserQuit, TabClose, TabOpen, TabChanged, PreLocationChange, PageLoaded, any more?) 8 :sidebar improvements (:sidebar! Downloads while downloads is open should refocus the sidebar) +8 ;? will show information about like id, class, image filename, etc. +8 there should be a listbox/combobox mode 7 use ctrl-n/p in insert mode for word completion 7 implement LocationList window, and get rid off/change PreviewWindow to be a real preview window being able to display html pages 7 [ctrl-o/i] to Go back to a Previous Position (done partly, however currenty does not use a per tab jumplist) 7 whereever possible: get rid of dialogs and ask console-like dialog questions or write error prompts directly on the webpage or with :echo() 7 :set! should also set about:config options (with autocomplete) +6 jump to the next heading with ]h, next image ]i, previous textbox [t and so on 6 :grep support (needs location list) 6 use '' to jump between marks like vim 6 pipe selected text/link/website to an external command diff --git a/content/events.js b/content/events.js index 777d4974..f53a3e83 100644 --- a/content/events.js +++ b/content/events.js @@ -779,7 +779,8 @@ vimperator.Events = function () //{{{ if (flags & Components.interfaces.nsIWebProgressListener.STATE_START) { vimperator.statusline.updateProgress(0); - vimperator.modes.reset(false); + setTimeout (function () { vimperator.modes.reset(false); }, + vimperator.mode == vimperator.modes.HINTS ? 500 : 0); } else if (flags & Components.interfaces.nsIWebProgressListener.STATE_STOP) ;// vimperator.statusline.updateUrl(); diff --git a/content/modes.js b/content/modes.js index ad22db13..823cfd0d 100644 --- a/content/modes.js +++ b/content/modes.js @@ -75,13 +75,13 @@ vimperator.modes = (function () //{{{ } } - // XXX: Pay attention that you don't run into endless loops + // NOTE: Pay attention that you don't run into endless loops // Usually you should only indicate to leave a special mode linke HINTS // by calling vimperator.modes.reset() and adding the stuff which is needed // for its cleanup here function handleModeChange(oldMode, newMode) { - // TODO: fix v.log() to work verbosity level + // TODO: fix v.log() to work with verbosity level // vimperator.log("switching from mode " + oldMode + " to mode " + newMode, 7); switch (oldMode) @@ -117,7 +117,7 @@ vimperator.modes = (function () //{{{ if (newMode == vimperator.modes.NORMAL) { - // XXX: why this code? + // disable caret mode when we want to switch to normal mode var value = vimperator.options.getFirefoxPref("accessibility.browsewithcaret", false); if (value) vimperator.options.setFirefoxPref("accessibility.browsewithcaret", false);