1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 01:17:59 +01:00

added -- MESSAGE -- mode handling to muttator. This will be the only muttator-specific mode added to the VIM core.

This commit is contained in:
Martin Stubenschrott
2008-02-05 13:49:59 +00:00
parent 6ec0f8f7c1
commit 7d9e1e100a
5 changed files with 26 additions and 11 deletions

View File

@@ -772,8 +772,17 @@ vimperator.Events = function () //{{{
vimperator.modes.main = vimperator.modes.TEXTAREA;
vimperator.buffer.lastInputField = elem;
}
else if (vimperator.config.name == "Muttator" && (!elem || elem instanceof HTMLElement))
{
// we switch to -- MESSAGE -- mode for muttator, whenever no tree or an HTML element
// which is NOT an input element is selected
vimperator.mode = vimperator.modes.MESSAGE;
return;
}
else if (vimperator.mode == vimperator.modes.INSERT ||
vimperator.mode == vimperator.modes.TEXTAREA ||
// vimperator.mode == vimperator.modes.MESSAGE ||
vimperator.mode == vimperator.modes.VISUAL)
{
// FIXME: currently this hack is disabled to make macros work