The editor gets an undo. No permission or storage-format changes.
Added
- Undo and redo in the editor (#360). Markleaf saves as you write, which until now meant a mistake was saved too: select everything, hit a key, and the note was gone with nothing to go back to. There are now undo and redo buttons in the row above the keyboard, next to the formatting control, and Ctrl+Z / Ctrl+Shift+Z (or Ctrl+Y) if you have a hardware keyboard. A destructive change — typing or pasting over a selection, a replace-all, deleting the lot — is a single undo step, so that case comes back in one tap. Ordinary typing collapses into runs and breaks at line ends, so undo walks back in sensible chunks rather than one character at a time. Whatever you restore is saved, the same as any other edit. The history covers the note you have open and is dropped when you leave it — Markleaf still keeps no version history on disk. Requested by @iamgitcat.
Changed
- The row above the keyboard now appears for undo alone. With Settings → Markdown → Show formatting button off, the row used to be mounted only while text was selected. It now also mounts once there is something to undo, because otherwise turning that setting off would have left no way to reach undo by touch. With nothing typed yet, the row stays away exactly as before. The same applies while Find in note is open: the formatting controls still stand down there, but undo stays — a replace-all is the change most worth taking back.