  				if (drawDrag) {
  					/* Dragging text, use a line caret */
  					rcCaret.left = std::round(xposCaret - caretWidthOffset);
-@@ -1736,6 +1737,21 @@
+@@ -1733,6 +1734,21 @@
  	}
  }
  

 	const CaretStyle caretStyle = caret.style & CaretStyle::InsMask;
 	return (caretStyle <= CaretStyle::Block) ? static_cast<CaretShape>(caretStyle) : CaretShape::line;
 }
diff -r b800ec7cc345 -r 64286148d3fd src/ViewStyle.h
--- a/src/ViewStyle.h	Fri Oct 22 11:26:03 2021 +1100
+++ b/src/ViewStyle.h	Fri Oct 22 15:58:17 2021 +1100
@@ -235,9 +235,9 @@
 
 	enum class CaretShape { invisible, line, block, bar };

+			}
+		}
 	}
-	if (pvsDraw && pvsDraw->indicatorsSetFore) {
+	if (FlagSet(breakFor, BreakFor::Foreground) && pvsDraw->indicatorsSetFore) {
 		for (const IDecoration *deco : pdoc->decorations->View()) {
 			if (pvsDraw->indicators[deco->Indicator()].OverridesTextFore()) {
 				Sci::Position startPos = deco->EndRun(posLineStart);
diff -r beeb51d2c645 src/PositionCache.h
--- a/src/PositionCache.h	Wed Sep 29 10:29:58 2021 +1000
+++ b/src/PositionCache.h	Sun Oct 24 11:02:34 2021 -0400
@@ -259,8 +259,14 @@
 	enum { lengthStartSubdivision = 300 };
 	// Try to make each subdivided run lengthEachSubdivision or shorter.
 	enum { lengthEachSubdivision = 100 };
+	enum class BreakFor {
+		Text = 0,
+		Selection = 1,
+		Foreground = 2,
+		ForegroundAndSelection = 3,
+	};
 	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);
 	// Deleted so BreakFinder objects can not be copied.
 	BreakFinder(const BreakFinder &) = delete;
 	BreakFinder(BreakFinder &&) = delete;
diff -r beeb51d2c645 src/ViewStyle.cxx
--- a/src/ViewStyle.cxx	Wed Sep 29 10:29:58 2021 +1000
+++ b/src/ViewStyle.cxx	Sun Oct 24 11:02:34 2021 -0400
@@ -661,11 +661,14 @@
 
 bool ViewStyle::IsBlockCaretStyle() const noexcept {
