diff --git a/STEEL.md b/STEEL.md index 480ead18f..0b124743d 100644 --- a/STEEL.md +++ b/STEEL.md @@ -57,7 +57,7 @@ to be used as typed commands. For example: (require-builtin helix/core/static as helix.static.) (require-builtin helix/core/keybindings as helix.keybindings.) -(provide shell git-add) +(provide shell git-add open-helix-scm open-init-scm reload-helix-scm) ;;@doc ;; Specialized shell implementation, where % is a wildcard for the current file @@ -85,6 +85,24 @@ to be used as typed commands. For example: (if document (Document-path document) #f))) + +;;@doc +;; Reload the helix.scm file +(define (reload-helix-scm cx) + (helix.static.run-in-engine! cx + (string-append "(require \"" (helix.static.get-helix-scm-path) "\")"))) + +;;@doc +;; Open the helix.scm file +(define (open-helix-scm cx) + (helix.open cx (list (helix.static.get-helix-scm-path)) helix.PromptEvent::Validate)) + +;;@doc +;; Opens the init.scm file +(define (open-init-scm cx) + (helix.open cx (list (helix.static.get-init-scm-path)) helix.PromptEvent::Validate)) + + ``` diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index da47171c4..703fabd52 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -675,7 +675,13 @@ pub fn write_all_impl( if !doc.is_modified() { return None; } - if doc.path().is_none() { + + // This is a named buffer. We'll skip it in the saves for now + if doc.name.is_some() { + return None; + } + + if doc.path().is_none() && doc.name.is_none() { if write_scratch { errors.push("cannot write a buffer without a filename\n"); }