diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-07-11 14:15:27 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-07-11 14:15:27 +0200 |
| commit | 06dd3f8aaded9460d998a7f5c3ae0e2b46170d2f (patch) | |
| tree | 9929addf1a1a65a689a19d13a7c5f774ee2edad7 /src/editor.cc | |
| parent | 5cbded8221b5be8b1842de6841ce161b0b7bf4a8 (diff) | |
Add Editor::replace(memoryview) and bind alt-P to replace paste
Diffstat (limited to 'src/editor.cc')
| -rw-r--r-- | src/editor.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/editor.cc b/src/editor.cc index 2567d599..a174ead0 100644 --- a/src/editor.cc +++ b/src/editor.cc @@ -79,6 +79,13 @@ void Editor::replace(const String& string) insert(string); } +void Editor::replace(const memoryview<String>& strings) +{ + scoped_edition edition(*this); + erase(); + insert(strings); +} + std::vector<String> Editor::selections_content() const { std::vector<String> contents; |
