From 29e4cd054e6684303155c45c21d536c8120609e8 Mon Sep 17 00:00:00 2001 From: NicolasGB Date: Tue, 17 Mar 2026 11:33:22 +0100 Subject: [PATCH] fix(bookmark): Always move bookmars with `-B` to allow the user moving it forward and backwards seemlessly --- lua/jj/cmd/init.lua | 2 +- lua/jj/cmd/log.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/jj/cmd/init.lua b/lua/jj/cmd/init.lua index 510d46a..5b71af6 100644 --- a/lua/jj/cmd/init.lua +++ b/lua/jj/cmd/init.lua @@ -539,7 +539,7 @@ function M.bookmark_move() default = "@", }, function(revset) if revset then - local cmd = string.format("jj b m %s --to %s", choice, revset) + local cmd = string.format("jj b m %s --to %s -B", choice, revset) runner.execute_command_async(cmd, function() utils.notify( string.format("Bookmark `%s` moved successfully to %s", choice, revset), diff --git a/lua/jj/cmd/log.lua b/lua/jj/cmd/log.lua index b5dad19..b4e9b6f 100644 --- a/lua/jj/cmd/log.lua +++ b/lua/jj/cmd/log.lua @@ -787,7 +787,7 @@ function M.handle_log_bookmark() end) else -- Move existing bookmark to the revision - local cmd = string.format("jj bookmark move %s --to %s", choice, revset) + local cmd = string.format("jj bookmark move %s --to %s -B", choice, revset) runner.execute_command_async(cmd, function() utils.notify(string.format("Moved bookmark `%s` to `%s`", choice, revset), vim.log.levels.INFO) M.log({})