Skip to content

Commit

Permalink
Revert "Fix backspace deleting chars when IME is open"
Browse files Browse the repository at this point in the history
This reverts commit 7f4dce2.

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 alacritty#1606 should be implemented in cooperation with winit.
  • Loading branch information
chrisduerr authored and roychoo committed Apr 19, 2020
1 parent dac61da commit be421b5
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Resize of bitmap fonts
- Crash when using bitmap font with `embeddedbitmap` set to `false`
- Inconsistent fontconfig fallback
- Backspace deleting characters while IME is open on macOS
- Handling of OpenType variable fonts
- Expansion of block-selection on partially selected full-width glyphs
- Minimize action only works with decorations on macOS
Expand Down
2 changes: 1 addition & 1 deletion alacritty/src/config/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ pub fn default_key_bindings() -> Vec<KeyBinding> {
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());
Expand Down Expand Up @@ -405,7 +406,6 @@ fn common_keybindings() -> Vec<KeyBinding> {
Add, ModifiersState::CTRL; Action::IncreaseFontSize;
Subtract, ModifiersState::CTRL; Action::DecreaseFontSize;
Minus, ModifiersState::CTRL; Action::DecreaseFontSize;
Back; Action::Esc("\x7f".into());
)
}

Expand Down
3 changes: 0 additions & 3 deletions alacritty/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
1 change: 0 additions & 1 deletion alacritty/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions alacritty_terminal/src/ansi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ use std::str;
use log::{debug, trace};
use serde::{Deserialize, Serialize};

use vte;

use crate::index::{Column, Line};
use crate::term::color::Rgb;

Expand Down
2 changes: 0 additions & 2 deletions alacritty_terminal/src/term/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2181,8 +2181,6 @@ impl IndexMut<Column> for TabStops {
mod tests {
use std::mem;

use serde_json;

use crate::ansi::{self, CharsetIndex, Handler, StandardCharset};
use crate::clipboard::Clipboard;
use crate::config::MockConfig;
Expand Down
1 change: 0 additions & 1 deletion alacritty_terminal/src/tty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.
//
//! tty related functionality
use mio;
use std::{env, io};

use terminfo::Database;
Expand Down
1 change: 0 additions & 1 deletion alacritty_terminal/src/tty/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use crate::config::{Config, Shell};
use crate::event::OnResize;
use crate::term::SizeInfo;
use crate::tty::{ChildEvent, EventedPty, EventedReadWrite};
use mio;

use libc::{self, c_int, pid_t, winsize, TIOCSCTTY};
use log::error;
Expand Down
2 changes: 1 addition & 1 deletion winpty/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn aquire_winpty_agent(out_path: &Path) {

let mut archive = zip::ZipArchive::new(file).unwrap();

let target = match env::var("TARGET").unwrap().split("-").next().unwrap() {
let target = match env::var("TARGET").unwrap().split('-').next().unwrap() {
"x86_64" => "x64",
"i386" => "ia32",
_ => panic!("architecture has no winpty binary"),
Expand Down

0 comments on commit be421b5

Please sign in to comment.