I'm building a code editor with QPlainTextEdit
. As default, when I type a bunch of words in one line and then press undo, the whole line gets deleted. I'd like to push to undo stack manually on every character, so that when I click undo, previous character is removed. Then I could implement capturing only non-letters, etc... so it would undo one logical token at a time. How do I do it?
I hope you guys can help me. Thanks in advance.