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()
)
# If diff doesn't match expected typing pattern, treat
# as general screen change
# Prompt/status repaints can add extra diff text while
# 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:
# Fallback: treat entire current line as new
# content
diff_list = [
"+ "
+ self.env["screen"]["new_content_text"].split(
"\n"
)[self.env["screen"]["new_cursor"]["y"]]
+ "\n"
]
typing = False
if expected_typing.strip() != "":
diff_list = ["+ " + expected_typing]
else:
# Fallback: treat entire current line as new
# content
current_line = self.env["screen"][
"new_content_text"
].split("\n")[
self.env["screen"]["new_cursor"]["y"]
]
diff_list = [
"+ " + current_line + "\n"
]
typing = False
else:
# GENERAL SCREEN CHANGE DETECTION
# Not typing - handle as line-by-line content change