uiwjs / react-textarea-code-editor

A simple code editor with syntax highlighting.
https://uiwjs.github.io/react-textarea-code-editor/
MIT License
476 stars 22 forks source link

CTRL + Z | Undo #159

Open jottasystem opened 1 year ago

jottasystem commented 1 year ago

Hello guys!

I've a big problem with "undo"... When I typing any values but I press "Enter", I need to do "UNDO", only the line is currently working, and if I press several times then I will return to the initial state, but with the values I typed before. how can i fix this?

Playground: https://uiwjs.github.io/react-textarea-code-editor/

jaywcjlove commented 1 year ago

I did not reproduce your problem. @jottasystem

vitorlSilva commented 1 year ago

@jaywcjlove What is happening is that when we try to do the "Undo" action after we have skipped a line or hit the Enter key, sometimes the "Undo" function does not work. I will leave a gif to see if it can be a little clearer. In the example I write a small text then I press some enter and write another text and start to precious the ctrl + z when doing this action it makes the "undo" correctly until it reaches the point where there was the line break.

React Textarea Code Editor - A simple code editor with syntax highlighting