Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhou121 committed Dec 30, 2021
1 parent 717c097 commit 9f43428
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions core/src/proxy.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -12,7 +11,6 @@ use crossbeam_channel::Sender;
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;
Expand All @@ -37,6 +35,8 @@ use crate::state::LapceWorkspaceType;
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),
Expand Down Expand Up @@ -119,7 +119,7 @@ impl LapceProxy {
.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()
Expand Down
2 changes: 0 additions & 2 deletions proxy/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ use std::{sync::Arc, time::Duration};
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);

Expand Down

0 comments on commit 9f43428

Please sign in to comment.