aboutsummaryrefslogtreecommitdiff
path: root/tests/test-ui-navigation-split-follow-undo-kill.el
Commit message (Collapse)AuthorAgeFilesLines
* fix(ui-navigation): error clearly when undo-kill prefix exceeds the listCraig Jennings9 days1-0/+13
| | | | An out-of-range numeric prefix made (nth (1- arg) ...) return nil, and find-file on nil signaled a wrong-type-argument. Guard the index and raise a user-error naming how many killed files are available. A new test covers the out-of-range path.
* fix(ui-navigation): correct cj/undo-kill-buffer off-by-one on plain invocationCraig Jennings9 days1-9/+7
| | | | (interactive "p") forces arg >= 1, so the old (if arg (nth arg ...) (car ...)) always took the nth branch and plain M-S-z re-opened the second-most-recently-killed file. Index with (nth (1- arg) ...) so a numeric prefix is 1-based and no prefix re-opens the most recent. The two undo-kill tests now exercise the real no-prefix path (arg=1 reopens the first) and a 1-based numeric prefix; both failed against the bug and pass after. Filed a follow-up for a separate delq-vs-delete skip-visited defect found in the same function.
* test(ui-navigation): cover split-and-follow + undo-kill-bufferCraig Jennings2026-05-141-0/+108
Sibling tests covered `toggle-window-split` and the window-resize sticky map. This batch covers: - `cj/split-and-follow-right`: split-window-right + other-window + consult-buffer in order. - `cj/split-and-follow-below`: split-window-below + other-window + consult-buffer in order. - `cj/undo-kill-buffer`: with no arg, opens the head of `recentf-list` that isn't currently visited; with N=1, opens the second entry; empty list -> no-op. Top-level defvars for `recentf-mode` and `recentf-list` so let-bindings reach the dynamic vars under lexical scope.