mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
src/curses: drop CURSES_INITIALIZED lock
setupterm/cur_term does not get used any more
This commit is contained in:
3
src/env/mod.rs
vendored
3
src/env/mod.rs
vendored
@@ -18,9 +18,6 @@
|
||||
/// with `$fish_read_limit`.
|
||||
pub static READ_BYTE_LIMIT: AtomicUsize = AtomicUsize::new(DEFAULT_READ_BYTE_LIMIT);
|
||||
|
||||
/// The curses `cur_term` TERMINAL pointer has been set up.
|
||||
pub static CURSES_INITIALIZED: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
/// Does the terminal have the "eat new line" glitch.
|
||||
pub static TERM_HAS_XN: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
use crate::complete::complete_invalidate_path;
|
||||
use crate::curses::{self, Term};
|
||||
use crate::env::{setenv_lock, unsetenv_lock, EnvMode, EnvStack, Environment};
|
||||
use crate::env::{CURSES_INITIALIZED, DEFAULT_READ_BYTE_LIMIT, READ_BYTE_LIMIT, TERM_HAS_XN};
|
||||
use crate::env::{DEFAULT_READ_BYTE_LIMIT, READ_BYTE_LIMIT, TERM_HAS_XN};
|
||||
use crate::flog::FLOG;
|
||||
use crate::function;
|
||||
use crate::input_common::{update_wait_on_escape_ms, update_wait_on_sequence_key_ms};
|
||||
@@ -583,7 +583,6 @@ fn init_curses(vars: &EnvStack) {
|
||||
update_fish_color_support(vars);
|
||||
// Invalidate the cached escape sequences since they may no longer be valid.
|
||||
LAYOUT_CACHE_SHARED.lock().unwrap().clear();
|
||||
CURSES_INITIALIZED.store(true, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
/// Initialize the locale subsystem
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::common::{escape, get_by_sorted_name, str2wcstring, Named};
|
||||
use crate::curses;
|
||||
use crate::env::{Environment, CURSES_INITIALIZED};
|
||||
use crate::env::Environment;
|
||||
use crate::event;
|
||||
use crate::flog::FLOG;
|
||||
// Polyfill for Option::is_none_or(), stabilized in 1.82.0
|
||||
@@ -1022,7 +1022,6 @@ pub fn get<'a>(
|
||||
|
||||
/// Create a list of terminfo mappings.
|
||||
fn create_input_terminfo() -> Box<[TerminfoMapping]> {
|
||||
assert!(CURSES_INITIALIZED.load(Ordering::Relaxed));
|
||||
let Some(term) = curses::term() else {
|
||||
// setupterm() failed so we can't reference any key definitions.
|
||||
return Box::new([]);
|
||||
|
||||
Reference in New Issue
Block a user