aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:15:05 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:27:38 +0000
commitc5d770d311841ea5230426cc4c868e8db27300a8 (patch)
treedd21f70127b4b8b5f109baefc8ecc5016f507c91 /src/nvim/main.c
parent9be89f131f87608f224f0ee06d199fcd09d32176 (diff)
parent081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff)
downloadrneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.gz
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.bz2
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index dc102f6f6d..695bd4c95a 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -678,12 +678,14 @@ void os_exit(int r)
} else {
ui_flush();
ui_call_stop();
- ml_close_all(true); // remove all memfiles
}
if (!event_teardown() && r == 0) {
r = 1; // Exit with error if main_loop did not teardown gracefully.
}
+ if (!ui_client_channel_id) {
+ ml_close_all(true); // remove all memfiles
+ }
if (used_stdin) {
stream_set_blocking(STDIN_FILENO, true); // normalize stream (#2598)
}
@@ -775,7 +777,11 @@ void getout(int exitval)
}
}
- if (p_shada && *p_shada != NUL) {
+ if (
+#ifdef EXITFREE
+ !entered_free_all_mem &&
+#endif
+ p_shada && *p_shada != NUL) {
// Write out the registers, history, marks etc, to the ShaDa file
shada_write_file(NULL, false);
}
@@ -1448,7 +1454,7 @@ scripterror:
p = r;
}
-#ifdef USE_FNAME_CASE
+#ifdef CASE_INSENSITIVE_FILENAME
// Make the case of the file name match the actual file.
path_fix_case(p);
#endif