Can now undo/redo styles

This commit is contained in:
Yousef Khadadeh 2025-11-12 14:54:46 +03:00
parent 94438c7b97
commit b0b04a28c8
6 changed files with 79 additions and 20 deletions

View file

@ -98,6 +98,14 @@ bool TextPosition::operator<=(const TextPosition& o) const {
return (*this < o) || (*this == o);
}
bool TextBox::Cursor::operator==(const Cursor& o) const {
return o.selectionBeginPos == selectionBeginPos && o.selectionEndPos == selectionEndPos && o.pos == pos;
}
bool TextBox::Cursor::operator!=(const Cursor& o) const {
return !(*this == o);
}
TextBox::TextBox() {
paragraphs.emplace_back();
}