Remove terminal mode switching (#1170)

This was initially in place for when we used a different terminal
backend. That backend required that the terminal be in a specific mode,
or otherwise key modifiers would not be correctly recognized. It was
super frustrating.

Since the move to crossterm, we automatically switch to raw mode: b48de9bd9d/atuin/src/command/client/search/interactive.rs (L528)

Should resolve #987, #650, #909, #492

Should also supercede #1149
This commit is contained in:
Ellie Huxtable 2023-08-14 09:59:18 +01:00 committed by GitHub
parent cd6c44cfe7
commit e356ffaeba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 5 deletions

View file

@ -16,10 +16,8 @@ _atuin_precmd() {
} }
__atuin_history() { __atuin_history() {
tput rmkx
# shellcheck disable=SC2048,SC2086 # shellcheck disable=SC2048,SC2086
HISTORY="$(RUST_LOG=error atuin search $* -i -- "${READLINE_LINE}" 3>&1 1>&2 2>&3)" HISTORY="$(RUST_LOG=error atuin search $* -i -- "${READLINE_LINE}" 3>&1 1>&2 2>&3)"
tput smkx
READLINE_LINE=${HISTORY} READLINE_LINE=${HISTORY}
READLINE_POINT=${#READLINE_LINE} READLINE_POINT=${#READLINE_LINE}

View file

@ -30,13 +30,10 @@ _atuin_search() {
emulate -L zsh emulate -L zsh
zle -I zle -I
# Switch to cursor mode, then back to application
echoti rmkx
# swap stderr and stdout, so that the tui stuff works # swap stderr and stdout, so that the tui stuff works
# TODO: not this # TODO: not this
# shellcheck disable=SC2048 # shellcheck disable=SC2048
output=$(RUST_LOG=error atuin search $* -i -- $BUFFER 3>&1 1>&2 2>&3) output=$(RUST_LOG=error atuin search $* -i -- $BUFFER 3>&1 1>&2 2>&3)
echoti smkx
if [[ -n $output ]]; then if [[ -n $output ]]; then
RBUFFER="" RBUFFER=""