From 3b8ef3a0c4b35d70b58cbf3ea4782e38357c4bd3 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Mon, 10 Feb 2020 23:41:48 +0000 Subject: Revert "Fix backspace deleting chars when IME is open" This reverts commit 7f4dce2ee04859fb0b48f15cf808b60065778703. Originally it was assumed that macOS always sends the \x7f on backspace anyways, however this is not true. It seems like the character on backspace can change even within the same terminal session, so we need to have our own binding to reliably set the correct binding. A solution for #1606 should be implemented in cooperation with winit. --- alacritty/src/config/bindings.rs | 2 +- alacritty/src/config/mod.rs | 3 --- alacritty/src/logging.rs | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) (limited to 'alacritty/src') diff --git a/alacritty/src/config/bindings.rs b/alacritty/src/config/bindings.rs index 67dda775..d5360e9a 100644 --- a/alacritty/src/config/bindings.rs +++ b/alacritty/src/config/bindings.rs @@ -287,6 +287,7 @@ pub fn default_key_bindings() -> Vec { PageDown; Action::Esc("\x1b[6~".into()); PageDown, ModifiersState::SHIFT, +TermMode::ALT_SCREEN; Action::Esc("\x1b[6;2~".into()); Tab, ModifiersState::SHIFT; Action::Esc("\x1b[Z".into()); + Back; Action::Esc("\x7f".into()); Back, ModifiersState::ALT; Action::Esc("\x1b\x7f".into()); Insert; Action::Esc("\x1b[2~".into()); Delete; Action::Esc("\x1b[3~".into()); @@ -405,7 +406,6 @@ fn common_keybindings() -> Vec { Add, ModifiersState::CTRL; Action::IncreaseFontSize; Subtract, ModifiersState::CTRL; Action::DecreaseFontSize; Minus, ModifiersState::CTRL; Action::DecreaseFontSize; - Back; Action::Esc("\x7f".into()); ) } diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs index 1c5f7ba5..d7b702b9 100644 --- a/alacritty/src/config/mod.rs +++ b/alacritty/src/config/mod.rs @@ -7,9 +7,6 @@ use std::path::PathBuf; #[cfg(windows)] use dirs; use log::{error, warn}; -use serde_yaml; -#[cfg(not(windows))] -use xdg; use alacritty_terminal::config::{Config as TermConfig, LOG_TARGET_CONFIG}; diff --git a/alacritty/src/logging.rs b/alacritty/src/logging.rs index 9d837a78..86f01ce7 100644 --- a/alacritty/src/logging.rs +++ b/alacritty/src/logging.rs @@ -27,7 +27,6 @@ use std::sync::{Arc, Mutex}; use glutin::event_loop::EventLoopProxy; use log::{self, Level}; -use time; use alacritty_terminal::event::Event; use alacritty_terminal::message_bar::Message; -- cgit