aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
3 daysadded a dummy RunStyles.cxxHEADsciteco-rel-5-5-7Robin Haberkorn1-0/+0
Allows building Scinterm without removing references to RunStyles.o. 63cee0686964d789e6b53406abcc0bdbed50206a, which removed RunStyles.cxx, is still experimental and not yet merged upstream.
3 daysimplicitly instantiate RunStyles: support ptrdiff_t if it has the same ↵Robin Haberkorn3-351/+272
storage size as int, but does *not* alias it * This is the case e.g. on NetBSD 10 for ARMv6 where Sci::Position == ptrdiff_t == long int, but obviously for other platforms as well, where it causes "invalid conversion" and "undefined symbol" errors. Scintilla was testing for aliasability by comparing the storage size with sizeof() or PTRDIFF_MAX == INT_MAX at the preprocessor level. This was fundamentally flawed. * In LineVector<T>::InsertLines() we are now using the C++17 construct std::is_convertible_v<From*,To*> instead. * We need RunStyles<ptrdiff_t> as well on the affected platforms. AFAIK this is impossible to test for in a constant expression that can be used with the preprocessor. A workaround has been added previously for Haiku: https://groups.google.com/g/scintilla-interest/c/xPXquJUIXo8/m/BLXBpTTgBwAJ The workaround is not very robust, as probably nobody guarantees that ptrdiff_t never aliases on Haiku. If it does, you will suddenly get errors about duplicate template instantiations. Quite possibly, the explicit instantiations of RunStyles were wrong on certain 32-bit Linux variants as well. * We could have tried to explicitly instantiate RunStyles for all scalar types that could possibly be behind ptrdiff_t. Unfortunately, it would result in "possible loss of data" warnings on MSVC. Instead, we now implicitly instantiate RunStyles.
3 daysRevert "support ptrdiff_t if it has the same storage size as int, but does ↵Robin Haberkorn2-7/+5
*not* alias it" This reverts commit 0953ffeee80abdd8e79ddacc7066eb02c78968e7.
2025-08-26support ptrdiff_t if it has the same storage size as int, but does *not* ↵Robin Haberkorn2-5/+7
alias it * This is the case e.g. on NetBSD 10 for ARMv6 where Sci::Position == ptrdiff_t == long int, but obviously for other platforms as well, where it causes "invalid conversion" and "undefined symbol" errors. Scintilla was testing for aliasability by comparing the storage size with sizeof() or PTRDIFF_MAX == INT_MAX at the preprocessor level. This was fundamentally flawed. * In LineVector<T>::InsertLines() we are now using the C++17 construct std::is_convertible_v<From*,To*> instead. * We need RunStyles<ptrdiff_t> as well on the affected platforms. AFAIK this is impossible to test for in a constant expression that can be used with the preprocessor. A workaround has been added previously for Haiku: https://groups.google.com/g/scintilla-interest/c/xPXquJUIXo8/m/BLXBpTTgBwAJ The workaround is not very robust, as probably nobody guarantees that ptrdiff_t never aliases on Haiku. If it does, you will suddenly get errors about duplicate template instantiations. Instead we now instantiate RunStyles for all scalar types that could possibly be behind ptrdiff_t. This will always be more than what is required on any particular platform, but the linker should eliminate unused symbols.
2025-08-22disable automatic scrolling and choosing the X that caret sticks toRobin Haberkorn1-1/+7
* SciTECO needs to avoid automatic scrolling as an optimization. While this works partially by avoiding certain messages like SCI_GOTOPOS (in favor of SCI_SETEMPTYSELECTION), there aren't alternatives for all messages that scroll. For instance SCI_UNDO will always call EnsureCaretVisible(). Also, even if we could avoid all scrolling messages, there is no guarantee that will not suddenly and unexpectedly break in the future. * Instead, every scrolling is now disabled except for an explicit SCI_SCROLLCARET. SciTECO can therefore use the more intuitive messages like SCI_GOTOPOS. * SetLastXChosen() (choosing the X that caret sticks to) has been found to be a major slow down during UNDO and serves no purpose on SciTECO anyway - we have to implement such an algorithm at the SciTECO language level. We therefore simply disable SetLastXChosen().
2025-08-22commented out Editor::SetRepresentations()Robin Haberkorn1-1/+1
* This sets the default key representations on every SCI_SETDOCPOINTER which is very inefficient considering the way that SciTECO uses the Q-Register view. Furthermore it meant, we had to reset the representations to their SciTECO versions again after every SCI_SETDOCPOINTER. * This patch only does not cause problems because we initialize the representations anyway for every Scintilla view. This patch is not meant to be upstreamed!
2025-07-03Feature [feature-requests:#1563]. Move main range in selection serialized form.masterZufu Liu2-29/+31
Avoid processing characters multiple times by relying on from_chars munching digit characters instead of searching for delimiters.
2025-06-26Fix some typos and indentation.Neil1-1/+1
2025-06-17Feature [feature-requests:#1557]. Fix finding sub-line of position inZufu Liu1-10/+8
bidirectional mode which is used for accessibility on macOS with VoiceOver. Avoid out-of-bounds access.
2025-06-17Feature [feature-requests:#1557]. Shorten expression.Zufu Liu1-1/+1
2025-06-01Add SCI_SCROLLVERTICAL API.Neil4-4/+46
2025-05-29Recreate all pixmaps if any null as this may better handle cases where someNeil3-10/+6
allocations succeed and others fail.
2025-05-28Bug [#2481]. Refresh pixmaps later inside Paint so non-null when dereferenced inNeil1-3/+2
for validity check.
2025-05-25Feature [feature-requests:#1557]. Simplify LineLayout deallocation.Zufu Liu2-25/+3
2025-05-24Remove line end space.Zufu Liu6-6/+6
2025-05-24Change the line wrap memory growth strategy to handle huge documents better.Zufu Liu1-2/+2
Clarify code a little.
2025-05-20Feature [feature-requests:#1557]. Simplify line wrapping.Zufu Liu1-15/+7
2025-05-18Modify wrapping fix to be more efficient.Zufu Liu2-7/+4
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-05-12Add SCI_AUTOC{G,S}ETIMAGESCALE and implement for Qt and GTK.orbitalquark4-0/+11
2025-05-03Use noexcept, emplace_back, avoid a cast, and simplify code.Neil2-9/+10
2025-05-03Remove else after return when that clarifies code.Neil1-61/+42
2025-04-22Silence warnings for else-after, no default in switch, default destructor,Neil1-26/+18
parameter naming.
2025-04-22Move common IME code from platform layers to ScintillaBase.Neil2-0/+32
2025-04-18Control restoring vertical scroll position for undo withNeil2-4/+6
SC_UNDO_SELECTION_HISTORY_SCROLL flag to SCI_SETUNDOSELECTIONHISTORY.
2025-04-17Tweak SC_MARK_BAR to be slightly wider.Neil1-1/+1
2025-04-10Avoid 'magic' number with constexpr and add comments.Neil1-8/+12
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-08Silence warning.Neil1-2/+1
2025-04-03Turn on type conversion warnings for GCC and fix them.Neil9-27/+32
2025-04-03Silence 'magic' number clang-tidy warning where there is intense use of literalNeil4-0/+28
constants for processing character encodings or similar and where declaring constants would make the code more obscure, not less.
2025-03-27Optimize case-insensitive DBCS search to be around 5 times faster by using 64KNeil2-0/+82
memory to cache folding data for each DBCS code page used.
2025-03-27Use constant definitions to avoid warnings.Neil2-11/+17
2025-03-09Avoid warnings by replacing &[0] with .data(), adding [[nodiscard]], replacingNeil2-22/+20
typedef with using, and initialising at declaration.
2025-03-08Define constants for UTF-8 and UTF-16 implementation for clarity.Neil2-62/+100
Add tests to check that inverted conversions yield the original value.
2025-03-06Move static functions and variables into unnamed namespace and use constexpr.Neil2-37/+48
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-25Bug [#2463]. Disallow case changes if the range contains protected textJoachim Mairboeck1-1/+1
2025-02-19Use ComPtr for render targets of SurfaceD2D.Neil1-2/+2
Add comments about different types of Surface.
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-15Minor changes to reduce warnings from Clang-Tidy.Neil1-28/+21
2025-02-15Fix the previous change to prioritise breaking at style-change and spaces (whenNeil1-11/+16
specified) and only discard the last combined character when these fail.
2025-02-14For wrapping, try to break lines without separating letters from modifiers.Neil1-0/+7
There are still problems for languages like Javanese but it will improve most cases. Unicode proposal to improve line breaking: https://www.unicode.org/L2/L2022/22080r2-line-break-ortho-bnd.pdf
2025-02-14Implement LastCharacter to return the last character or character fragment in aNeil2-4/+27
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