aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-03-08Reformat with astyle.Neil1-5/+5
2024-02-28Add variant of UTF8Classify that takes a char* so that client code does not haveNeil1-1/+1
to reinterpret_cast. Make functions in header constexpr. Prefer .data() to &[] since safer. Avoid else when not needed.
2024-02-16Implement detach point access with SCI_SETUNDODETACH and SCI_GETUNDODETACH.Neil1-4/+12
Write more documentation for undo history.
2024-02-15Perform validation of undo state when SCI_SETUNDOCURRENT called, setting statusNeil1-1/+1
when invalid.
2024-02-09Implement API to read and write undo history from applications.Neil1-0/+48
2024-02-01Add UndoAction class as internal type for undo actions and make Action a structNeil1-6/+6
that is used for reporting undo steps to Document. This will allow further minimization of undo memory use.
2024-01-02Simplify choosing caret position when undoing contiguous deletions.Neil1-22/+6
Stop considering container actions as they are supposed to be transparent. The mayCoalesce flag is private to the undo code and may be removed in the future. Use Range type to unify state implementing coalescing.
2023-12-21Bug [#2405]. Avoid character fragments in regular expression search results.Zufu Liu1-4/+5
2023-12-20Add IDocumentEditable interface for efficient interaction with document objects.Neil1-2/+10
2023-12-14Bug [#2405]. Fix regular expression bug in reverse direction where shortenedZufu Liu1-20/+17
match returned.
2023-12-14Remove noexcept from MatchFlags since IsWordEndAt is not noexcept.Neil1-1/+1
2023-12-12Bug [#2405]. Fix regular expression assertion (^, $, \b. \B) failures when usingZufu Liu1-28/+33
SCFIND_CXX11REGEX.
2023-12-02Bug [#2157]. Fix regular expression search for word begin \< and word end \>.Zufu Liu1-2/+5
2023-11-07Feature [feature-requests:#1501] More use of LineStartPosition, LineEndPosition.Zufu Liu1-2/+1
2023-11-02Feature [feature-requests:#1500] Remove match text retrieval from MatchOnLinesZufu Liu1-15/+11
as it is redone in SubstituteByPosition. Replace RESearch::pat and RESearch::GrabMatches with retrieving matches as needed in SubstituteByPosition.
2023-10-26Add LineStartPosition to replace common idiom LineStart(LineFromPosition(x)) asNeil1-5/+9
this shortens code. LineStartPosition is also noexcept which allows callers to be noexcept.
2023-10-26Implement LineEnd method in CellBuffer as it is a basic function and only usesNeil1-30/+7
CellBuffer fields. Declare LineEnd noexcept as it should never throw and that allows methods calling it to also be noexcept. Call LineEndPosition to simplify Editor::LineSelectionRange.
2023-10-15Bug [#2405]. Fix incorrect substitution when searching for a regular expressionZufu Liu1-0/+8
backwards.
2023-10-15Use std::array for regex match positions as it will simplify copying.Neil1-0/+1
This change set does not change behaviour.
2023-04-11Follow rule-of-zero to omit standard methods.Neil1-8/+1
2023-03-02Add multithreaded wrap to significantly improve performance of wrapping largeNeil1-0/+4
files.
2023-01-19Feature [feature-requests:#1444] Move GetFoldParent from Document to LineLevelsNeil1-9/+2
as better modularity. Add LineLevels::GetFoldLevel for better type safety. Simplify bounds checks in GetLevel and GetFoldLevel.
2023-01-12Feature [feature-requests:#1474] Simplify code.Zufu Liu1-3/+4
2023-01-12Feature [feature-requests:#1474] Simplify with InsertString(string_view).Zufu Liu1-3/+2
2023-01-12Feature [feature-requests:#1474] Move EOL string function to Document and returnZufu Liu1-0/+10
string_view.
2022-12-23Bug [#2360]. Switch back from dynamic_cast to static_cast for per-line dataMat Berchtold1-6/+6
structures. This undoes change set [eca055].
2022-12-21Bug [#2340]. Avoid repeated call in GetFoldParent for around 10% performanceZufu Liu1-14/+8
gain with Visual C++ 64-bit release mode on 300,000 line file. Remove duplicated code and simplify. GetFoldLevel and thus GetFoldParent can't throw so mark as noexcept.
2022-12-02Detangle ASCII and multi-byte code for case-insenstive UTF-8 searches.Neil1-21/+18
This avoids some work for the common case of ASCII text, which can reduce time taken for search in text that is ASCII or almost-all ASCII by 30%. Ensures that the bytes variable is always initialized. There are a small gains possible by making other minor changes but they would increase code length and add complexity. Add performance test for UTF-8 search in almost-all ASCII document. Increase size of test cases for more consistent results on faster computers.
2022-12-02Ensure variable is initialized.Neil1-3/+4
2022-11-28Bug [#2363]. Change 'paragraph up' commands SCI_PARAUP and SCI_PARAUPEXTEND toMichael Heath1-1/+4
go to the start position of the paragraph containing the caret. Only if the caret is already at the start of the paragraph will it go to the start of the previous paragraph.
2022-11-24Add const and noexcept where sensible.Neil1-2/+2
2022-11-22Add SCI_REPLACETARGETMINIMAL to change text without causing unchanged prefix andNeil1-0/+11
suffix to be marked as modified in change history.
2022-11-14Fix last change with CharacterExtracted to work on Unix.Neil1-1/+1
2022-11-12Hoist common conversion from UTF-8 byte string into CharacterExtractedNeil1-25/+19
constructor. Move CharacterExtracted out of Document so it can be more widely used.
2022-10-20Change ScintillaBase::AutoCompleteInsert to take a string_view and addNeil1-0/+4
Document::InsertString overload taking a string_view. These changes simplify callers.
2022-09-12Remove NotifyLexerChanged notification from DocWatcher.Neil1-8/+0
This is a private interface but could be used by independent platform layers and was exposed by ScintillaDocument in the Qt implementation of ScintillaEdit.
2022-08-17Display bar marker correctly on last line of document.Neil1-1/+1
2022-07-31Added change history which can display document changes (modified, saved, ...)Neil1-2/+26
in the margin or in the text.
2022-07-18Bug [#2338] Enable multiline regex for gcc and clang when REGEX_MULTILINE ↵Jacky Yang1-0/+4
defined. This requires gcc 11.3 or clang 14.
2022-07-17Feature [feature-requests:#1441] Line state optimized to avoid excess ↵Zufu Liu1-1/+1
allocations by always allocating for every line.
2022-07-04Feature [feature-requests:#1442] Tighter checking of indices avoids handlingZufu Liu1-2/+2
out-of-bounds in lower layer. Make expressions agree in ApplyStep for clarity.
2022-05-01Optimize case where there are no annotationsNeil1-0/+6
2022-01-13Optimize GetColumn a little.Neil1-0/+3
2021-11-24For iterators, make constructors explicit, remove operators that are defaultedNeil1-72/+17
correctly and use 'using' in preference to 'typedef'.
2021-10-26Explicit constructors.Neil1-1/+1
2021-10-24Grammar in comment.Neil1-1/+1
2021-10-21Feature [feature-requests:#1417] Use backward iteration to find space / controlZufu Liu1-31/+58
character and text / punctuation boundaries in SafeSegment as will be simpler and faster in almost all cases. Simplify BreakFinder::Next calling SafeSegment.
2021-10-12Feature [feature-requests:#1416] Prevent type mismatch.Neil1-1/+1
2021-10-12Feature [feature-requests:#1416] Use nullptr.Neil1-9/+9
2021-10-05Feature [feature-requests:#1417] Consolidate character classification functionsNeil1-62/+13
in CharacterType.h, merging duplicate functions, removing unused functions and stadardizing names.