Skip to content

Added Kitty Multicursor Support#14757

Open
jonbitgood wants to merge 5 commits into
helix-editor:masterfrom
jonbitgood:master
Open

Added Kitty Multicursor Support#14757
jonbitgood wants to merge 5 commits into
helix-editor:masterfrom
jonbitgood:master

Conversation

@jonbitgood

Copy link
Copy Markdown

Added support for kitty's multiple cursors protocol to show real terminal cursors at all selection positions.

This closes/addresses issue #14517

Add support for kitty's multiple cursors protocol to show real terminal
cursors at all selection positions when using bar/underline cursors.
These include fixes in files not in the original kitty commit in order
to get a clean bill of health from cargo clippy.
Comment thread helix-tui/src/backend/termina.rs Outdated
// Detect kitty multi-cursor support (available in kitty >= 0.43.0)
if matches!(
term_program().as_deref(),
Some("kitty") | Some("xterm-kitty")

@Zapeth Zapeth Nov 16, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this detection should be changed to how its described in the kitty docs, otherwise other terminals supporting this feature will not be able to use it out of the box -> https://github.com/kovidgoyal/kitty/blob/master/docs/multiple-cursors-protocol.rst#querying-for-support

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I believe Termina lacks the capability at the moment. I'll work on a pull request there to add it.

Comment thread helix-tui/src/backend/termina.rs Outdated
Comment on lines +565 to +572
write!(self.terminal, "\x1b[>0;4 q")?;

if !cursors.is_empty() {
write!(self.terminal, "\x1b[>29")?; // Shape 29 = follow main cursor
for (x, y) in cursors {
write!(self.terminal, ";2:{}:{}", y + 1, x + 1)?; // 1-indexed coords
}
write!(self.terminal, " q")?;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These commands belong in Termina too, we shouldn't be writing escape sequences as literal text

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Gotcha, I'll update the termina pull request

Use Cursor instead of manually writing escape sequences
Comment on lines +8 to -22
#[derive(Debug, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize, Default)]
#[serde(rename_all = "lowercase")]
pub enum Severity {
#[default]
Hint,
Info,
Warning,
Error,
}

impl Default for Severity {
fn default() -> Self {
Self::Hint
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like this and other changes (like slice_from_raw_parts_mut below) are unrelated and are probably lints from newer versions of Rust. If you install Rust using rustup it will respect the version set in rust-toolchain.toml. We keep an MSRV that is intentionally older, see https://github.com/helix-editor/helix/blob/master/docs/CONTRIBUTING.md#minimum-stable-rust-version-msrv-policy

These extra changes should be reset

@sabisho

sabisho commented Jun 1, 2026

Copy link
Copy Markdown

Any updates on this?

@sabisho

sabisho commented Jun 20, 2026

Copy link
Copy Markdown

Now that #15857 has been merged, can we please add this too before cutting the new release so that we finally get cursor animations?

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.

4 participants