Problem with alacritty's handling of selections when the terminal resizes
This commit is contained in:
parent
acc1950ab4
commit
68cf91de32
5 changed files with 30 additions and 12 deletions
|
@ -272,6 +272,7 @@ impl TerminalBuilder {
|
|||
initial_size: TerminalSize,
|
||||
blink_settings: Option<TerminalBlink>,
|
||||
alternate_scroll: &AlternateScroll,
|
||||
window_id: usize,
|
||||
) -> Result<TerminalBuilder> {
|
||||
let pty_config = {
|
||||
let alac_shell = shell.clone().and_then(|shell| match shell {
|
||||
|
@ -323,7 +324,7 @@ impl TerminalBuilder {
|
|||
let term = Arc::new(FairMutex::new(term));
|
||||
|
||||
//Setup the pty...
|
||||
let pty = match tty::new(&pty_config, initial_size.into(), None) {
|
||||
let pty = match tty::new(&pty_config, initial_size.into(), window_id as u64) {
|
||||
Ok(pty) => pty,
|
||||
Err(error) => {
|
||||
bail!(TerminalError {
|
||||
|
@ -580,6 +581,12 @@ impl Terminal {
|
|||
|
||||
self.pty_tx.0.send(Msg::Resize((new_size).into())).ok();
|
||||
|
||||
// When this resize happens
|
||||
// We go from 737px -> 703px height
|
||||
// This means there is 1 less line
|
||||
// that means the delta is 1
|
||||
// That means the selection is rotated by -1
|
||||
|
||||
term.resize(new_size);
|
||||
}
|
||||
InternalEvent::Clear => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue