Backtick-enclosed commands in help files are not highlighted correctly
when they contain spaces and are followed by punctuation or whitespace.
Example:
:call code. is not highlighted
:call code . is not highlighted
However:
:callcode. is highlighted
This leads to inconsistent and unintuitive behavior.
The existing implementation uses syn match patterns with strict
boundary conditions, which:
Replace the match-based rules with a region-based rule:
syn region helpCommand start="" end="" keepend contains=helpBacktick
This approach:
Manually verified:
:call code ✔ highlighted:call code. ✔ highlighted:call code . ✔ highlighted:call code; ✔ highlightedExisting behavior for other backtick patterns remains unchanged.
There is one unrelated test failure in test_buffer.vim:
Expected 'E94:' but got 'E93'
This appears to be environment-specific and unrelated to
changes in runtime/syntax/help.vim.
https://github.com/vim/vim/pull/19874
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
why did you comment out parts of it? Also please create a syntax test for this change. And if you are using AI to create a PR, you need to disclose this.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@akarshbarar pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
why did you comment out parts of it? Also please create a syntax test for this change. And if you are using AI to create a PR, you need to disclose this.
There was an issue then we type :call code. in vim and :syntax on then the code was not highlighted, so code has fixed that issue now the code is getting highlighted as expected.
Here is the issue link #11855.
The commented code were just for fallback and should not be a part of final code. I have removed the commented code.
Yes I used AI just to understand the codebase and explore possible approach but final fix, validation and testing was done manually.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Since this is a syntax test, it should go below runtime/syntax/testdir/. Create a new file help_examples.txt and add a few examples that previously failed. Then regenerate the dumps and verify those look actually good and then commit here.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This PR is nonsense and having to plough through LLM generated babble adds insult to injury. Please don't submit PRs like this unless have a reasonable understanding of the issues and confidence in your solution, it wastes everyone's time including your own.
I don't have to look to know that this change will break highlighting in dozens of help pages, and so badly you can't have done even the most basic manual testing.
It should be blatantly obvious that the current implementation's complexity is not an accident. Bram's response to the referenced issue should also have caused you to consider the simplicity of your solution more critically. He would not have suggested a work-around if it was so trivial to fix.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This PR is nonsense and having to plough through LLM generated babble adds insult to injury. Please don't submit PRs like this unless you have a reasonable understanding of the issues and confidence in your solution, it wastes everyone's time including your own.
I don't have to look to know that this change will break highlighting in dozens of help pages, and so badly you can't have done even the most basic manual testing.
It should be blatantly obvious that the current implementation's complexity is not an accident. Bram's response to the referenced issue should also have caused you to consider the simplicity of your solution more critically. He would not have suggested a work-around if it was so trivial to fix.
Thank you for your response being new to open source contribution i might have missed many points, but it was great learning for me and how vim works will try to lean things in depth, thank you.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()