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

fixed :map x :<cr> problem

This commit is contained in:
Martin Stubenschrott
2007-08-16 16:54:08 +00:00
parent e4166b3c76
commit 1e4ffc635c
2 changed files with 4 additions and 3 deletions

View File

@@ -601,7 +601,6 @@ function Commands() //{{{
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/) var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/)
var [lhs, rhs] = [matches[1], matches[2]]; var [lhs, rhs] = [matches[1], matches[2]];
// alert(">>" + lhs + "<<");
if (rhs) if (rhs)
{ {
vimperator.mappings.add(new Map(vimperator.modes.NORMAL, [lhs], vimperator.mappings.add(new Map(vimperator.modes.NORMAL, [lhs],

View File

@@ -310,8 +310,10 @@ function CommandLine() //{{{
if (event.type == "blur") if (event.type == "blur")
{ {
// prevent losing focus, there should be a better way, but it just didn't work otherwise // prevent losing focus, there should be a better way, but it just didn't work otherwise
setTimeout(function() {
if (vimperator.hasMode(vimperator.modes.COMMAND_LINE)) if (vimperator.hasMode(vimperator.modes.COMMAND_LINE))
setTimeout(function() { command_widget.inputField.focus(); }, 0); command_widget.inputField.focus();
}, 0);
} }
else if (event.type == "focus") else if (event.type == "focus")
{ {