aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
AgeCommit message (Collapse)AuthorFilesLines
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-06-26Fix some typos and indentation.Neil1-1/+1
2025-06-01Add SCI_SCROLLVERTICAL API.Neil1-3/+31
2025-05-29Recreate all pixmaps if any null as this may better handle cases where someNeil1-8/+4
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-24Remove line end space.Zufu Liu1-1/+1
2025-05-03Use noexcept, emplace_back, avoid a cast, and simplify code.Neil1-7/+8
2025-05-03Remove else after return when that clarifies code.Neil1-61/+42
2025-04-18Control restoring vertical scroll position for undo withNeil1-3/+5
SC_UNDO_SELECTION_HISTORY_SCROLL flag to SCI_SETUNDOSELECTIONHISTORY.
2025-04-03Turn on type conversion warnings for GCC and fix them.Neil1-8/+8
2025-03-06Move static functions and variables into unnamed namespace and use constexpr.Neil1-14/+18
2025-02-25Bug [#2463]. Disallow case changes if the range contains protected textJoachim Mairboeck1-1/+1
2025-02-07Add vertical scroll position into undo selection history unconditionally.Neil1-5/+6
2025-02-05Use new SelectionSegment constructor and SelectionRange::AsSegment to simplifyNeil1-2/+2
code.
2025-02-04Ensure undo selection history for view is deleted when view destroyed orNeil1-1/+1
history disabled.
2025-02-01Serialize selection type and ranges with SCI_GETSELECTIONSERIALIZED andNeil1-0/+18
SCI_SETSELECTIONSERIALIZED.
2025-02-01Use string form for selection undo history as it saves significant space.Neil1-9/+8
On average takes around 20% of SelectionSimple.
2025-02-01Reconnect to document's undo selection history after switching documents whenNeil1-0/+1
performing undo or redo.
2025-01-25Bug [#1224]. Use enum for undo selection history and make API names moreNeil1-6/+7
consistent as 'undo selection' instead of 'selection undo' as more closely associated with undo than selection.
2025-01-22Bug [#1224]. Remember selection in undo history. SCI_SETSELECTIONUNDOHISTORY.Neil1-7/+91
2024-11-24Bug [#2457]. Fix moving line down to empty final line and moving empty finalpawelzwronek1-3/+7
line up. Handle edge cases when moving selected lines. Allow moving the selection when the end line of the document is empty or when moving up the last empty line.
2024-12-02Optimize calculating lines of range to redraw when whole range is on one line.Neil1-4/+8
SciLineFromPosition is a binary search over the line indices but LineStart is just indexing so is less expensive. This code may limit performance when updating many positions.
2024-11-25Bug [#2456]. Fix wrapping removed lines.Pawel Z Wronek1-0/+6
2024-09-02Hoist some common code into methods.Neil1-37/+25
RangeContainsProtected gains an overload that takes a SelectionRange as this is common use and simplifies callers. ClearSelectionRange is common code used to clear selected text and update a SelectionRange before inserting text.
2024-08-15Add SCI_STYLESETSTRETCH to support condensed and expanded text styles.Neil1-0/+7
2024-08-09Simplify code that sets an empty selection at a position.Neil1-4/+2
2024-07-31Feature [feature-requests:#1524]. Add SCI_LINEINDENT and SCI_LINEDEDENT.Martijn Laan1-5/+11
These force the multiline behaviour of SCI_TAB and SCI_BACKTAB.
2024-07-28Add SCI_GETUNDOSEQUENCE to determine whether an undo sequence is active and itsNeil1-0/+3
nesting depth.
2024-07-27Feature [feature-requests:#1530]. SCI_SETCOPYSEPARATOR sets string to separateNeil1-4/+13
parts of multiple selection when copied.
2024-07-15Simplify line-end insertions and conversions.Neil1-9/+3
2024-07-10Bug [#2443]. Fix flickering cursor after some mouse action sequences.Neil1-1/+6
2024-06-20Feature [feature-requests:#1518]. Cherry pick SCI_CUTALLOWLINE from isscint.Martijn Laan1-17/+50
2024-06-11Feature [feature-requests:#1517]. Increase maximum zoom set interactively to +60Neil1-1/+1
points.
2024-06-10Simplify SetZoom by calling SetAppearance to do the check if changed sequence.Neil1-8/+4
2024-05-16Feature [feature-requests:#1516]. Access SpecialRepresentations through aZufu Liu1-8/+8
unique_ptr. Reduces executable size.
2024-03-14Add ColourRGBA::Grey constructing method to simplify use of grey-scale colours.Neil1-1/+2
Use symbolic constants for colour components, fixing 'magic number' warnings.
2024-03-08Reformat with astyle.Neil1-1/+1
2024-02-16Implement detach point access with SCI_SETUNDODETACH and SCI_GETUNDODETACH.Neil1-4/+11
Write more documentation for undo history.
2024-02-15Avoid reinterpret_cast and add const.Neil1-4/+13
2024-02-09Implement API to read and write undo history from applications.Neil1-0/+43
2023-12-23Add break to avoid warning from Visual Studio code analysis.rel-5-4-1Neil1-1/+1
2023-12-20Add IDocumentEditable interface for efficient interaction with document objects.Neil1-5/+9
2023-12-15Bug [#2289]. Protect SCI_REPLACETARGET* from application changing target inNeil1-9/+19
notification handlers.
2023-11-24Feature [feature-requests:#1502] Simplify FlagSet expressions.Zufu Liu1-7/+7
2023-11-06Ctrl-click on a selection deselects it in multiple selection mode.Neil1-2/+16
2023-11-06Simplify variable flow in ButtonDownWithModifiers and enforce with const to makeNeil1-12/+11
adding features easier. Does not change behaviour.
2023-11-06Mouse capture and automatic scrolling are always started and stopped together soNeil1-12/+15
encapsulate that in ChangeMouseCapture method. Does not change behaviour.
2023-11-06Extract DropSelection into a method so it can be reused.Neil1-3/+7
2023-11-05Add SCI_SELECTIONFROMPOINT for modifying multiple selections.Neil1-0/+25