mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
refactor: remove dep on key mod from common
Removing this dependency allows extracting the `fish_reserved_codepoint` function, and other code depending on it in subsequent commits. Part of #12625
This commit is contained in:
committed by
Johannes Altmanninger
parent
faf331fdad
commit
3d364478ee
@@ -6,7 +6,6 @@
|
||||
};
|
||||
use crate::global_safety::AtomicRef;
|
||||
use crate::global_safety::RelaxedAtomicBool;
|
||||
use crate::key;
|
||||
use crate::parse_util::escape_string_with_quote;
|
||||
use crate::prelude::*;
|
||||
use crate::terminal::Outputter;
|
||||
@@ -17,7 +16,8 @@
|
||||
use fish_feature_flags::{FeatureFlag, feature_test};
|
||||
use fish_wcstringutil::wcs2bytes;
|
||||
use fish_widestring::{
|
||||
ENCODE_DIRECT_END, decode_byte_from_char, encode_byte_to_char, subslice_position,
|
||||
ENCODE_DIRECT_END, SPECIAL_KEY_ENCODE_BASE, decode_byte_from_char, encode_byte_to_char,
|
||||
subslice_position,
|
||||
};
|
||||
use nix::sys::termios::Termios;
|
||||
use std::env;
|
||||
@@ -1236,7 +1236,7 @@ pub fn is_windows_subsystem_for_linux(v: WSL) -> bool {
|
||||
// TODO: Actually implement the replacement as documented above.
|
||||
pub fn fish_reserved_codepoint(c: char) -> bool {
|
||||
(c >= RESERVED_CHAR_BASE && c < RESERVED_CHAR_END)
|
||||
|| (c >= key::Backspace && c < ENCODE_DIRECT_END)
|
||||
|| (c >= SPECIAL_KEY_ENCODE_BASE && c < ENCODE_DIRECT_END)
|
||||
}
|
||||
|
||||
/// Test if the given char is valid in a variable name.
|
||||
|
||||
Reference in New Issue
Block a user