aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.cxx
AgeCommit message (Collapse)AuthorFilesLines
2023-11-21Feature [feature-requests:#1502] Improve speed of LineLayoutCache::InvalidateZufu Liu1-8/+7
for replacing text.
2023-04-07Use std::abs as adapts to argument type so avoids warning. The value is alwaysNeil Hodgson1-1/+1
small enough to not overflow int.
2023-03-02Add multithreaded wrap to significantly improve performance of wrapping largeNeil1-0/+23
files.
2023-02-13Where a multi-byte character contains multiple styles, display each byte as aNeil1-0/+16
representation. This makes it easier to see and fix lexers that change styles mid-character, commonly because they use fixed size buffers.
2023-02-12Feature [feature-requests:#1476] Move default representation code intoNeil1-0/+69
SpecialRepresentations class.
2023-02-12Bug [#2378]. Fix overlapping of text with line end wrap marker.Zufu Liu1-3/+3
2023-01-25Use LineLayout::LineNumber inside LineLayoutCache so it doesn't have to beNeil1-3/+3
declared to be a friend.
2023-01-25Hoist line wrapping code into LineLayout::WrapLine as it has few dependencies.Neil1-0/+58
2023-01-23Allow UTF-8 entries to coexist in the position cache alongside the documentNeil1-17/+23
encoding. Elements like character representations may be in UTF-8 while the document is in a different encoding. UTF-8 will be used for additional features and may later be the only encoding for the position cache. This change does not change performance or the proportion of strings cached - its purpose is to clean up callers and prepare for greater UTF-8 use.
2023-01-16Use intervals for drawing.Neil1-0/+8
2022-08-15Fix bug where deletion at line end indicated with point disappeared when textNeil1-0/+13
inserted on line. Ensure not using old data by clearing all positions - this was hiding problems because deleted positions were still set.
2022-08-13Reduce warnings with noexcept, fewer casts, and other minor changes.Neil1-2/+2
2022-08-13Move append of new line start into PositionCache as AddLineStart.Neil1-4/+5
2022-08-01Avoid some warnings from Code Analysis.Neil1-3/+4
2022-02-02Feature [feature-requests:#1427] Add multithreaded layout which improvesNeil1-2/+12
performance significantly for very wide lines.
2022-01-22Feature [feature-requests:#1422] Minor improvements to line layout and wrapping.Zufu Liu1-2/+1
May avoid some small costs and be clearer.
2022-01-20Hide details of PositionCache.Neil1-0/+46
Move class declarations of PositionCache and PositionCacheEntry into cxx file and only define IPositionCache interface and CreatePositionCache factory function in header.
2021-10-24Avoid extra breaks introduced by revision 8993.Zufu Liu1-4/+4
2021-10-22Add CARETSTYLE_CURSES to draw more than 1 caret on curses terminal.Mitchell Foral1-0/+15
2021-10-21Feature [feature-requests:#1417] Cache maximum key value inZufu Liu1-4/+14
SpecialRepresentations as this allows quick determination of absence for most multi-byte UTF-8 and DBCS characters.
2021-10-21Feature [feature-requests:#1417] Use unsigned as that defines wrap-aroundZufu Liu1-1/+1
behaviour.
2021-10-21Feature [feature-requests:#1417] Simplify BreakFinder::Next.Zufu Liu1-9/+8
2021-10-21Feature [feature-requests:#1417] Use backward iteration to find space / controlZufu Liu1-11/+10
character and text / punctuation boundaries in SafeSegment as will be simpler and faster in almost all cases. Simplify BreakFinder::Next calling SafeSegment.
2021-10-17Remove SpecialRepresentations::Contains which is no longer used.Zufu Liu1-9/+0
2021-10-12Feature [feature-requests:#1416] Use range for.Neil1-4/+2
2021-10-05Feature [feature-requests:#1417] Consolidate character classification functionsNeil1-0/+1
in CharacterType.h, merging duplicate functions, removing unused functions and stadardizing names.
2021-09-30Feature [feature-requests:#1416] Mark destructor as noexcept and use defaultZufu Liu1-2/+1
implementation.
2021-09-30Feature [feature-requests:#1416] Remove extra check that is never true andZufu Liu1-1/+1
remove parameter used just for this test.
2021-09-28Feature [feature-requests:#1416] Change evaluation order so that monospaceASCIIZufu Liu1-10/+14
checked before cache which may improve performance for monospaceASCII. Only reset clear state when storing into cache.
2021-09-28Fix bad layout of monospace text on Cocoa by adding separate fieldNeil1-1/+1
monospaceCharacterWidth for width of monospaced characters.
2021-09-28Widen styleNumber in PositionCacheEntry from 8 to 16 bits to allow stylesNeil1-3/+4
larger than 255 to be represented. Before this, it may have been possible but extremely rare for a cache entry to wrongly match a styled lexeme and produce incorrect layout. Using uint16_t from cstdint instead of a bit field as tools perform more checking on that.
2021-08-27Feature [feature-requests:#841] Remove hotspot from LineLayout and rely onZufu Liu1-1/+0
reference to model.
2021-07-31Implement StyleSetCheckMonospaced.Neil1-0/+16
2021-07-29Make iterators const where possible.Neil1-6/+6
2021-07-29Feature [feature-requests:#1413] Decrease cost of representation for \r\n.Zufu Liu1-16/+42
2021-06-21Avoid extra lookup for mapReprs.Zufu Liu1-3/+3
2021-06-10Use string_view for PositionCache methods.Neil1-36/+27
Replace custom hash code with standard library hash. Drop standard methods that are not needed. Restrict representations to 200 bytes. Improve documentation.
2021-06-10Don't divide input text into segments in PositionCache::MeasureWidths as textNeil1-17/+2
should already have been segmented into reasonable lengths. The Document argument is no longer needed.
2021-06-03Add APIs for setting appearance (traditional blob or plain text) and colour ofNeil1-33/+61
representations and support setting a representation for the "\r\n" line end sequence.
2021-05-24Define C++ version of the Scintilla API in ScintillaTypes.h, ScintillaMessages.hNeil1-17/+19
and ScintillaStructures.h using scoped enumerations. Use these headers instead of Scintilla.h internally. External definitions go in the Scintilla namespace and internal definitio0ns in Scintilla::Internal.
2021-05-15Protect against out-of-bounds layout cache level and remove unnecessary code.Neil1-2/+1
Make documentation more accurate.
2021-05-07Use shared_ptr for LineLayoutCache as it simpifies lifetime management.Neil1-24/+6
AutoLineLayout and other code no longer needed so removed.
2021-05-07Overallocate line layout cache so that don't reallocate too often.Neil1-2/+13
2021-05-07When resizing for Cache::page, move cached entries to correct positions.Neil1-20/+57
Hoist position calculation into EntryForLine method.
2021-05-07Add lineNumber_ argument to LineLayout constructor so always knows which line itNeil1-12/+16
is for. Add accessor for line number and method to say whether compatible with a line number and number of characters. Since LineLayout can report its line number, remove line argument from EditView::LayoutLine which simplifies calling it.
2021-05-07Ensure a line is only ever in one line layout cache entry. Preserve calculatedNeil1-29/+49
data where possible when overwriting a cache entry.
2021-04-28Use copy instead of loop and rely on make_unique zeroing result.Neil1-5/+2
2021-04-27Rename CharacterSet and CharacterCategory modules in Scintilla to CharacterTypeNeil1-1/+1
and CharacterCategoryMap to avoid clashes with Lexilla when building an executable that includes both.
2021-04-05Extract unnamed caching enum as LineLayoutCache::Cache and change to enum class.Neil1-9/+9
2021-03-29Add SCI_SETELEMENTCOLOUR and related APIs to change colours of visible elements.Neil1-0/+1
Implement SC_ELEMENT_LIST* to change colours of autocompletion lists.