diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 4f465b3e548a..1317ca72063e 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -498,13 +498,15 @@ fn parse_mark_register_contents( let mut rv_iter = rv.into_iter(); let Some(doc_id) = rv_iter - .next().map(|c| c.into_owned()) + .next() + .map(|c| c.into_owned()) .and_then(|s| s.try_into().ok()) else { return Err(anyhow!("Register did not contain valid document id")); }; let Some(history_rev) = rv_iter - .next().map(|c| c.into_owned()) + .next() + .map(|c| c.into_owned()) .and_then(|s| s.parse().ok()) else { return Err(anyhow!("Register did not contain valid revision number")); diff --git a/helix-term/tests/test/movement.rs b/helix-term/tests/test/movement.rs index 48b2ae1b9ae3..6ea29cb0e300 100644 --- a/helix-term/tests/test/movement.rs +++ b/helix-term/tests/test/movement.rs @@ -66,23 +66,33 @@ async fn insert_to_normal_mode_cursor_position() -> anyhow::Result<()> { } #[tokio::test(flavor = "multi_thread")] -async fn register_mark() -> anyhow::Result<()> { +async fn bookmark() -> anyhow::Result<()> { // add a mark and then immediately paste it out test(( indoc! {"\ - Lorem + #[|Lorem]# ipsum - dolor#[| - sit]# - amet." + #(|Lorem)# + ipsum + #(|Lorem)# + ipsum + #(|Lorem)# + ipsum + #(|Lorem)# + ipsum" }, - "1\"^p", + ":register_mark1casdf:goto_mark1", indoc! {"\ - Lorem + #[|asdf]# + ipsum + #(|asdf)# + ipsum + #(|asdf)# + ipsum + #(|asdf)# ipsum - dolor - sit#[|1:(24,19)]# - amet." + #(|asdf)# + ipsum" }, )) .await?;