Repository navigation
Conversation
6eb2b4d to
62caad6
Compare
|
@chrisbra Is there an equivalent to |
62caad6 to
33c3266
Compare
33c3266 to
7d110d3
Compare
I suppose it kind of fixes it, but we still need to add a OSC 52 Vimscript plugin. I think the best way to add that is to first implement some sort of clipboard provider functionality like Neovim.
I'm guessing I can make that non-static to be used elsewhere? |
7d110d3 to
ef44e6a
Compare
of course, if that makes sense. |
ace1820 to
44547a5
Compare
|
I think this is ready for review |
e047b0a to
1dd6cac
Compare
chrisbra
left a comment
There was a problem hiding this comment.
Thanks. Can you please also update $VIMRUNTIME/optwin.vim and regenerate the vim syntax script? cd runtime/syntax/generator && make.
Also I think we should document the new plugin colorresp.vim somewhere.
I am also wondering if not using the autocommand TermResponseALL with <amatch> set to e.g. osc would be better and backwards compatible?
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a new TermResponseOSC autocommand event and introduces the v:termosc vim variable to capture OSC (Operating System Command) responses from terminals. This enables handling of OSC 52 commands and other terminal responses. The implementation moves the existing C-based terminal foreground/background color response handling to a VimScript plugin (colorresp.vim) that uses the new OSC infrastructure.
Key changes:
- Introduces
EVENT_TERMRESPONSEOSCautocommand andVV_TERMOSCvariable for OSC response handling - Replaces hardcoded color response parsing with generic OSC response capture mechanism
- Adds
osctimeoutlenoption to control OSC response timeout behavior
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vim.h | Adds new autocommand event and vim variable constants |
| src/term.c | Replaces color-specific OSC handling with generic OSC response processing |
| src/structs.h | Defines oscstate_T structure for OSC response state management |
| src/evalvars.c | Implements new vim variable and updates existing color response variables |
| src/option.c | Adds validation for new osctimeoutlen option |
| runtime/plugin/colorresp.vim | New VimScript plugin for terminal color response handling |
| src/testdir/ | Updates tests to reflect the new OSC handling approach |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
1dd6cac to
ec3c190
Compare
203cd3d to
3e6a650
Compare
|
I think this is ready |
chrisbra
left a comment
There was a problem hiding this comment.
I have a few additional comments. What do you think?
3c3aedc to
38fc3df
Compare
|
I think this is ready |
|
can you please rebase? |
38fc3df to
db22467
Compare
Done |
db22467 to
51da996
Compare
|
thanks |
Problem: Cannot react to terminal OSC responses
Solution: Allow TermResponseAll to be triggered by Terminal OSC
responses (Foxe Chen)
fixes: vim#14995
closes: vim#17975
Signed-off-by: Foxe Chen <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
|
@64-bitman this PR breaks Windows Terminal, could you please take a look at: #18251 |
I believe #18149 fixed this, can you use the newest version of vim and try again? |
It didn't fix at all. Yesterday I updated my vim from 9.1.1640 to 9.1.1740 and found this issue, then located the problem was introduced in this PR. |
Can you add |
Your solution works. adding |
Adds a new possible value for the
<amatch>of TermResponseAll calledosc, which setsv:termoscwhen any OSC response is received. This allows for stuff such as the OSC 52 command. The C implementation of the terminal fore/background OSC color response handling is moved to a Vimscript plugin