Skip to content

fix(panel): strip external treesitter/syntax from panel buffers#117

Merged
dlyongemallo merged 1 commit intomainfrom
fix_wrong_underline
Apr 15, 2026
Merged

fix(panel): strip external treesitter/syntax from panel buffers#117
dlyongemallo merged 1 commit intomainfrom
fix_wrong_underline

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

Fixes a bug where pairs of underscores in a filename in the file history panel are parsed as markdown and result in their removal and the display of intervening text as italics, if a plugin such as render-markdown.nvim is installed.

Copilot AI review requested due to automatic review settings April 15, 2026 08:01
Copy link
Copy Markdown

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

Fixes a display bug in Diffview panel buffers where external highlighters (notably Tree-sitter-based markdown renderers) can interpret panel text as markup (e.g., _word_) and alter what’s shown.

Changes:

  • Add a helper to stop Tree-sitter and clear Vim syntax for panel buffers.
  • Invoke that helper immediately on panel buffer creation.
  • Re-apply the stripping on FileType and BufWinEnter to counter plugins re-attaching after events.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/ui/panel.lua Outdated
Copy link
Copy Markdown

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/tests/functional/panel_spec.lua Outdated
Comment thread lua/diffview/tests/functional/panel_spec.lua Outdated
Copy link
Copy Markdown

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/ui/panel.lua Outdated
Comment thread lua/diffview/tests/functional/panel_spec.lua Outdated
Copy link
Copy Markdown

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/ui/panel.lua Outdated
Comment thread lua/diffview/ui/panel.lua Outdated
Comment thread lua/diffview/tests/functional/panel_spec.lua Outdated
Copy link
Copy Markdown

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dlyongemallo dlyongemallo merged commit f7ddbd0 into main Apr 15, 2026
6 checks passed
@dlyongemallo dlyongemallo deleted the fix_wrong_underline branch April 15, 2026 17:52
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.

2 participants