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