From d181a40a91f87e1fb2490281947f07b2fcd071bc Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 3 Jul 2014 00:25:39 +0100 Subject: Add support for paste all (on ) Paste all pastes all yanked text at all selections, selecting each pasted text. Replace paste moves to R, and concat yank/concat delete (Y and D) are removed. Fixes #161 --- src/selection.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/selection.cc') diff --git a/src/selection.cc b/src/selection.cc index bd18bf85..f6eab856 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -463,7 +463,8 @@ BufferIterator prepare_insert(Buffer& buffer, const Selection& sel, InsertMode m return {}; } -void SelectionList::insert(memoryview strings, InsertMode mode) +void SelectionList::insert(memoryview strings, InsertMode mode, + bool select_inserted) { if (strings.empty()) return; @@ -496,7 +497,7 @@ void SelectionList::insert(memoryview strings, InsertMode mode) changes_tracker.update(change); m_timestamp = m_buffer->timestamp(); - if (mode == InsertMode::Replace) + if (select_inserted or mode == InsertMode::Replace) { sel.anchor() = change.begin; sel.cursor() = m_buffer->char_prev(change.end); -- cgit v1.2.3