mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-19 13:37:06 +04:00
dap: use smallvec! macro
This commit is contained in:
parent
81f51c13fa
commit
4d24a43651
@ -195,7 +195,7 @@ fn language_tomls() {
|
|||||||
pub use graphemes::RopeGraphemes;
|
pub use graphemes::RopeGraphemes;
|
||||||
pub use position::{coords_at_pos, pos_at_coords, Position};
|
pub use position::{coords_at_pos, pos_at_coords, Position};
|
||||||
pub use selection::{Range, Selection};
|
pub use selection::{Range, Selection};
|
||||||
pub use smallvec::SmallVec;
|
pub use smallvec::{smallvec, SmallVec};
|
||||||
pub use syntax::Syntax;
|
pub use syntax::Syntax;
|
||||||
|
|
||||||
pub use diagnostic::Diagnostic;
|
pub use diagnostic::Diagnostic;
|
||||||
|
@ -327,7 +327,7 @@ pub async fn handle_debugger_message(&mut self, payload: helix_dap::Payload) {
|
|||||||
let path = path.clone();
|
let path = path.clone();
|
||||||
self.editor
|
self.editor
|
||||||
.open(path, helix_view::editor::Action::Replace)
|
.open(path, helix_view::editor::Action::Replace)
|
||||||
.unwrap();
|
.unwrap(); // TODO: there should be no unwrapping!
|
||||||
|
|
||||||
let (view, doc) = current!(self.editor);
|
let (view, doc) = current!(self.editor);
|
||||||
|
|
||||||
@ -351,10 +351,10 @@ fn dap_pos_to_pos(
|
|||||||
.unwrap_or(0);
|
.unwrap_or(0);
|
||||||
|
|
||||||
Selection::new(
|
Selection::new(
|
||||||
helix_core::SmallVec::from_vec(vec![Range::new(
|
helix_core::smallvec![Range::new(
|
||||||
start.min(text_end),
|
start.min(text_end),
|
||||||
end.min(text_end),
|
end.min(text_end),
|
||||||
)]),
|
)],
|
||||||
0,
|
0,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user