aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-12-05 20:36:01 +1100
committerNeil <nyamatongwe@gmail.com>2014-12-05 20:36:01 +1100
commitbfad851459cb44308d42b5889b6495c986a19438 (patch)
tree4c8938ce3aed03d21064f1142e0a3476ed0a0a55 /src
parent78d0e65c891fc0c995093e8e3a535fccc3e09251 (diff)
downloadscintilla-mirror-bfad851459cb44308d42b5889b6495c986a19438.tar.gz
Extract FillVirtualSpace so it is not repeated and can be made less complex in
the future.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx7
-rw-r--r--src/Editor.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 64017c58d..b85055202 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1898,6 +1898,13 @@ void Editor::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) {
}
}
+void Editor::FillVirtualSpace() {
+ const bool tmpOverstrike = inOverstrike;
+ inOverstrike = false; // not allow to be deleted twice.
+ AddCharUTF("", 0);
+ inOverstrike = tmpOverstrike;
+}
+
void Editor::InsertPaste(const char *text, int len) {
if (multiPasteMode == SC_MULTIPASTE_ONCE) {
SelectionPosition selStart = sel.Start();
diff --git a/src/Editor.h b/src/Editor.h
index 27a2469aa..ec24f66fd 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -388,6 +388,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
int InsertSpace(int position, unsigned int spaces);
void AddChar(char ch);
virtual void AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS=false);
+ void FillVirtualSpace();
void InsertPaste(const char *text, int len);
enum PasteShape { pasteStream=0, pasteRectangular = 1, pasteLine = 2 };
void InsertPasteShape(const char *text, int len, PasteShape shape);