Closed cowile closed 2 months ago
Can you test it with the tree-sitter support: https://github.com/rust-lang/rust-mode?tab=readme-ov-file#tree-sitter
If outside of an impl block, rust-end-of-defun will jump to the end of that block, but using rust-beginning-of-defun immediately after will stop at each nested function definition.
From my testing, treesit-end-of-defun
jumps to the end of the block and using treesit-beginning-of-defun
jumps to the start of the block.
For consistent behavior, I would expect either the cursor is back where it started
I believe this is fixed via the tree sitter support.
I'm closing this issue for now as I haven't been able to reproduce it recently using tree sitter and haven't heard back. Please feel free to reopen it if you encounter the issue again in the future.
Similar to #227
If outside of an impl block,
rust-end-of-defun
will jump to the end of that block, but usingrust-beginning-of-defun
immediately after will stop at each nested function definition.Call rust-end-of-defun Call rust-beginning-of-defun
For consistent behavior, I would expect either the cursor is back where it started (if
impl
is considered a function block) or at the beginning off1
(if it is not).