Possibly fixed a bug in the pty code used by -x flag.

This commit is contained in:
Storm Dragon
2026-05-08 19:45:59 -04:00
parent b6689d93bf
commit 3c61b6629a
+18 -12
View File
@@ -331,19 +331,25 @@ class ScreenManager:
].rstrip() ].rstrip()
) )
# If diff doesn't match expected typing pattern, treat # Prompt/status repaints can add extra diff text while
# as general screen change # the user's typed characters are still at the cursor.
# Keep those as typing so incoming speech does not
# announce the repainted prompt line.
if temp_new_delta != expected_typing: if temp_new_delta != expected_typing:
# Fallback: treat entire current line as new if expected_typing.strip() != "":
# content diff_list = ["+ " + expected_typing]
diff_list = [ else:
"+ " # Fallback: treat entire current line as new
+ self.env["screen"]["new_content_text"].split( # content
"\n" current_line = self.env["screen"][
)[self.env["screen"]["new_cursor"]["y"]] "new_content_text"
+ "\n" ].split("\n")[
] self.env["screen"]["new_cursor"]["y"]
typing = False ]
diff_list = [
"+ " + current_line + "\n"
]
typing = False
else: else:
# GENERAL SCREEN CHANGE DETECTION # GENERAL SCREEN CHANGE DETECTION
# Not typing - handle as line-by-line content change # Not typing - handle as line-by-line content change