Skip to content

Treat wezterm as a terminal that knows how to handle shift+enter#2825

Merged
dgageot merged 1 commit into
docker:mainfrom
rumpl:wezterm-shift-enter
May 20, 2026
Merged

Treat wezterm as a terminal that knows how to handle shift+enter#2825
dgageot merged 1 commit into
docker:mainfrom
rumpl:wezterm-shift-enter

Conversation

@rumpl
Copy link
Copy Markdown
Member

@rumpl rumpl commented May 19, 2026

Tested with wezterm 20240203-110809-5046fc22 (latest) on a Mac and shift+enter works

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
@rumpl rumpl requested a review from a team as a code owner May 19, 2026 22:20
Copy link
Copy Markdown

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

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

Assessment: 🟢 APPROVE

The change is small, focused, and correct. WezTerm detection uses four complementary environment-variable heuristics (TERM_PROGRAM, WEZTERM_PANE, WEZTERM_UNIX_SOCKET, and TERM substring), all lowercased before comparison, making the check robust. The function is wired into both tui.go and editor.go at the right call sites and correctly OR-combined with the Kitty keyboard-enhancement flags. The nil-guard is a safe defensive pattern, and the test suite covers all four positive paths plus the nil and false-positive cases. No bugs found in the changed lines.

Copy link
Copy Markdown

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

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

Assessment: 🟢 APPROVE

The changes correctly add WezTerm terminal detection for keyboard enhancement support, wiring it consistently into both the editor component and the top-level TUI model. The new SupportsModifiedEnter function is clean, well-tested, and the state synchronization between tui.go and editor.go is coherent.

No CONFIRMED or LIKELY bugs were found. All hypotheses raised during analysis were DISMISSED after verification.

@dgageot dgageot merged commit 76e1e1b into docker:main May 20, 2026
8 checks passed
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.

3 participants