aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
AgeCommit message (Collapse)AuthorFilesLines
2023-10-26Implement LineEnd method in CellBuffer as it is a basic function and only usesNeil1-0/+27
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-06-25Strip line end white-space.Neil1-1/+1
2022-09-19Stop turning on change history when there are steps that can be undone asNeil1-1/+1
performing undo before start of change history can crash.
2022-07-31Added change history which can display document changes (modified, saved, ...)Neil1-0/+94
in the margin or in the text.
2022-07-30Add cast functions to simplify code and avoid warnings.Neil1-24/+41
Change targetAct type to avoid type widening warnings.
2022-07-30Apply rule-of-zero to CellBuffer internals.Neil1-14/+0
2022-07-29Apply rule-of-zero to delete standard methods where possible as handled byNeil1-8/+1
contained types. This allows flexibility as most lower-level data types can be moved and SplitVector and Partitioning of non-move-only types may be copied. CellBuffer still needs destructor due to incomplete type so retains all standard operations.
2021-10-26Explicit constructors.Neil1-1/+1
2021-10-26Ensure variables initialized.Neil1-1/+1
2021-08-24Remove line end white space.Neil1-1/+1
2021-07-15Feature [feature-requests:#1370] Implement SCI_ALLOCATELINES to allocate indicesZufu Liu1-0/+23
to hold some number of lines. This is an optimization that can decrease reallocation overhead.
2021-07-15Feature [feature-requests:#1381] Move SplitView to header so it can be used moreNeil1-0/+15
widely. Ensure that case where all text is after the gap is as efficient as when all text is before the gap.
2021-05-24Define C++ version of the Scintilla API in ScintillaTypes.h, ScintillaMessages.hNeil1-53/+56
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-20Prefer Sci::invalidPosition to INVALID_POSITION as Scintilla.h will eventuallyNeil1-1/+1
not be visible to most code.
2021-05-05Avoid some warnings in ResetLineEnds.Neil1-3/+3
2021-04-05Change actionType to an enum class.Neil1-27/+27
2021-03-18std::optional is a basic vocabulary type that may be used widely so includeNeil1-0/+1
almost everywhere.
2021-03-18Move assert and debug trace functions into their own header Debugging.h.Neil1-2/+1
PLATFORM_ASSERT is used in data structure headers which led to including graphics and windowing APIs in data structure modules.
2021-03-17Extract geometry and colour definitions from Platform.h into src/Geometry.h.Neil1-0/+1
2020-06-11Use noexcept where safe and maintainable.Neil1-1/+1
2020-05-19Encapsulate common check for PS, LS, and NEL as UTF8IsMultibyteLineEnd.Neil1-6/+3
Avoids construction of temporary array.
2020-05-04Feature [feature-requests:1347]. Optimize large insertions by using aZufu Liu1-29/+122
table-driven line end discovery algorithm and performing line insertions in batches.
2020-05-02Optimize LineVector by maintaining an activeIndices field to avoid callingNeil1-30/+34
LineStartIndex::Active.
2020-03-24Use noexcept where possible.Neil1-19/+23
2019-11-01Avoid calling vector::shrink_to_fit in destructors as it is not noexcept.Neil1-1/+0
The destructors of the members will ensure that everything is correct. Potential unhandled exceptions reported by Coverity.
2019-09-28Remove virtual call in constructor to stop warnings.Neil1-1/+0
Init was not needed in LineVector as each field is constructed to a good state. This code worked correctly before this change.
2019-09-26Remove extraneous check.Neil1-3/+1
2019-06-04Fix extra white space.Neil1-2/+2
2019-06-04Bug [#2104]. Use '%.0f' and casts to double to fix printf format string bugs.Neil1-4/+8
This will extend valid maximum position from 31-bits to 53-bits which is ample.
2019-05-17Fixed performance bug where line end positions were reset withot need whenNeil1-1/+0
switching from or to Unicode. Only noticeable on huge files.
2019-04-28Declare reading methods as noexcept where reasonable.Neil1-14/+14
2018-10-11Replace NULL and 0 with nullptr in clear cases of pure C++ code.Neil1-3/+3
2018-10-09Improve performance of text insertion when Unicode line indexing off.Neil1-7/+15
2018-07-10Need <string> for std::string.Neil Hodgson1-0/+1
2018-07-10Optional indexing of line starts in UTF-8 documents by UTF-32 code points andNeil1-6/+328
UTF-16 code units added.
2018-05-14Include <string_view> to allow future use in Platform interface and Unicode.Neil1-0/+1
2018-04-28Delete standard functions on classes where there could be attempts to copy.Neil1-0/+5
2018-04-24Feature [feature-requests:#1215]. Make Action move constructor noexcept and useNeil1-8/+0
default implementation.
2018-04-22Remove casts between char and unsigned char where possible.Neil1-1/+1
2018-04-21Tighten definition of regular expression iterators so they are noexcept andNeil1-13/+13
define all the standard member functions. This cascades to all methods called by the iterators, affecting Document, CellBuffer, Partitioning, SplitVector and UTF-8 and DBCS functions. Other trivial functions declared noexcept.
2018-04-19Casting changed in many places, due to change to 64-bit variables for 64-bitNeil1-2/+6
builds. Some of the changes ensure no truncation while others remove casts that are no longer needed because the externally visible Sci_Position is now identical to Sci::Position. Some extra methods (CellBuffer::UCharAt and Document::SciLineFromPosition) added to avoid casting in client code. Sci::Line is currently identical to Sci::Position but it could be made smaller so lines have Sci::Line types and are cast. Some arguments widened.
2018-04-19Casts that avoid warnings if Position and Line are different sizes.Neil1-2/+2
2018-04-19Remove potential allocation in destructor which could have thrown.Neil1-1/+0
2018-04-19Remove unnecessary extra allocation.Neil1-2/+0
2018-04-17Add SC_DOCUMENTOPTION_TEXT_LARGE option for documents larger than 2 GigaBytes.Neil1-2/+15
This option is provisional and experimental.
2018-04-17Templatize LineVector so it can later be switched between 32-bits and 64-bits.Neil1-8/+9
2018-04-14Make some changes recommended by clang-tidy.Neil Hodgson1-1/+1
2018-03-03Split LineVector into interface and implementation classes to allow futureNeil1-58/+84
choice between 32-bit and 64-bit position implementations.
2018-03-01Mark variables as const where simple.Neil1-4/+4
2018-03-01Use make_unique in preference to new.Neil1-1/+1
From Effective Modern C++ Item 21.