microsoft/Terminal

Add support for multi-param OSC sequences

Open

#942 建立於 2019年5月22日

在 GitHub 查看
 (9 留言) (4 反應) (0 負責人)C++ (3,212 fork)batch import
Area-VTHelp WantedIssue-FeatureProduct-Conhost

倉庫指標

Star
 (35,764 star)
PR 合併指標
 (平均合併 27天 19小時) (30 天內合併 24 個 PR)

描述

@vapier wrote:

i don't think this correctly handles chaining to following OSC sequences.

That's correct. It doesn't handle chaining at all. It also doesn't handle color names.

Since this was my first PR, I was trying not to rewrite, but to just add a little on top of what was there and learn how things work -- I even reused the color parser that was written for OSC 4, though it won't support color names, meaning you can only set RGB values, and not just reuse colors from your base 16 for foreground and background.

The structure of the OSC handler in the State Machine seems designed on the assumption that they are single-valued (meaning one value per escape sequence), which makes chaining basically impossible.

Basically, still to do:

  • Rewrite the ActionOscDispatch to support chains of values
  • Make OSC 4 support setting the whole color palette at once (This was done in #7578)
  • Make OSC 10, 11, 12 support setting all of them at once
  • Add support for lookups ("?") to output the current value #3718
  • Add support for resetting colors (OSC 104..119) #3719
  • Rewrite the color parser to include x11 color names more formats #3715
  • Support setting colors above index 16 #3717 (maybe #313?) Those things are definitely needed, but didn't seem necessary for a first pass.

Somewhere along the way someone will need to decide if we're going to do special colors for bold/italic/underline/blink/reverse ... and which window properties should be settable by OSC 3 😉 @oising?

Originally posted by @Jaykul in https://github.com/microsoft/terminal/pull/891#issuecomment-494667974

貢獻者指南