aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
AgeCommit message (Collapse)AuthorFilesLines
2020-08-21Backport: Bounds checks for setting annotation style.Mitchell Foral1-8/+12
Backport of changeset 8481:1594f3416bd6.
2020-07-16Backport: Make EncodingFamily an enum class for more type safety.Neil1-3/+3
Backport of changeset 8408:e89f22691610.
2020-07-16Backport: Add some const, constexpr.Neil1-1/+1
Backport of changeset 8407:dfaa642a6c22.
2020-07-15Backport: Feature [feature-requests:1368]. Add BraceMatchNext API.Zufu Liu1-2/+2
Backport of changeset 8406:a2ce85a55dfa.
2020-06-17Backport: Simplify calls when known to be leaving a save point.Neil1-2/+2
Backport of changeset 8309:adedefb346ef.
2020-06-12Backport: Bug [#2141]. Implement end of line annotations.Prakash Sahni1-0/+35
Backport of changeset 8306:1b383adfdf71.
2020-05-03Backport: Feature [feature-requests:1347]. Add InsertLines method to PerLine ↵Neil1-0/+7
interface and all implementations. This will allow insertion of lines in batches in a future change set. Added tests for PerLine implementations. Backport of changeset 8227:9fc611fc6848.
2020-04-08Backport: Simplify PerLine, remove casts, use noexcept, const, & constexpr ↵Neil1-8/+8
where possible. Backport of changeset 8130:55de9045370a.
2020-04-08Backport: Feature [feature-requests:1344]. Add methods for iterating through ↵Iain Clarke1-0/+8
the marker handles and marker numbers on a line. Backport of changeset 8129:665c31051e3c.
2020-04-05Backport: Pass argument as unique_ptr to show transfer of ownership. Add ↵mitchell1-3/+3
const and noexcept. Backport of changeset 8106:f26e186e80a9.
2020-03-26Backport: Fix spelling mistakes.Neil1-2/+2
Backport of changeset 8028:78a688809e75.
2020-03-23Backport: Replace const with constexpr where possible.Neil1-4/+4
Backport of changeset 8020:3f5593341a23.
2020-03-23Backport: perLineData is polymorphic so replace static_cast with ↵Neil1-5/+5
dynamic_cast for better type safety and adherence to C++ Core Guidelines C.146. Backport of changeset 8019:91a3db714f60.
2020-03-23Backport: Drop possibility of Sci_Position, Sci::Line, Sci::Position not ↵Neil1-8/+8
being ptrdiff_t. This reduces casting. Backport of changeset 8018:8bc54a095c2f.
2020-01-10Backport: Bug [#2132]. Only check for LS/PS/NEL when Unicode line ends ↵Zufu Liu1-1/+1
turned on. Backport of changeset 7950:375a05c8edd1.
2020-01-05Added Sci::make_unique() and Sci::size() for better compatibility with the ↵mitchell1-5/+5
default branch. std::make_unique() is c++14 and std::size() is c++17.
2019-07-01Backport: Use noexcept on Document where reasonable with no effect on ↵Neil1-47/+47
external interface. Adds LengthNoExcept method that copies Length but only for internal use. Backport of changeset 7616:5ba25d5f5434.
2019-06-28Backport: Bug [#2116]. Fix deletion of isolated invalid bytes.Zufu Liu1-11/+26
Backport of changeset 7610:1031c155fb62.
2019-04-26Backport: Feature [feature-requests:#1238]. Simplify camel case forcing by ↵Neil1-8/+0
checking only for upper and lower case characters instead of current word characters. This changes behaviour for words like "_word" -> "_Word" instead of remaining "_word" but that doesn't matter for this feature's intended use which is to allow display of ASCII-only keywords in the user's preferred casing (else/ELSE/Else) for languages with case-insensitive keywords. Backport of changeset 7475:cdb7af706ba1.
2019-04-16Backport: Feature [feature-requests:#1259]. Add ↵mitchell1-1/+9
SCI_SETCHARACTERCATEGORYOPTIMIZATION API to optimize speed of character category features. Backport of changeset 7392:2832adedd0f4, but with added includes for Sci::clamp().
2019-03-20Backport: Implement WStringFromUTF8 to simplify code that creates wstring ↵Neil1-9/+2
objects for regular expressions and calling the Win32 API. Backport of changeset 7325:6148329fb2f3, but replaced std::string_view usage with const char* and size_t components. Also used #ifdef instead of C++17 `if constexpr` at suggestion of Neil.
2019-03-09Backport: Use constexpr where reasonable and move groups of static functions ↵mitchell1-3/+3
into unnamed namespace. Backport of changeset 7289:3f930310a0de, but without complicated constexpr functions, since they are not available in C++11.
2019-03-03Backport: Use noexcept where reasonable.Neil1-1/+1
Backport of changeset 7287:0272b3c3a03b.
2019-01-06Backport: Bug [#2068]. Fix some clang-tidy warnings.Zufu Liu1-1/+1
Backport of changeset 7195:ce4394f12c76.
2019-01-03Backport: Bug [#2073]. Stop GetCharacterAndWidth returning negative ↵Zufu Liu1-2/+2
character value. This occurred for single-byte encodings and was never hit as GetCharacterAndWidth is only called for multi-byte encodings. Backport of changeset 7188:c836128fa848.
2018-10-17Backport: Bug [#2051]. Correct return value from SCI_MARKERADD for invalid ↵Neil1-1/+1
lines. Backport of changeset 7117:0cbbfacbf008.
2018-10-16Backport: Make damping work in ActionDuration.Colomban Wendling1-1/+1
Backport of changeset 7115:f6d66247a18e.
2018-10-15Backport: Extract duration measurement damping and clamping into ↵Neil1-22/+25
ActionDuration class so that it can be reused. Backport of changeset 7113:9b7421470bf8.
2018-09-16Backport: Use nullptr in Document where appropriate.Neil1-10/+10
Backport of changeset 7088:793a7a86ee7f.
2018-09-16Backport: Moved declaration to avoid warnings from linters.Neil1-2/+2
Backport of changeset 7087:e408638433a4.
2018-07-24Backport: Fix reversion in revision 7063 which removed folding when changing ↵Neil1-0/+1
code page. Changing code page now causes full restyle. Backport of changeset 7068:00b787e2aab1.
2018-07-10Backport: Optional indexing of line starts in UTF-8 documents by UTF-32 code ↵Neil1-0/+22
points and UTF-16 code units added. Converted instances of C++17 std::string_view to C++11. Also used const_casts where appropriate to fix compile errors. Backport of changeset 7063:0d5edc93e280.
2018-06-10Backport: Using noexcept for simple functions.Neil1-6/+6
Backport of changeset 7029:c726541dbd11.
2018-06-10Backport: Updated the code and comment for running a regex over multiple ↵Neil1-8/+14
lines at once instead of breaking up into lines. Using the preprocessor to hide the multiline code instead of comments so that it is easier to experiment with. Backport of changeset 7028:9227461c9330.
2018-05-25Backport: Draw invalid bytes in DBCS when detected as blobs in a similar way ↵mitchell1-0/+87
to UTF-8. Backport of changeset 6962:514fde42ccbf, but without std::string_view.
2018-05-16Backport: Use noexcept method to preserve noexcept.Neil1-1/+1
Backport of changeset 6956:beee37b055d6.
2018-05-16Backport: Fix regex crash reported with libstdc++ on macOS that occursNeil Hodgson1-7/+0
when the regex has a locale imbued. Backport of changeset 6953:85ff33e92309.
2018-05-06Backport: Use <chrono> for platform-independent timing and remove ↵mitchell1-4/+6
ElapsedTime. Also use #if for painting measurement as there are 7 sections of code to enable. Backport of changeset 6741:af5d9064c25c.
2018-04-22Backport: Remove casts between char and unsigned char where possible.Neil1-7/+7
Backport of changeset 6731:8e06234817c0.
2018-04-21Backport: Tighten definition of regular expression iterators so they are ↵Neil1-69/+96
noexcept and 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. Backport of changeset 6724:f2dfdc0dddd3.
2018-04-19Backport: Casting changed in many places, due to change to 64-bit variables ↵Neil1-91/+94
for 64-bit 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. Backport of changeset 6705:5c0a80740b8c.
2018-04-19Backport: Remove casts by using harmonized types. Drop NUL termination that ↵Neil1-16/+13
is not needed. Backport of changeset 6701:6be1be362cfc.
2018-05-05Backport: Add SC_DOCUMENTOPTION_TEXT_LARGE option for documents larger than ↵mitchell1-3/+8
2 GigaBytes. This option is provisional and experimental. Backport of changesets 6696:9729ff36c5b1 and 6723:cffe824ab55e. Also added '#include <cstddef>' to top of src/RESearch.cxx to fix 32-bit build error.
2018-03-28Backport: Templatize decorations to allow 32-bit or 64-bit positions.Neil1-1/+1
Backport of changeset 6693:7247d1c9c27f.
2018-04-16Backport: Determine if line start or end pattern before loop.Neil1-5/+7
Backport of changeset 6692:1868a36cb306.
2018-04-13Backport: Use 'override' for methods that are overridden.Neil1-28/+28
Group some method declarations and definitions for AddRef/Release and PerLine. Backport of changeset 6684:bd4aae09fb4b.
2018-04-13Backport: Fix bug with regular expression searches failing to match at line ↵Neil1-16/+4
start or end. This was a work-around for infinite loops when replacing empty matches and this is now the application's responsibility. Backport of changeset 6683:bcae0331720b.
2018-04-11Backport: Remove workaround for problems with noexcept.Neil1-10/+2
Backport of changeset 6681:84298b2b66f2.
2018-05-05Backport: Split decorations into interface and implementation.mitchell1-4/+6
Backport of changeset 6658:693e737f3155.
2018-03-27Backport: Return a FillResult struct from RunStyles::FillRange instead of ↵Neil1-4/+4
modifying arguments as that is clumsy when converting types. Backport of changeset 6657:43515e7709c6.