aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-02 01:21:28 +0000
committerBlaž Hrastnik2021-12-02 01:22:17 +0000
commit54f8e5c9c3c3295b7756adde504f403d36965734 (patch)
tree875ed4a5b303125104f706039b169b83df8cb537 /helix-term/src/commands.rs
parent573cb399261f9ab8f799dcf82a40220dcc6539e4 (diff)
dap: Fix an off-by-one and move the function over to commands/dap
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 6a611edb..9a978c4c 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1897,7 +1897,6 @@ mod cmd {
use super::*;
use helix_view::editor::Action;
- use helix_view::editor::Breakpoint;
use ui::completers::{self, Completer};
#[derive(Clone)]
@@ -2562,22 +2561,6 @@ mod cmd {
Ok(())
}
- pub fn get_breakpoint_at_current_line(editor: &mut Editor) -> Option<(usize, Breakpoint)> {
- let (view, doc) = current!(editor);
- let text = doc.text().slice(..);
-
- let pos = doc.selection(view.id).primary().cursor(text);
- let line = text.char_to_line(pos) + 1; // 1-indexing in DAP, 0-indexing in Helix
- let path = match doc.path() {
- Some(path) => path,
- None => return None,
- };
- editor.breakpoints.get(path).and_then(|breakpoints| {
- let i = breakpoints.iter().position(|b| b.line == line);
- i.map(|i| (i, breakpoints[i].clone()))
- })
- }
-
fn debug_start(
cx: &mut compositor::Context,
args: &[&str],