File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ mod tests {
151151
152152 #[ test]
153153 fn send_data_buffers_when_socket_would_block ( ) -> Result < ( ) > {
154- let ( mut writer, mut reader) = UnixStream :: pair ( ) ?;
154+ let ( writer, mut reader) = UnixStream :: pair ( ) ?;
155155 writer. set_nonblocking ( true ) ?;
156156
157157 let mut client = ClientInfo :: new ( writer) ;
Original file line number Diff line number Diff line change @@ -153,10 +153,17 @@ pub fn send_refresh(stream: &mut impl Write) -> io::Result<()> {
153153
154154/// Send terminal refresh sequences to restore normal state
155155pub fn send_terminal_refresh_sequences ( stream : & mut impl Write ) -> io:: Result < ( ) > {
156- // Send minimal refresh sequences without modifying cursor
156+ // Send refresh sequences to restore standard terminal state after TUIs
157157 let refresh_sequences = [
158- "\x1b [m" , // Reset all attributes
159- "\x0c " , // Form feed (clear screen)
158+ "\x1b [m" , // Reset all attributes
159+ "\x1b [?25h" , // Ensure cursor is visible
160+ "\x1b [?7h" , // Enable auto-wrap
161+ "\x1b [?1000l" , // Disable mouse tracking
162+ "\x1b [?1002l" , // Disable cell motion mouse tracking
163+ "\x1b [?1003l" , // Disable all motion mouse tracking
164+ "\x1b [?2004l" , // Disable bracketed paste
165+ "\x1b [0;0r" , // Reset scroll region
166+ "\x0c " , // Clear screen
160167 ]
161168 . join ( "" ) ;
162169
You can’t perform that action at this time.
0 commit comments