From e9ec68501308fc2cd1bc65600998b1028b416ced Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 11 Feb 2022 11:42:04 +0200 Subject: Added a binding for "Paste Preceding Line" --- src/ui/documentwidget.c | 5 +++-- src/ui/keys.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 8eb58b21..a52e99af 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -3240,9 +3240,10 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) { addChildPos_Widget(buttons, iClob(lineBreak), front_WidgetAddPos); } /* Menu for additional actions, past entries. */ { + const iBinding *bind = findCommand_Keys("input.precedingline"); iMenuItem items[] = { { "${menu.input.precedingline}", - SDLK_v, - KMOD_PRIMARY | KMOD_SHIFT, + bind->key, + bind->mods, format_CStr("!valueinput.set ptr:%p text:%s", buttons, cstr_String(&d->linePrecedingLink)) } }; diff --git a/src/ui/keys.c b/src/ui/keys.c index d4d9320e..33f39633 100644 --- a/src/ui/keys.c +++ b/src/ui/keys.c @@ -241,6 +241,7 @@ static const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] = { 110,{ "${menu.save.downloads}", SDLK_s, KMOD_PRIMARY, "document.save" }, 0 }, { 120,{ "${keys.upload}", SDLK_u, KMOD_PRIMARY, "document.upload" }, 0 }, { 121,{ "${keys.upload.edit}", SDLK_e, KMOD_PRIMARY, "document.upload copy:1" }, 0 }, + { 130,{ "${keys.input.precedingline}", SDLK_v, KMOD_PRIMARY | KMOD_SHIFT, "input.precedingline" }, 0 }, /* The following cannot currently be changed (built-in duplicates). */ #if defined (iPlatformApple) { 1002, { NULL, SDLK_LEFTBRACKET, KMOD_PRIMARY, "navigate.back" }, 0 }, -- cgit v1.2.3