some cleanup

This commit is contained in:
Dongdong Zhou 2021-12-30 22:01:48 +00:00
parent 717c097337
commit 9f43428515
2 changed files with 3 additions and 5 deletions

View File

@ -1,6 +1,5 @@
use std::collections::HashMap;
use std::io::BufReader;
use std::os::unix::prelude::CommandExt;
use std::process::Command;
use std::process::Stdio;
use std::thread;
@ -12,7 +11,6 @@
use crossbeam_utils::sync::WaitGroup;
use druid::{ExtEventSink, WidgetId};
use druid::{Target, WindowId};
use lapce_proxy::dispatch::VERSION;
use lapce_proxy::dispatch::{FileNodeItem, NewBufferResponse};
use lapce_proxy::plugin::PluginDescription;
use lapce_proxy::terminal::TermId;
@ -37,6 +35,8 @@
use crate::terminal::RawTerminal;
use crate::{buffer::BufferId, command::LAPCE_UI_COMMAND};
const VERSION: &str = env!("CARGO_PKG_VERSION");
pub enum TermEvent {
NewTerminal(Arc<Mutex<RawTerminal>>),
UpdateContent(String),
@ -119,7 +119,7 @@ pub fn start(&self, workspace: LapceWorkspace, event_sink: ExtEventSink) {
.arg("ControlPath=~/.ssh/cm-%r@%h:%p")
.arg("-o")
.arg("ControlPersist=30m")
.arg("/tmp/proxy/target/release/lapce-proxy")
.arg(format!("~/.lapce/lapce-proxy-{}", VERSION))
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn()

View File

@ -25,8 +25,6 @@
use xi_core_lib::watcher::{EventQueue, FileWatcher, Notify, WatchToken};
use xi_rope::{RopeDelta, RopeInfo};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const OPEN_FILE_EVENT_TOKEN: WatchToken = WatchToken(1);
pub const GIT_EVENT_TOKEN: WatchToken = WatchToken(2);