Skip to content

fix(jumplist): add jump list entries for footnote navigation#148

Merged
YousefHadder merged 1 commit intomainfrom
fix/jumplist-footnote-navigation
Nov 30, 2025
Merged

fix(jumplist): add jump list entries for footnote navigation#148
YousefHadder merged 1 commit intomainfrom
fix/jumplist-footnote-navigation

Conversation

@YousefHadder
Copy link
Copy Markdown
Owner

@YousefHadder YousefHadder commented Nov 30, 2025

Fixes: #145
Adds m' before cursor movements in footnote insertion and navigation so <C-o> correctly returns to the original position.

Copilot AI review requested due to automatic review settings November 30, 2025 06:06
@YousefHadder YousefHadder changed the title fix: add jump list entries for footnote navigation fix(jumplist): add jump list entries for footnote navigation Nov 30, 2025
@YousefHadder YousefHadder merged commit 9903fd4 into main Nov 30, 2025
20 of 21 checks passed
@YousefHadder YousefHadder deleted the fix/jumplist-footnote-navigation branch November 30, 2025 06:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances footnote navigation by adding jump list entries before cursor movements, enabling users to return to their original position using <C-o> after navigating to footnote definitions or references.

Key Changes:

  • Added vim.cmd("normal! m'") before all cursor movement operations in footnote navigation and insertion functions
  • Ensures consistent behavior across goto_definition, goto_reference, and insert_footnote functions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lua/markdown-plus/footnotes/navigation.lua Added jump list entries before cursor movements in goto_definition (line 43) and goto_reference functions (lines 70, 99)
lua/markdown-plus/footnotes/insertion.lua Added jump list entry before cursor movement to definition in insert_footnote function (line 157)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Can you insert cursor location to jump list before go to footnote?

2 participants