aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/commands.rs')
-rw-r--r--helix-view/src/commands.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/helix-view/src/commands.rs b/helix-view/src/commands.rs
index 26c7a190..c135a3da 100644
--- a/helix-view/src/commands.rs
+++ b/helix-view/src/commands.rs
@@ -331,8 +331,7 @@ pub fn append_mode(cx: &mut Context) {
}
// TODO: I, A, o and O can share a lot of the primitives.
-
-pub fn command_mode(_view: &mut View, _count: usize) {
+pub fn command_mode(_cx: &mut Context) {
unimplemented!()
}
@@ -670,3 +669,12 @@ pub fn indent_selection(_cx: &mut Context) {
// loop over each line and recompute proper indentation
unimplemented!()
}
+
+//
+
+pub fn save(cx: &mut Context) {
+ // Spawns an async task to actually do the saving. This way we prevent blocking.
+
+ // TODO: handle save errors somehow?
+ cx.executor.spawn(cx.view.doc.save()).detach();
+}