Is your feature request related to a problem? Please describe.
I have a code editor that can switch between multiple files.
When that happens, I do this: codeController.text = file.readAsStringSync(); to make the code editor switch to the new file.
However, this still allows the user to undo (Ctrl+Z) to the previous file, which effectively deletes one file, and duplicates another in its place.
Describe the solution you'd like
The solution I would like is being able to clear the history of a CodeLineEditingController.
So I can do something like this:
Describe alternatives you've considered
I could rebuild the entire CodeEditor widget instead of changing the CodeLineEditingController.text, but that makes the code highlighting reset every time, as per #2.
Additional context
I found that this library uses a _CodeLineEditingCache under the hood, to keep track of the history. It has a method void markNewRecord(bool flag), which I think already does exactly what I want.
The only thing necessary would be to open this method up to the end user. (I think)
Thank you for making this library, by the way! It is super amazing! I love it a lot!
Is your feature request related to a problem? Please describe. I have a code editor that can switch between multiple files. When that happens, I do this:
codeController.text = file.readAsStringSync();
to make the code editor switch to the new file. However, this still allows the user to undo (Ctrl+Z) to the previous file, which effectively deletes one file, and duplicates another in its place.Describe the solution you'd like The solution I would like is being able to clear the history of a
CodeLineEditingController
. So I can do something like this:Describe alternatives you've considered I could rebuild the entire CodeEditor widget instead of changing the
CodeLineEditingController.text
, but that makes the code highlighting reset every time, as per #2.Additional context I found that this library uses a
_CodeLineEditingCache
under the hood, to keep track of the history. It has a methodvoid markNewRecord(bool flag)
, which I think already does exactly what I want. The only thing necessary would be to open this method up to the end user. (I think)Thank you for making this library, by the way! It is super amazing! I love it a lot!