mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Fixed mouse captures issue with the terminal
This commit is contained in:
@@ -113,6 +113,8 @@ impl ActivityManager {
|
|||||||
None => break, // Exit
|
None => break, // Exit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Drop context
|
||||||
|
drop(self.context.take());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loops
|
// Loops
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ use crate::host::Localhost;
|
|||||||
|
|
||||||
// Includes
|
// Includes
|
||||||
use crossterm::execute;
|
use crossterm::execute;
|
||||||
use crossterm::event::{EnableMouseCapture, DisableMouseCapture};
|
use crossterm::event::DisableMouseCapture;
|
||||||
use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen};
|
use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen};
|
||||||
use std::io::{stdout, Stdout, Write};
|
use std::io::{stdout, Stdout, Write};
|
||||||
use tui::backend::CrosstermBackend;
|
use tui::backend::CrosstermBackend;
|
||||||
@@ -55,7 +55,7 @@ impl Context {
|
|||||||
pub fn new(local: Localhost) -> Context {
|
pub fn new(local: Localhost) -> Context {
|
||||||
// Create terminal
|
// Create terminal
|
||||||
let mut stdout = stdout();
|
let mut stdout = stdout();
|
||||||
assert!(execute!(stdout, EnterAlternateScreen, EnableMouseCapture).is_ok());
|
assert!(execute!(stdout, EnterAlternateScreen).is_ok());
|
||||||
Context {
|
Context {
|
||||||
local: local,
|
local: local,
|
||||||
input_hnd: InputHandler::new(),
|
input_hnd: InputHandler::new(),
|
||||||
|
|||||||
Reference in New Issue
Block a user