aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 8d5b91ec91..ae64046d07 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -266,6 +266,12 @@ int main(int argc, char **argv)
fname = get_fname(&params, cwd);
}
+ // Recovery mode without a file name: List swap files.
+ // In this case, no UI is needed.
+ if (recoverymode && fname == NULL) {
+ headless_mode = true;
+ }
+
TIME_MSG("expanding arguments");
if (params.diff_mode && params.window_count == -1)
@@ -954,7 +960,6 @@ static void command_line_scan(mparm_T *parmp)
case 'r': // "-r" recovery mode
case 'L': { // "-L" recovery mode
recoverymode = 1;
- headless_mode = true;
break;
}
case 's': {