[PR #16187] COOKED_READ: Fix reference counting woes #30858

Open
opened 2026-01-31 09:43:24 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16187

State: closed
Merged: Yes


This restores the original code from before 821ae3a where
the .GetMainBuffer() call was accidentally removed.

Closes #16158

Validation Steps Performed

  • Run this Python script:
    import sys
    while True:
      sys.stdout.write("\033[?1049h")
      sys.stdout.flush()
      sys.stdin.readline()
      sys.stdout.write("\033[?1049l")
    
  • Press enter repeatedly
  • Doesn't crash ✅
**Original Pull Request:** https://github.com/microsoft/terminal/pull/16187 **State:** closed **Merged:** Yes --- This restores the original code from before 821ae3a where the `.GetMainBuffer()` call was accidentally removed. Closes #16158 ## Validation Steps Performed * Run this Python script: ```py import sys while True: sys.stdout.write("\033[?1049h") sys.stdout.flush() sys.stdin.readline() sys.stdout.write("\033[?1049l") ``` * Press enter repeatedly * Doesn't crash ✅
claunia added the pull-request label 2026-01-31 09:43:24 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30858