diff options
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/normal.cc b/src/normal.cc index 4922b70f..14ff7b40 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -631,6 +631,17 @@ void erase_selections(Context& context, int) erase(context.buffer(), context.selections()); } +void cat_erase_selections(Context& context, int) +{ + auto sels = context.selections_content(); + String str; + for (auto& sel : sels) + str += sel; + RegisterManager::instance()['"'] = memoryview<String>(str); + erase(context.buffer(), context.selections()); +} + + void change(Context& context, int param) { RegisterManager::instance()['"'] = context.selections_content(); @@ -1253,6 +1264,7 @@ KeyMap keymap = { alt('F'), select_to_next_char<SelectFlags::Inclusive | SelectFlags::Extend | SelectFlags::Reverse> }, { 'd', erase_selections }, + { 'D', cat_erase_selections }, { 'c', change }, { 'i', enter_insert_mode<InsertMode::Insert> }, { 'I', enter_insert_mode<InsertMode::InsertAtLineBegin> }, |
