Make p paste as children and P as siblings below

After trying part 8c, the user found p and P doing the same thing on the
canvas: both pasted a sibling below the node (P only differed in the
outline's order). Their pick: p pastes under the node, as its last
children, the way a adds a child; P pastes the next siblings, below it,
where o adds one. ]p went away, since p does what it did.

Inside a title p and P still paste after and before the text cursor, as
in vim: they're their own commands (paste-after, paste-before), and the
node ones are paste-as-child and paste-as-sibling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
skkeyeandClaude Opus 5.5 committed 2026-10-02 05:05:00 -04:00
1 parent 7bec5bf3fc
commit bd819409f4
10 files changed
+59 -53

No files matched your search

+2 -2
View File
@@ -389,11 +389,11 @@ mod tests {
assert_eq!(type_keys(&mut engine, &keymap, "12j"), run(Command::Move(Motion::Down), Some(12), None));
assert_eq!(
type_keys(&mut engine, &keymap, "\"+p"),
run(Command::PasteAfter, None, Some(Register::Clipboard))
run(Command::PasteAsChild, None, Some(Register::Clipboard))
);
assert_eq!(
type_keys(&mut engine, &keymap, "3\"ap"),
run(Command::PasteAfter, Some(3), Some(Register::Named('a')))
run(Command::PasteAsChild, Some(3), Some(Register::Named('a')))
);
assert_eq!(type_keys(&mut engine, &keymap, "gq"), Outcome::Unknown("gq".into()));
assert_eq!(type_keys(&mut engine, &keymap, "z<Esc>"), Outcome::Cancelled);