From 18b23849f6f6ce92b062dfc6738c36da97e8ccd8 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Sat, 25 May 2013 23:44:29 +1000 Subject: Add a simplified way to set a SelectionText from a std::string. --- src/Editor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/Editor.h b/src/Editor.h index 3888d2b87..46167cf4a 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -113,6 +113,9 @@ public: lineCopy = lineCopy_; FixSelectionForClipboard(); } + void Copy(const std::string &s, int codePage_, int characterSet_, bool rectangular_, bool lineCopy_) { + Copy(s.c_str(), s.length()+1, codePage_, characterSet_, rectangular_, lineCopy_); + } void Copy(const SelectionText &other) { Copy(other.s, other.len, other.codePage, other.characterSet, other.rectangular, other.lineCopy); } -- cgit v1.2.3