Possibly fixed a bug in the pty code used by -x flag.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user