Repository navigation
feat: enable OSC133 click events via reedline - #17491
Conversation
cd6b703 to
4b82ff4
Compare
|
This is cool. I haven't tested it yet but I didn't realize that osc133 would enable mouse clicks by itself (with changes to reedline of course). |
88e157f to
0658b95
Compare
|
ok, your turn! @stuartcarnie 🤣 |
|
@stuartcarnie when you get a minute, if you can fix these conflicts we can land this one. |
Move OSC 133/633 prompt markers from nushell into reedline's SemanticPromptMarkers, use Osc133ClickEventsMarkers to advertise click_events=1, and wire up MouseClickMode based on osc133 config.
0658b95 to
6d278bc
Compare
|
@fdncred done! |
e1c0132 to
bcc6c29
Compare
<!-- Thank you for improving Nushell! Please, read our contributing guide: https://github.com/nushell/nushell/blob/main/CONTRIBUTING.md --> ## Summary - Enable OSC 133 semantic prompt markers (via @fdncred / nushell/reedline/pull/1019) - Enable OSC 133 click_events (via nushell/reedline/pull/1020). - Keep OSC 633 support for VS Code and prefer it when available. ## Testing - `cargo test -p nu-cli prompt_does_not_embed_osc_markers` - `cargo test -p nu-cli semantic_markers_` - `cargo test -p nu-protocol click_to_cursor_is_unknown_option` ## Release notes summary - What our users need to know - Enabling `shell_integration.osc133` now also enables click-to-cursor in supported terminals. ## Tasks after submitting - [ ] Update the [documentation](https://github.com/nushell/nushell.github.io) <details> <summary<strong>DEMO</strong></summary> https://github.com/user-attachments/assets/ce11079f-0c4f-4f90-a1b1-e3c3d0b99351 </details>
|
Will this affect using Wezterm (in Windows)? Having OSC133 = true (works find in Windows Terminal), causes Wezterm to scroll up when any character / cursor is entered. |
|
With WezTerm nightly the problem is gone even before this change. However, I have not tried it yet in WezTerm on Windows yet. |
|
Running Windows, I updated Wezterm stable to Wezterm nightly (20260214) and now I don't have to disable OSC133. This is from my Nushell Config: |
Summary
Testing
cargo test -p nu-cli prompt_does_not_embed_osc_markerscargo test -p nu-cli semantic_markers_cargo test -p nu-protocol click_to_cursor_is_unknown_optionRelease notes summary - What our users need to know
Enabling
shell_integration.osc133now also enables click-to-cursor in supported terminals.Tasks after submitting
Details
DEMONushell.OSC.133.+.Ghostty.mp4