From b4df9da16e6adfb4c688797fb840ccd5e679a4f1 Mon Sep 17 00:00:00 2001 From: John Foerch Date: Sat, 8 Mar 2008 11:32:08 -0500 Subject: [PATCH] modules/commands.js: simplifying paste-x-primary-selection just pass the field in question, not the buffer --- modules/commands.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/commands.js b/modules/commands.js index e9860a3..356961a 100644 --- a/modules/commands.js +++ b/modules/commands.js @@ -93,16 +93,15 @@ default_browse_targets["jsconsole"] = "find-url"; // XXX: side-effect: contents from primary selection will overwrite clipboard -function paste_x_primary_selection (buffer) { +function paste_x_primary_selection (field) { var str = read_from_x_primary_selection (); - var field = buffer.focused_element; field.value = field.value.substr (0, field.selectionStart) + str + field.value.substr (field.selectionEnd); } interactive ( "paste-x-primary-selection", function (I) { - paste_x_primary_selection (I.buffer); + paste_x_primary_selection (I.buffer.focused_element); }); -- 2.11.4.GIT