on master help sign in
Avoid modifying jumplist until jumping to ref (#2670)
d24ca66yzwduck
helix-term/src/commands/lsp.rs+1−2
@@ -485,8 +485,6 @@ fn goto_impl(
485 locations: Vec<lsp::Location>,
485 locations: Vec<lsp::Location>,
486 offset_encoding: OffsetEncoding,
486 offset_encoding: OffsetEncoding,
487) {
487) {
488− push_jump(editor);
489−
490 let cwdir = std::env::current_dir().expect("couldn't determine current directory");
488 let cwdir = std::env::current_dir().expect("couldn't determine current directory");
491
489
492 match locations.as_slice() {
490 match locations.as_slice() {
@@ -520,6 +518,7 @@ fn goto_impl(
520 format!("{}:{}", file, line).into()
518 format!("{}:{}", file, line).into()
521 },
519 },
522 move |cx, location, action| {
520 move |cx, location, action| {
521+ push_jump(cx.editor);
523 jump_to_location(cx.editor, location, offset_encoding, action)
522 jump_to_location(cx.editor, location, offset_encoding, action)
524 },
523 },
525 move |_editor, location| Some(location_to_file_location(location)),
524 move |_editor, location| Some(location_to_file_location(location)),