diff options
| author | Zufu Liu <unknown> | 2024-01-27 19:51:31 +1100 |
|---|---|---|
| committer | Zufu Liu <unknown> | 2024-01-27 19:51:31 +1100 |
| commit | 7e32149ab735019ad029c0559b99998b2d525053 (patch) | |
| tree | 79c43d3b45eb7f2b4d5f23a81bbb96e133a0cb42 /src/CellBuffer.h | |
| parent | 2ca7a15a1bd45d306775b2757ee17884f2c14320 (diff) | |
| download | scintilla-mirror-7e32149ab735019ad029c0559b99998b2d525053.tar.gz | |
Feature [feature-requests:#1458] Reduce memory used for undo actions.
Diffstat (limited to 'src/CellBuffer.h')
| -rw-r--r-- | src/CellBuffer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/CellBuffer.h b/src/CellBuffer.h index f0aacf8ec..b46b582c1 100644 --- a/src/CellBuffer.h +++ b/src/CellBuffer.h @@ -26,18 +26,18 @@ class ChangeHistory; */ class ILineVector; -enum class ActionType { insert, remove, start, container }; +enum class ActionType : unsigned char { insert, remove, start, container }; /** * Actions are used to store all the information required to perform one undo/redo step. */ class Action { public: - ActionType at; - Sci::Position position; + ActionType at = ActionType::insert; + bool mayCoalesce = false; + Sci::Position position = 0; std::unique_ptr<char[]> data; - Sci::Position lenData; - bool mayCoalesce; + Sci::Position lenData = 0; Action() noexcept; void Create(ActionType at_, Sci::Position position_=0, const char *data_=nullptr, Sci::Position lenData_=0, bool mayCoalesce_=true); |
