  			vs.caret.style = static_cast<CaretStyle>(wParam);
  		else
  			/* Default to the line caret */
-diff -r b800ec7cc345 -r 64286148d3fd src/PositionCache.cxx
---- a/src/PositionCache.cxx	Fri Oct 22 11:26:03 2021 +1100
-+++ b/src/PositionCache.cxx	Fri Oct 22 15:58:17 2021 +1100
-@@ -696,6 +696,21 @@
+diff -r beeb51d2c645 src/PositionCache.cxx
+--- a/src/PositionCache.cxx	Wed Sep 29 10:29:58 2021 +1000
++++ b/src/PositionCache.cxx	Sun Oct 24 11:02:34 2021 -0400
+@@ -662,7 +662,7 @@
+ }
+ 
+ BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lineRange_, Sci::Position posLineStart_,
+-	XYPOSITION xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw) :
++	XYPOSITION xStart, BreakFor breakFor, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw) :
+ 	ll(ll_),
+ 	lineRange(lineRange_),
+ 	posLineStart(posLineStart_),
+@@ -683,7 +683,7 @@
+ 		nextBreak--;
+ 	}
+ 
+-	if (breakForSelection) {
++	if (FlagSet(breakFor, BreakFor::Selection)) {
+ 		const SelectionPosition posStart(posLineStart);
+ 		const SelectionPosition posEnd(posLineStart + lineRange.end);
+ 		const SelectionSegment segmentLine(posStart, posEnd);
+@@ -696,8 +696,23 @@
  					Insert(portion.end.Position() - posLineStart);
  			}
  		}
 +		// On the curses platform, the terminal is drawing its own caret, so add breaks around the
 +		// caret in the main selection in order to help prevent the selection from being drawn in
 +		// the caret's cell.
-+		if (pvsDraw && FlagSet(pvsDraw->caret.style, CaretStyle::Curses) && !psel->RangeMain().Empty()) {
++		if (FlagSet(pvsDraw->caret.style, CaretStyle::Curses) && !psel->RangeMain().Empty()) {
 +			const Sci::Position caretPos = psel->RangeMain().caret.Position();
 +			const Sci::Position anchorPos = psel->RangeMain().anchor.Position();
 +			if (caretPos < anchorPos) {

 }
 
 void ScintillaGTK::RealizeThis(GtkWidget *widget) {
diff -r b800ec7cc345 -r 64286148d3fd doc/ScintillaDoc.html
--- a/doc/ScintillaDoc.html	Fri Oct 22 11:26:03 2021 +1100
+++ b/doc/ScintillaDoc.html	Fri Oct 22 15:58:17 2021 +1100
@@ -3797,8 +3797,8 @@
     <p><b id="SCI_SETCARETSTYLE">SCI_SETCARETSTYLE(int caretStyle)</b><br />
      <b id="SCI_GETCARETSTYLE">SCI_GETCARETSTYLE &rarr; int</b><br />
      The style of the caret can be set with <code>SCI_SETCARETSTYLE</code>.
-     There are separate styles for insert mode (lower 4-bits, <code>CARETSTYLE_INS_MASK</code>) and
-     overtype mode (bit 4).
+     There are separate styles for insert mode (lower 4-bits, <code>CARETSTYLE_INS_MASK</code>),
+     overtype mode (bit 4), and curses mode (bit 5).
 
      <table class="standard" summary="Caret Styles">
        <tbody valign="top">
@@ -3828,6 +3828,13 @@
            <td>Draws an overstrike caret as a block. This should be ored with one of the first three styles.</td>
          </tr>
          <tr>
+           <th align="left"><code>CARETSTYLE_CURSES</code></th>
+           <td>32</td>
+           <td>Draws carets that cannot be drawn in a curses (terminal) environment (such as additional carets),
+           and draws them as blocks. The main caret is left to be drawn by the terminal itself. This setting is
+           typically a standalone setting.</td>
+         </tr>
+         <tr>
            <th align="left"><code>CARETSTYLE_BLOCK_AFTER</code></th>
            <td>256</td>
            <td>When the caret end of a range is at the end and a block caret style is chosen, draws the block
diff -r b800ec7cc345 -r 64286148d3fd include/Scintilla.h
--- a/include/Scintilla.h	Fri Oct 22 11:26:03 2021 +1100
+++ b/include/Scintilla.h	Fri Oct 22 15:58:17 2021 +1100
@@ -907,6 +907,7 @@
 #define CARETSTYLE_BLOCK 2
 #define CARETSTYLE_OVERSTRIKE_BAR 0

 				(drawDrag || (caretBlinkState && caretVisibleState))) {
 				bool canDrawBlockCaret = true;
 				bool drawBlockCaret = false;
@@ -1660,7 +1660,8 @@
 				if (xposCaret > 0)
 					caretWidthOffset = 0.51f;	// Move back so overlaps both character cells.
 				xposCaret += xStart;
