diff options
author | erw7 <erw7.github@gmail.com> | 2020-06-23 06:04:34 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 23:04:34 +0200 |
commit | 1619410a059fd008b3f248ea81aca30036a0fb90 (patch) | |
tree | 8c3bd738da3e7c79d5d9d5d8d030ce302cdd4e2f /src | |
parent | 8f30753aa1398eadecf1bd9f6dc71251218b9b2d (diff) | |
download | rneovim-1619410a059fd008b3f248ea81aca30036a0fb90.tar.gz rneovim-1619410a059fd008b3f248ea81aca30036a0fb90.tar.bz2 rneovim-1619410a059fd008b3f248ea81aca30036a0fb90.zip |
main.c: fix hang issue with recoverymode (#12496)
In the case of recoverymode, the headlessmode was true, causing the UI
to hang without starting. Fix this problem by setting headlessmode to
true for List swap files only.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/main.c | 7 |
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(¶ms, 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': { |