send user HOME dir from proxy to editor (#2056)

* send user HOME dir from proxy to editor

* update changelog
This commit is contained in:
Jovan Gerodetti 2023-01-24 20:23:17 +01:00 committed by GitHub
parent 5b2d412fc8
commit 0e18acbde5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -29,6 +29,7 @@
- [#1939](https://github.com/lapce/lapce/pull/1939): Fix saving/editing newly saved-as files
- [#1971](https://github.com/lapce/lapce/pull/1971): Fix up/down movement on first/last line
- [#2036](https://github.com/lapce/lapce/pull/2036): Fix movement on selections with up/down arrow keys
- [#2056](https://github.com/lapce/lapce/pull/2056): Fix default directory of remote session file picker
## 0.2.5

View File

@ -95,6 +95,13 @@ fn handle_notification(&mut self, rpc: ProxyNotification) {
plugin_rpc.mainloop(&mut plugin);
});
self.core_rpc.proxy_connected();
// send home directory for initinal filepicker dir
let dirs = directories::UserDirs::new();
if let Some(dirs) = dirs {
self.core_rpc.home_dir(dirs.home_dir().into());
}
}
OpenPaths { folders, files } => {
self.core_rpc.notification(CoreNotification::OpenPaths {

View File

@ -300,6 +300,10 @@ pub fn close_terminal(&self, term_id: TermId) {
pub fn update_terminal(&self, term_id: TermId, content: Vec<u8>) {
self.notification(CoreNotification::UpdateTerminal { term_id, content });
}
pub fn home_dir(&self, path: PathBuf) {
self.notification(CoreNotification::HomeDir { path });
}
}
impl Default for CoreRpcHandler {