Vincent Ging Ho Yim 96e73bdadd cli undo: detect "double undo" from operation metadata instead
To identify an `undo` operation, checking that the views of the "bad" op and its
grandparent are equal is necessary but not sufficient. For example, creating a bookmark
and then immediately deleting it also "resets" the view. This commit fixes this by also
checking the "description" in the operation metadata to identify "double undo" properly.

With this commit, the "double undo" warning is now shown whether users undid the latest
undo implicitly (with `jj (op) undo`) or explicitly (with `jj (op) undo <op set>` or `jj
(op) undo @`).

If undoing an older undo (prior to `@`), the warning is not shown.
2025-05-21 13:20:10 +00:00
..