- Replace header include guards with `#pragma once` and perform minor optimizations. - Replaced traditional include guards with `#pragma once` for simplicity and to reduce boilerplate in all headers. - Improved CLI line number handling with clamping and error messaging. - Enhanced `chdir` error handling for macOS GUI builds. - Removed redundant logic for GUI builds. - Adjusted font constructor and registry to handle `const` data pointers consistently.
21 lines
321 B
C++
21 lines
321 B
C++
#pragma once
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
|
|
enum class UndoType : std::uint8_t {
|
|
Insert,
|
|
Delete,
|
|
Paste,
|
|
Newline,
|
|
DeleteRow,
|
|
};
|
|
|
|
struct UndoNode {
|
|
UndoType type{};
|
|
int row{};
|
|
int col{};
|
|
std::string text;
|
|
UndoNode *child = nullptr; // next in current timeline
|
|
UndoNode *next = nullptr; // redo branch
|
|
}; |