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

<c-u> doesn't beep anymore when there is no text to delete

This commit is contained in:
Martin Stubenschrott
2008-03-31 20:44:48 +00:00
parent 1577c8099d
commit 01d9ffcc4d
2 changed files with 4 additions and 25 deletions

View File

@@ -237,7 +237,8 @@ liberator.Editor = function () //{{{
// broken in FF3, deletes the whole line: // broken in FF3, deletes the whole line:
// liberator.editor.executeCommand("cmd_deleteToBeginningOfLine", 1); // liberator.editor.executeCommand("cmd_deleteToBeginningOfLine", 1);
liberator.editor.executeCommand("cmd_selectBeginLine", 1); liberator.editor.executeCommand("cmd_selectBeginLine", 1);
liberator.editor.executeCommand("cmd_delete", 1); if (getController().isCommandEnabled("cmd_delete"))
liberator.editor.executeCommand("cmd_delete", 1);
}); });
liberator.mappings.add(modes, liberator.mappings.add(modes,

View File

@@ -480,6 +480,7 @@ liberator.Events = function () //{{{
else else
liberator.echo("Waiting for page to load..."); liberator.echo("Waiting for page to load...");
} }
liberator.modes.show();
// TODO: allow macros to be continued when page does not fully load with an option // TODO: allow macros to be continued when page does not fully load with an option
var ret = (liberator.buffer.loaded == 1); var ret = (liberator.buffer.loaded == 1);
@@ -1115,30 +1116,7 @@ liberator.Events = function () //{{{
|| liberator.mode == liberator.modes.INSERT) || liberator.mode == liberator.modes.INSERT)
{ {
if (key == "<Return>") if (key == "<Return>")
{ return false;
/*if (liberator.modes.isReplaying != 44)
{
// TODO: how to really submit the correct form?
//content.document.forms[0].submit();
var elem = document.commandDispatcher.focusedElement;
if (elem)
{
liberator.log("dipatching <enter>");
event.ignore = true;
try{
elem.dispatchEvent(event);
} catch (e) { alert(e); }
event.stopPropagation();
event.preventDefault();
liberator.log("dipatched");
waitForPageLoaded();
liberator.log("page loaded");
return false;
}
}
else*/
return false;
}
else if (key == "<Space>" || key == "<Up>" || key == "<Down>") else if (key == "<Space>" || key == "<Up>" || key == "<Down>")
return false; return false;
} }