From 431004e5efda4bddbeb265db3d0e28fda828a808 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 11 Jul 2013 10:35:17 +1000 Subject: Allow Editor subclasses to turn off overstrike caret. From Mitchell Foral. --- src/Editor.cxx | 3 ++- src/Editor.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3