summaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-09-11 02:09:12 +0000
committerBlaž Hrastnik2022-09-11 02:11:07 +0000
commitc2e41082e4b2e0e1dba6a980a7f09ccaad88cbd0 (patch)
treeecf53d11e0f83f8a5d50585a6877f4d3fc4ebef5 /helix-term/src/commands
parenta15420ed1c3b46df0dade6ec6d05a0e4b26e06e0 (diff)
Remove the .txt suffix from tutor
The tutor file is loaded as .txt which can potentially spawn a language server. Then the path is unset, but the LS remains active. This can cause panics since updates are now submitted for a doc with no path. As a quick workaround we remove the extension which should avoid detection. Fixes #3730
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/typed.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 674ce7a6..c22f8712 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -1147,7 +1147,7 @@ fn tutor(
return Ok(());
}
- let path = helix_loader::runtime_dir().join("tutor.txt");
+ let path = helix_loader::runtime_dir().join("tutor");
cx.editor.open(&path, Action::Replace)?;
// Unset path to prevent accidentally saving to the original tutor file.
doc_mut!(cx.editor).set_path(None)?;