From f8236d657fd29f392c3474e96d43a2c73ea216e8 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 15 Aug 2022 17:06:21 +1000 Subject: Fix bug where deletion at line end indicated with point disappeared when text inserted on line. Ensure not using old data by clearing all positions - this was hiding problems because deleted positions were still set. --- src/PositionCache.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/PositionCache.h') diff --git a/src/PositionCache.h b/src/PositionCache.h index 4d44f96e4..24e4e2d5a 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -86,6 +86,7 @@ public: void Resize(int maxLineLength_); void EnsureBidiData(); void Free() noexcept; + void ClearPositions(); void Invalidate(ValidLevel validity_) noexcept; Sci::Line LineNumber() const noexcept; bool CanHold(Sci::Line lineDoc, int lineLength_) const noexcept; @@ -103,6 +104,7 @@ public: int FindBefore(XYPOSITION x, Range range) const noexcept; int FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const noexcept; Point PointFromPosition(int posInLine, int lineHeight, PointEnd pe) const noexcept; + XYPOSITION XInLine(Sci::Position index) const noexcept; int EndLineStyle() const noexcept; }; -- cgit v1.2.3