diff options
author | Neil <nyamatongwe@gmail.com> | 2013-07-11 10:35:17 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-07-11 10:35:17 +1000 |
commit | 431004e5efda4bddbeb265db3d0e28fda828a808 (patch) | |
tree | 81f37db242cbd41a9fc04be48c1ebb29472686b8 /src | |
parent | 72e202686759541cb3f33f83388731857fae380a (diff) | |
download | scintilla-mirror-431004e5efda4bddbeb265db3d0e28fda828a808.tar.gz |
Allow Editor subclasses to turn off overstrike caret.
From Mitchell Foral.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 3 | ||||
-rw-r--r-- | src/Editor.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 0c7bc819e..16e3e8b56 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -116,6 +116,7 @@ Editor::Editor() { hasFocus = false; hideSelection = false; inOverstrike = false; + drawOverstrikeCaret = true; errorStatus = 0; mouseDownCaptures = true; @@ -3476,7 +3477,7 @@ void Editor::DrawCarets(Surface *surface, ViewStyle &vsDraw, int lineDoc, int xS /* Dragging text, use a line caret */ rcCaret.left = xposCaret - caretWidthOffset; rcCaret.right = rcCaret.left + vsDraw.caretWidth; - } else if (inOverstrike) { + } else if (inOverstrike && drawOverstrikeCaret) { /* Overstrike (insert mode), use a modified bar caret */ rcCaret.top = rcCaret.bottom - 2; rcCaret.left = xposCaret + 1; diff --git a/src/Editor.h b/src/Editor.h index 9105db468..3a1456a96 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -194,6 +194,7 @@ protected: // ScintillaBase subclass needs access to much of Editor bool hasFocus; bool hideSelection; bool inOverstrike; + bool drawOverstrikeCaret; bool mouseDownCaptures; /** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to |