aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
AgeCommit message (Collapse)AuthorFilesLines
2025-05-24Remove line end space.Zufu Liu1-1/+1
2025-05-18Modify wrapping fix to be more efficient.Zufu Liu1-6/+0
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16373
2025-05-16Fix wrapping bug for UTF-8 where \r\n could wrap between the characters.Neil1-0/+6
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16373
2025-05-16Silence warning with intermediate constant.Neil1-1/+2
2025-05-15Remove else after return when that clarifies code.Neil1-104/+90
2025-04-08Simplify code and fix impossible INTEGER_OVERFLOW warning from Coverity.Neil1-4/+4
2025-04-08Fix impossible INTEGER_OVERFLOW warning from Coverity.Neil1-1/+1
2025-04-08Fix COPY_INSTEAD_OF_MOVE performance warning from Coverity.Neil1-1/+1
2025-04-03Turn on type conversion warnings for GCC and fix them.Neil1-1/+1
2025-04-03Silence 'magic' number clang-tidy warning where there is intense use of literalNeil1-0/+8
constants for processing character encodings or similar and where declaring constants would make the code more obscure, not less.
2025-03-09Avoid warnings by replacing &[0] with .data(), adding [[nodiscard]], replacingNeil1-19/+17
typedef with using, and initialising at declaration.
2025-03-06Move static functions and variables into unnamed namespace and use constexpr.Neil1-23/+30
2025-03-03Feature [feature-requests:#1417]. Improve UTF-8 segmentation for some controlNeil1-2/+8
characters and invalid bytes. Add more test cases.
2025-02-18Minor warnings silenced. No return value from void functions, catch theNeil1-7/+10
impossible exception, const some iterators.
2025-02-18Avoid type error from some compilers from returning braced values likeNeil1-16/+8
{ unicodeReplacementChar, 1 } instead of constructed objects. Declare named const values for 2 failure cases of CharacterExtracted. Remove some dead code.
2025-02-14Implement LastCharacter to return the last character or character fragment in aNeil1-4/+25
potentially invalid UTF-8 string. Use this in DiscardLastCombinedCharacter. Place DiscardLastCombinedCharacter in Scintilla::Internal namespace for use in text wrap.
2025-02-14Feature [feature-requests:#1417]. Fix some UTF-8 segmentation bugs byNeil1-12/+14
prioritising Unicode-safe base character check over ASCII punctuation check and by treating emoji modifiers as modifiers instead of base characters. This is better for 1) Keycap emoji: *, VARIATION SELECTOR-16, COMBINING ENCLOSING KEYCAP 2) Emoji + skin tone: WAVING HAND SIGN, EMOJI MODIFIER FITZPATRICK TYPE-1-2
2025-02-04Ensure undo selection history for view is deleted when view destroyed orNeil1-1/+5
history disabled.
2025-02-04Fix segmentation of long lexemes to avoid breaking before modifiers like accentsNeil1-7/+94
that must be drawn with their base letters. This is only a subset of implementing grapheme cluster boundaries but it improves behaviour with some Asian scripts like Thai and Javanese. Javanese is mostly written with (ASCII) Roman characters so issues will be rare but Thai uses Thai script. Also slightly improves placement of combining accents in European texts. https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14822 https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16115
2025-01-22Bug [#1224]. Remember selection in undo history. SCI_SETSELECTIONUNDOHISTORY.Neil1-0/+48
2024-12-03Feature [feature-requests:#1537]. Simpify calculation of start of search forZufu Liu1-1/+1
brace matching.
2024-12-03Feature [feature-requests:#1537]. Avoid holding onto Document without need.Zufu Liu1-2/+1
2024-12-01Code format: no space in -1.Neil1-2/+2
2024-12-01Feature [feature-requests:#1535]. Improve performance of DBCS brace matching.Zufu Liu1-11/+5
2024-12-01Feature [feature-requests:#1535]. Improve performance of DBCS text by avoidingZufu Liu1-16/+7
calling LineStartPosition.
2024-11-26Bug [#2458]. Add include of cstdint to provide intptr_t and uintptr_t.Neil1-0/+1
2024-11-17Feature [feature-requests:#1533]. More performance for SCI_BRACEMATCH byZufu Liu1-7/+41
avoiding costly NextPosition call where possible. Approximately 60% improvement on tested system.
2024-11-17Feature [feature-requests:#1533]. Improve performance of SCI_BRACEMATCH by onlyZufu Liu1-8/+6
retrieving style for braces. Approximately 25% improvement on tested system.
2024-09-28Prefer member intializers.Neil1-18/+18
2024-09-28Remove private field that was never used.Neil1-2/+0
2024-07-28Add SCI_GETUNDOSEQUENCE to determine whether an undo sequence is active and itsNeil1-0/+4
nesting depth.
2024-07-15Simplify line-end insertions and conversions.Neil1-15/+18
2024-05-23Suppress some warnings from g++ 14.1 where a UTF-8 character has a maximumNeil Hodgson1-0/+5
length of 4 (UTF8MaxBytes) but the compiler doesn't see this is enforced.
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.