1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 13:52:55 +03:00

windows: fix divined current working directory

The issue was that we were generating an invalid file URI; fix
that up!

refs: #2036
This commit is contained in:
Wez Furlong 2022-05-26 05:56:57 -07:00
parent b2cd800c70
commit 17d1170b2a
2 changed files with 5 additions and 1 deletions

View File

@ -69,6 +69,7 @@ As features stabilize some brief notes about them will accumulate here.
* `DecreaseFontSize` wasn't quite the inverse of `IncreaseFontSize`. Thanks to [@Funami580](https://github.com/Funami580)! [#1997](https://github.com/wez/wezterm/pull/1997)
* Wayland: unable to paste text that was copied before starting the initial wezterm window. Thanks to [@Funami580](https://github.com/Funami580)! [#1994](https://github.com/wez/wezterm/pull/1994) [#1385](https://github.com/wez/wezterm/issues/1385)
* Unicode NFD text could incorrectly render with repeated glyphs [#2032](https://github.com/wez/wezterm/issues/2032)
* Windows: spawning new panes/tabs wouldn't automatically use the working directory of the current pane when OSC 7 was not being used [#2036](https://github.com/wez/wezterm/issues/2036)
### 20220408-101518-b908e2dd

View File

@ -818,7 +818,10 @@ impl LocalPane {
#[cfg(windows)]
if let Some(fg) = self.divine_foreground_process() {
return Url::parse(&format!("file://localhost{}", fg.cwd.display())).ok();
// Since windows paths typically start with something like C:\,
// we cannot simply stick `localhost` on the front; we have to
// omit the hostname otherwise the url parser is unhappy.
return Url::parse(&format!("file://{}", fg.cwd.display())).ok();
}
#[allow(unreachable_code)]