settings: Skip terminal env vars with substitutions in vscode import (#42464)
Closes https://github.com/zed-industries/zed/issues/40547 Release Notes: - Fixed vscode import creating faulty terminal env vars in terminal settings
This commit is contained in:
@@ -1386,7 +1386,15 @@ impl Terminal {
|
||||
/// (This is a no-op for display-only terminals.)
|
||||
fn write_to_pty(&self, input: impl Into<Cow<'static, [u8]>>) {
|
||||
if let TerminalType::Pty { pty_tx, .. } = &self.terminal_type {
|
||||
pty_tx.notify(input.into());
|
||||
let input = input.into();
|
||||
if log::log_enabled!(log::Level::Debug) {
|
||||
if let Ok(str) = str::from_utf8(&input) {
|
||||
log::debug!("Writing to PTY: {:?}", str);
|
||||
} else {
|
||||
log::debug!("Writing to PTY: {:?}", input);
|
||||
}
|
||||
}
|
||||
pty_tx.notify(input);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user