diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-02-11 11:42:04 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-02-11 11:42:04 +0200 |
commit | e9ec68501308fc2cd1bc65600998b1028b416ced (patch) | |
tree | 0eea9524317123a27f28d52dee366514168eec28 /src | |
parent | 2c3741aabe94295439539d61e9095d7bc8705fc7 (diff) |
Added a binding for "Paste Preceding Line"
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/documentwidget.c | 5 | ||||
-rw-r--r-- | src/ui/keys.c | 1 |
2 files changed, 4 insertions, 2 deletions
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) { | |||
3240 | addChildPos_Widget(buttons, iClob(lineBreak), front_WidgetAddPos); | 3240 | addChildPos_Widget(buttons, iClob(lineBreak), front_WidgetAddPos); |
3241 | } | 3241 | } |
3242 | /* Menu for additional actions, past entries. */ { | 3242 | /* Menu for additional actions, past entries. */ { |
3243 | const iBinding *bind = findCommand_Keys("input.precedingline"); | ||
3243 | iMenuItem items[] = { { "${menu.input.precedingline}", | 3244 | iMenuItem items[] = { { "${menu.input.precedingline}", |
3244 | SDLK_v, | 3245 | bind->key, |
3245 | KMOD_PRIMARY | KMOD_SHIFT, | 3246 | bind->mods, |
3246 | format_CStr("!valueinput.set ptr:%p text:%s", | 3247 | format_CStr("!valueinput.set ptr:%p text:%s", |
3247 | buttons, | 3248 | buttons, |
3248 | cstr_String(&d->linePrecedingLink)) } }; | 3249 | 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_[] = | |||
241 | { 110,{ "${menu.save.downloads}", SDLK_s, KMOD_PRIMARY, "document.save" }, 0 }, | 241 | { 110,{ "${menu.save.downloads}", SDLK_s, KMOD_PRIMARY, "document.save" }, 0 }, |
242 | { 120,{ "${keys.upload}", SDLK_u, KMOD_PRIMARY, "document.upload" }, 0 }, | 242 | { 120,{ "${keys.upload}", SDLK_u, KMOD_PRIMARY, "document.upload" }, 0 }, |
243 | { 121,{ "${keys.upload.edit}", SDLK_e, KMOD_PRIMARY, "document.upload copy:1" }, 0 }, | 243 | { 121,{ "${keys.upload.edit}", SDLK_e, KMOD_PRIMARY, "document.upload copy:1" }, 0 }, |
244 | { 130,{ "${keys.input.precedingline}", SDLK_v, KMOD_PRIMARY | KMOD_SHIFT, "input.precedingline" }, 0 }, | ||
244 | /* The following cannot currently be changed (built-in duplicates). */ | 245 | /* The following cannot currently be changed (built-in duplicates). */ |
245 | #if defined (iPlatformApple) | 246 | #if defined (iPlatformApple) |
246 | { 1002, { NULL, SDLK_LEFTBRACKET, KMOD_PRIMARY, "navigate.back" }, 0 }, | 247 | { 1002, { NULL, SDLK_LEFTBRACKET, KMOD_PRIMARY, "navigate.back" }, 0 }, |