mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-24 02:13:39 +08:00
22 lines
873 B
Rust
22 lines
873 B
Rust
|
use crate::env::{EnvStack, Environment};
|
||
|
use crate::wchar::prelude::*;
|
||
|
use crate::wchar_ffi::WCharToFFI;
|
||
|
|
||
|
pub fn update_wait_on_escape_ms(vars: &EnvStack) {
|
||
|
let fish_escape_delay_ms = vars.get_unless_empty(L!("fish_escape_delay_ms"));
|
||
|
let is_empty = fish_escape_delay_ms.is_none();
|
||
|
let value = fish_escape_delay_ms
|
||
|
.map(|s| s.as_string().to_ffi())
|
||
|
.unwrap_or(L!("").to_ffi());
|
||
|
crate::ffi::update_wait_on_escape_ms_ffi(is_empty, &value);
|
||
|
}
|
||
|
|
||
|
pub fn update_wait_on_sequence_key_ms(vars: &EnvStack) {
|
||
|
let fish_sequence_key_delay_ms = vars.get_unless_empty(L!("fish_sequence_key_delay_ms"));
|
||
|
let is_empty = fish_sequence_key_delay_ms.is_none();
|
||
|
let value = fish_sequence_key_delay_ms
|
||
|
.map(|s| s.as_string().to_ffi())
|
||
|
.unwrap_or(L!("").to_ffi());
|
||
|
crate::ffi::update_wait_on_sequence_key_ms_ffi(is_empty, &value);
|
||
|
}
|