Skip to content

Commit f2cdf4b

Browse files
authored
Merge pull request #5 from NorasTech/fix/terminal-warnings
Fix CI/CD problems
2 parents 4d01c4e + 2707e25 commit f2cdf4b

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/pty/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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);

src/pty/terminal.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff 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
155155
pub 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

0 commit comments

Comments
 (0)