aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGoldstein <root@goldstein.rs>2024-07-15 23:28:55 +0300
committerMax Siling <root@goldstein.rs>2024-07-30 16:08:26 +0000
commit1a6d7a3af466dad946e6fc0e969927a8f246c13a (patch)
treee44d9559f2545ea233336ce6fe9f2bf91589aead /doc
parent548c973e8282bbec5b14f3860218b23564dc0381 (diff)
src/libcmd/repl.cc: avoid unneeded reload after :e
If `:edit`ing a store path, don't reload repl afterwards to avoid losing local variables: store is immutable, so "editing" a store path is always just viewing it. Resolves: https://git.lix.systems/lix-project/lix/issues/341 Change-Id: I3747f75ce26e0595e953069c39ddc3ee80699718
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/change-authors.yml5
-rw-r--r--doc/manual/rl-next/repl-edit-store.md11
2 files changed, 16 insertions, 0 deletions
diff --git a/doc/manual/change-authors.yml b/doc/manual/change-authors.yml
index f56a1e6fb..775149180 100644
--- a/doc/manual/change-authors.yml
+++ b/doc/manual/change-authors.yml
@@ -57,6 +57,11 @@ ericson:
display_name: John Ericson
github: ericson2314
+goldstein:
+ display_name: goldstein
+ forgejo: goldstein
+ github: GoldsteinE
+
horrors:
display_name: eldritch horrors
forgejo: pennae
diff --git a/doc/manual/rl-next/repl-edit-store.md b/doc/manual/rl-next/repl-edit-store.md
new file mode 100644
index 000000000..e93bde07d
--- /dev/null
+++ b/doc/manual/rl-next/repl-edit-store.md
@@ -0,0 +1,11 @@
+---
+synopsis: "`:edit`ing a file in Nix store no longer reloads the repl"
+issues: [fj#341]
+cls: [1620]
+category: Improvements
+credits: [goldstein]
+---
+
+Calling `:edit` from the repl now only reloads if the file being edited was outside of Nix store.
+That means that all the local variables are now preserved across `:edit`s of store paths.
+This is always safe because the store is read-only.