Currently this is a very hacky workaround that can break easily, specifically on same-caret modifications and large text modification (full line deletes, pasting, etc.). This entire code should probably be converted over to something else that is easier to keep a cursor in the same location across edits (maybe there is a node package that can help with this?).
Currently this is a very hacky workaround that can break easily, specifically on same-caret modifications and large text modification (full line deletes, pasting, etc.). This entire code should probably be converted over to something else that is easier to keep a cursor in the same location across edits (maybe there is a node package that can help with this?).