aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
AgeCommit message (Collapse)AuthorFilesLines
8 hoursadded SC_LINE_END_TYPE_NONE: allows ignoring all line endssciteco-rel-5-6-2Robin Haberkorn1-2/+2
This can help when using Scintilla views as command line widgets. It can also help when using Scintilla to edit binary files as you don't want to attach special meaning to CR and LF. This patch will not be merged for the time being, so we strive to reduce the number of touched lines. See https://groups.google.com/g/scintilla-interest/c/iE6E4n9zWT4
2026-04-23Add error status SC_STATUS_OUTSIDE_DOCUMENT that is set when operations areNeil1-1/+8
attempted on a position outside the document. Positions are checked earlier to prevent actions partly succeeding. This is implemented with a new exception type Failure which should be caught by platform layer's API handling code to produce a more granular error status.
2026-04-22Assert that string is being inserted inside the document range.Neil1-0/+1
This would be caught in SplitVector::InsertFromArray but this simplifies the failure and avoids potential for modifications.
2026-04-13Copy AnyOf from Lexilla to clarify code checking if a value is in a set.Neil1-2/+2
2026-03-30Feature [feature-requests:#1582]. Improve performance of Document::SetStyles.Neil1-18/+7
Report changed range for Document::SetStyleFor.
2026-03-11Bug [#2501]. Fix regression in SCI_CONVERTEOLS that may not convert whole file.Zufu Liu1-2/+1
2026-03-07Improve compatibility with std::regex implementations.Stephan T. Lavavej1-3/+9
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/17816
2026-01-26Small optimizations and adding noexcept for column calculations.Neil1-15/+20
Caches document length and specializes for ASCII characters in FindColumn.
2026-01-07Bug [#2491]. Fix lexing after undo at end of document.Neil1-1/+4
2025-12-04Use const where reasonable.Neil1-2/+2
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.