mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #765] [MERGED] fix(palette): querySpecialColors resistent to term emulators with noi… #1550
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1550
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/765
Author: @MaxDillon
Created: 3/2/2026
Status: ✅ Merged
Merged: 3/2/2026
Merged by: @kommander
Base:
main← Head:main📝 Commits (2)
e0ade78fix(palette): querySpecialColors resistent to term emulators with noisy esc sequencesbcb4028prettier📊 Changes
1 file changed (+4 additions, -0 deletions)
View changed files
📝
packages/core/src/lib/terminal-palette.ts(+4 -0)📄 Description
Issue for this PR
#705
Type of change
What does this PR do?
Opentuin getPallette function for querySpecialColors has an idleTimer meant to exit out before the explicit timeout if the terminal does not provide all of the color escape sequences 10-19. The idle timer resets if any escape sequence triggers the onData function again.
This is an issue for terminal emulators like ghostty which are very noisy with the escape sequences they send. Here we only allow the timeout to reset if a response conforming to
OSC_SPECIAL_RESPONSEis read in the buffer.This is possibly overly conservative. If we were being more aggressive, we could only reset the idle timer when an entry in results gets updated from a null value. As it stands, this improves start time of getPallette in ghostty from the max timeout to almost negligable
How did you verify your code works?
[17:54:05] [LOG] 'time elapsed' 5014[17:54:28] [LOG] 'time elapsed' 220Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.