mirror of
https://github.com/wez/wezterm.git
synced 2024-11-27 12:23:46 +03:00
disable mouse input in line editor example
This commit is contained in:
parent
6d243ec1f1
commit
07910f1d59
@ -1,10 +1,15 @@
|
||||
use failure::Fallible;
|
||||
use termwiz::caps::Capabilities;
|
||||
use failure::{err_msg, Fallible};
|
||||
use termwiz::caps::{Capabilities, ProbeHintsBuilder};
|
||||
use termwiz::lineedit::LineEditor;
|
||||
use termwiz::terminal::new_terminal;
|
||||
|
||||
fn main() -> Fallible<()> {
|
||||
let caps = Capabilities::new_from_env()?;
|
||||
// Disable mouse input in the line editor
|
||||
let hints = ProbeHintsBuilder::new_from_env()
|
||||
.mouse_reporting(Some(false))
|
||||
.build()
|
||||
.map_err(err_msg)?;
|
||||
let caps = Capabilities::new_with_hints(hints)?;
|
||||
let terminal = new_terminal(caps)?;
|
||||
let mut editor = LineEditor::new(terminal);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user