1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 18:44:12 +01:00

y can yank the selection in visual caret mode now

This commit is contained in:
Martin Stubenschrott
2008-01-09 17:50:47 +00:00
parent 74310ca17a
commit 6605e4fa19
2 changed files with 11 additions and 2 deletions

View File

@@ -844,7 +844,7 @@ vimperator.Mappings = function () //{{{
help: "When running in X11 the location is also put into the selection, which can be pasted with the middle mouse button."
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["Y"],
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL, vimperator.modes.VISUAL], ["Y"],
function ()
{
var sel = window.content.document.getSelection();
@@ -1676,7 +1676,13 @@ vimperator.Mappings = function () //{{{
vimperator.modes.set(vimperator.modes.TEXTAREA);
}
else
vimperator.beep(); // TODO: yanking is possible for caret mode
{
var sel = window.content.document.getSelection();
if (sel)
vimperator.copyToClipboard(sel, true);
else
vimperator.beep();
}
},
{ }
));