From b72d54ba2ffdd528a4a25c85243b375efec0aaea Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Wed, 9 Jan 2008 12:54:52 +0000 Subject: [PATCH] fixed g not beeping again (thanks calmar) --- content/events.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/events.js b/content/events.js index b2196dfe..6760b76a 100644 --- a/content/events.js +++ b/content/events.js @@ -1070,8 +1070,11 @@ vimperator.Events = function () //{{{ } else // if the key is neither a mapping nor the start of one { - if (vimperator.input.buffer != "" && !skipMap) // no map found -> refeed stuff in v.input.buffer + // the mode checking is necessary so that things like g do not beep + if (vimperator.input.buffer != "" && !skipMap && (vimperator.mode == vimperator.modes.INSERT || + vimperator.mode == vimperator.modes.COMMAND_LINE || vimperator.mode == vimperator.modes.TEXTAREA)) { + // no map found -> refeed stuff in v.input.buffer (only while in INSERT, CO... modes) skipMap = true; // ignore maps while doing so vimperator.events.feedkeys(vimperator.input.buffer, true); } @@ -1080,6 +1083,7 @@ vimperator.Events = function () //{{{ if (--inputBufferLength == 0) // inputBufferLength == 0. v.input.buffer refeeded... skipMap = false; // done... } + vimperator.input.buffer = ""; vimperator.input.pendingArgMap = null; vimperator.input.pendingMotionMap = null;