Skip to content

Conversation

@SpongeManiac
Copy link
Contributor

What type of PR is this?

  • 🛠 Enhancement

Description

This PR adds an optional UndoHistoryController property to the CodeField widget, effectively implementing history, undo, and redo with existing Flutter functionality.

Added tests?

  • 🙅 no, because they aren't needed. UndoHistoryController is a built-in feature of Flutter for managing TextField edit history.

Added to documentation?

  • 🙅 No documentation needed, UndoHistoryController is already documented by Flutter.

@SpongeManiac SpongeManiac changed the title Add UndoHistoryController to CodeField enhancement/Add UndoHistoryController to CodeField Jul 13, 2025
@nausharipov nausharipov merged commit 2cec6eb into akvelon:main Jul 27, 2025
2 checks passed
razankv13 added a commit to zingdata/flutter-code-editor that referenced this pull request Oct 20, 2025
This merge brings in important bug fixes and features from main while preserving
all autocomplete/suggestions improvements from improve-editor branch.

Changes from main integrated:
- Flutter/Dart version upgrade (3.22.2/3.4.3)
- Dispose fixes (akvelon#298): Added _disposed flag and mounted checks
- UndoHistoryController support (akvelon#302)
- Line height in default text style fix (akvelon#297)
- YAML support and comments (akvelon#305, akvelon#199)
- JS/TS single line comments (akvelon#291)
- Paired symbols support (akvelon#192)
- Line numbers alignment fix (akvelon#307)
- Pull request template
- Various dependency updates

Changes preserved from improve-editor:
- Refactored code_controller structure (directory with helpers)
- SQL formatter and suggestions logic
- Word insertion helper
- Popup positioning improvements
- Gutter scrollbar hiding
- Browser detection enhancements
- All autocomplete/suggestions improvements

Conflicts resolved:
- code_field.dart: Integrated dispose, undo, and line height fixes
- code_controller.dart: Kept refactored structure, added dispose fix
- gutter.dart: Kept scrollbar hiding feature
- popup.dart & popup_controller.dart: Kept positioning improvements
- parser_factory.dart: Added YAML support with package imports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants