aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2012-06-17 13:38:21 +1000
committernyamatongwe <unknown>2012-06-17 13:38:21 +1000
commitf0d56e473978dcfa017b6597ef4e2e09e5a477e6 (patch)
treec7d9b15f268ef84d933a9931ce05db5a1190ffb1 /src/Editor.cxx
parent7a340b339181d7e8981ad8d67ec07d75b2e5fa54 (diff)
downloadscintilla-mirror-f0d56e473978dcfa017b6597ef4e2e09e5a477e6.tar.gz
Use std::string instead of fixed size strings.
Decrease direct access to the autocompletion list box from outside AutoComplete.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 2bc89ba1f..c424cd278 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -5845,6 +5845,18 @@ char *Editor::CopyRange(int start, int end) {
return text;
}
+std::string Editor::RangeText(int start, int end) const {
+ if (start < end) {
+ int len = end - start;
+ std::string ret(len, '\0');
+ for (int i = 0; i < len; i++) {
+ ret[i] = pdoc->CharAt(start + i);
+ }
+ return ret;
+ }
+ return std::string();
+}
+
void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) {
if (sel.Empty()) {
if (allowLineCopy) {