aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
authorA-Walrus2022-11-21 01:58:35 +0000
committerGitHub2022-11-21 01:58:35 +0000
commit2f9ca3840a478fc58f411b6a4bc67019829ff72f (patch)
treee26e340d317442b4d9e8ae8216ad40dc297a77ca /helix-term/src/commands
parent420e33a60064ad86e9f2f8dd29b3938318355673 (diff)
Add preview for scratch buffers in buffer picker (#3454)
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/dap.rs4
-rw-r--r--helix-term/src/commands/lsp.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs
index c27417e3..b182f28c 100644
--- a/helix-term/src/commands/dap.rs
+++ b/helix-term/src/commands/dap.rs
@@ -85,7 +85,7 @@ fn thread_picker(
frame.line.saturating_sub(1),
frame.end_line.unwrap_or(frame.line).saturating_sub(1),
));
- Some((path, pos))
+ Some((path.into(), pos))
},
);
compositor.push(Box::new(picker));
@@ -706,7 +706,7 @@ pub fn dap_switch_stack_frame(cx: &mut Context) {
.and_then(|source| source.path.clone())
.map(|path| {
(
- path,
+ path.into(),
Some((
frame.line.saturating_sub(1),
frame.end_line.unwrap_or(frame.line).saturating_sub(1),
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 33d33440..dcabfab1 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -156,7 +156,7 @@ fn location_to_file_location(location: &lsp::Location) -> FileLocation {
location.range.start.line as usize,
location.range.end.line as usize,
));
- (path, line)
+ (path.into(), line)
}
// TODO: share with symbol picker(symbol.location)