diff options
author | nyamatongwe <devnull@localhost> | 2012-06-17 13:38:21 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2012-06-17 13:38:21 +1000 |
commit | 0d2bd5e004b657be9bd66e26161f1cf7299707ea (patch) | |
tree | cb92a15ff4afba794cd8cc8ee0bf9ecd75bccfd1 /src/Editor.cxx | |
parent | 6b61cd57097eba543a36f6cd78954c43e31a7bef (diff) | |
download | scintilla-mirror-0d2bd5e004b657be9bd66e26161f1cf7299707ea.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.cxx | 12 |
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) { |