mirror of https://github.com/lapce/lapce.git
Don't panic if terminal does not exist
This commit is contained in:
parent
1336fa00b4
commit
dcd2a6bec6
|
@ -342,10 +342,10 @@ fn handle_notification(&self, rpc: ProxyNotification) {
|
|||
}
|
||||
TerminalWrite { term_id, content } => {
|
||||
let terminals = self.terminals.lock();
|
||||
let tx = terminals.get(&term_id).unwrap();
|
||||
|
||||
#[allow(deprecated)]
|
||||
let _ = tx.send(Msg::Input(content.into_bytes().into()));
|
||||
if let Some(tx) = terminals.get(&term_id) {
|
||||
#[allow(deprecated)]
|
||||
let _ = tx.send(Msg::Input(content.into_bytes().into()));
|
||||
}
|
||||
}
|
||||
TerminalResize {
|
||||
term_id,
|
||||
|
@ -445,7 +445,7 @@ fn handle_request(&self, id: RequestId, rpc: ProxyRequest) {
|
|||
let buffer = buffers.get(&buffer_id).unwrap();
|
||||
self.lsp.lock().get_hover(id, request_id, buffer, position);
|
||||
}
|
||||
GetSignature {
|
||||
GetSignature {
|
||||
buffer_id,
|
||||
position,
|
||||
} => {
|
||||
|
|
Loading…
Reference in New Issue