aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-24 08:32:44 +0000
committerDmitry Sharshakov2021-08-24 08:32:44 +0000
commit34c6094604cfeca0c1338a20cf9e85bcd8d9b68b (patch)
tree14fdfd3df3619fde77619cde828670f973497ace /helix-term/src/application.rs
parent2158366b24da8229e743546ccedc5cd05292e254 (diff)
refactor
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 72f3a125..3f911195 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -13,7 +13,6 @@ use crate::{
};
use log::error;
-use smallvec::smallvec;
use std::{
io::{stdout, Write},
sync::Arc,
@@ -305,20 +304,17 @@ impl Application {
if let Some(helix_dap::StackFrame {
source:
Some(helix_dap::Source {
- path: Some(src), ..
+ path: Some(ref src),
+ ..
}),
line,
column,
end_line,
end_column,
..
- }) = &debugger.stack_pointer
+ }) = debugger.stack_pointer
{
let path = src.clone();
- let line = *line;
- let column = *column;
- let end_line = *end_line;
- let end_column = *end_column;
self.editor
.open(path, helix_view::editor::Action::Replace)
.unwrap();
@@ -333,7 +329,10 @@ impl Application {
doc.set_selection(
view.id,
Selection::new(
- smallvec![Range::new(start.min(text_end), end.min(text_end))],
+ helix_core::SmallVec::from_vec(vec![Range::new(
+ start.min(text_end),
+ end.min(text_end),
+ )]),
0,
),
);