Skip to content

fix: Disable grapheme cluster probe on LineDisciplineTerminal#1709

Merged
gnodet merged 1 commit intomasterfrom
fix/disable-grapheme-probe-linediscipline
Mar 23, 2026
Merged

fix: Disable grapheme cluster probe on LineDisciplineTerminal#1709
gnodet merged 1 commit intomasterfrom
fix/disable-grapheme-probe-linediscipline

Conversation

@gnodet
Copy link
Copy Markdown
Member

@gnodet gnodet commented Mar 23, 2026

Summary

  • Override supportsGraphemeClusterMode() in LineDisciplineTerminal to return false, preventing the DECRQM mode 2027 probe from being sent on terminals with no real terminal emulator

Fixes #1707

LineDisciplineTerminal (and subclasses ExternalTerminal, SwingTerminal, WebTerminal) have no real terminal emulator on the other end, so the DECRQM probe either:

  • Consumes actual input data from the pipe, causing readLine() to hang forever (the LineReaderTest hang #1707 issue)
  • Leaks the escape sequence [?2027$p into the output stream, corrupting downstream consumers (the Maven CI failure)

Test plan

  • LineReaderTest now passes (was hanging due to probe consuming piped input)
  • All 9 tests run, 0 failures, 2 skipped (the pre-existing @Disabled tests)

ExternalTerminal has no real terminal emulator on the other end,
so the DECRQM mode 2027 probe should not be sent. The probe would either
consume actual input data from the pipe (causing readLine() to hang) or
leak the escape sequence into the output stream (corrupting downstream
consumers).

This fixes two issues:
- LineReaderTest hanging when the terminal type starts with "xterm"
  because the probe consumes input meant for readLine()
- Maven embedded executor tests failing on Windows because the probe
  escape sequence [?2027$p contaminates captured output paths
@gnodet gnodet force-pushed the fix/disable-grapheme-probe-linediscipline branch from fe33b5c to 581cbb6 Compare March 23, 2026 08:37
@gnodet gnodet merged commit 1ab1e9f into master Mar 23, 2026
9 checks passed
@gnodet gnodet deleted the fix/disable-grapheme-probe-linediscipline branch March 23, 2026 08:58
@gnodet gnodet added this to the 4.0.8 milestone Mar 31, 2026
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.

LineReaderTest hang

1 participant