diff options
author | XhmikosR <xhmikosr@gmail.com> | 2015-09-15 09:09:53 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2015-09-15 09:09:53 +0300 |
commit | 3f436bd3d9598136508384bee25b0e63f76437b1 (patch) | |
tree | f20253c1e7acb16163994a706d356d9588548628 /scintilla/src | |
parent | d95fb3ed56318188dc2496e11f7f97931412f5b6 (diff) | |
download | notepad2-mod-3f436bd3d9598136508384bee25b0e63f76437b1.zip notepad2-mod-3f436bd3d9598136508384bee25b0e63f76437b1.tar.gz notepad2-mod-3f436bd3d9598136508384bee25b0e63f76437b1.tar.bz2 |
Update Scintilla to v3.6.1.
Diffstat (limited to 'scintilla/src')
-rw-r--r-- | scintilla/src/Document.cxx | 2 | ||||
-rw-r--r-- | scintilla/src/Editor.cxx | 24 | ||||
-rw-r--r-- | scintilla/src/Editor.h | 2 |
3 files changed, 20 insertions, 8 deletions
diff --git a/scintilla/src/Document.cxx b/scintilla/src/Document.cxx index 31ef548..b955be1 100644 --- a/scintilla/src/Document.cxx +++ b/scintilla/src/Document.cxx @@ -1325,8 +1325,6 @@ int Document::CountCharacters(int startPos, int endPos) const { int i = startPos;
while (i < endPos) {
count++;
- if (IsCrLf(i))
- i++;
i = NextPosition(i, 1);
}
return count;
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index a7de643..5479ac5 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -1948,11 +1948,25 @@ 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::ClearBeforeTentativeStart() {
+ // Make positions for the first composition string.
+ for (size_t r = 0; r<sel.Count(); r++) {
+ if (!RangeContainsProtected(sel.Range(r).Start().Position(),
+ sel.Range(r).End().Position())) {
+ int positionInsert = sel.Range(r).Start().Position();
+ if (!sel.Range(r).Empty()) {
+ if (sel.Range(r).Length()) {
+ pdoc->DeleteChars(positionInsert, sel.Range(r).Length());
+ sel.Range(r).ClearVirtualSpace();
+ } else {
+ // Range is all virtual so collapse to start of virtual space
+ sel.Range(r).MinimizeVirtualSpace();
+ }
+ }
+ InsertSpace(positionInsert, sel.Range(r).caret.VirtualSpace());
+ sel.Range(r).ClearVirtualSpace();
+ }
+ }
}
void Editor::InsertPaste(const char *text, int len) {
diff --git a/scintilla/src/Editor.h b/scintilla/src/Editor.h index a83062f..aae574a 100644 --- a/scintilla/src/Editor.h +++ b/scintilla/src/Editor.h @@ -392,7 +392,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 ClearBeforeTentativeStart();
void InsertPaste(const char *text, int len);
enum PasteShape { pasteStream=0, pasteRectangular = 1, pasteLine = 2 };
void InsertPasteShape(const char *text, int len, PasteShape shape);
|