
Release Notes: - N/A --------- Co-authored-by: michael <michael@zed.dev> Co-authored-by: agus <agus@zed.dev>
984 B
984 B
- Adds a new
setWindowTitle
method to thestandardRenderer
struct that sets the terminal window title using the OSC 0 escape sequence. It includes thread safety with mutex locking and uses fmt.Fprintf to send the escape sequence with the provided title. - Modifies the
handleMessages
method instandardRenderer
to handle a newsetWindowTitleMsg
message type by calling the newsetWindowTitle
method. This completes the rendering-side implementation for window title updates. - Updates the event loop in the Program struct to properly handle
setWindowTitleMsg
messages by passing them through to the renderer without additional processing, similar to other renderer-specific messages. - Adds documentation to the commands tutorial README explaining how to set window titles in Bubble Tea applications. It shows examples of using
tea.SetWindowTitle()
in both Init and Update methods, and explains its usefulness for reflecting application state in the window title.