Skip to content

Commit

Permalink
fixed "Press ENTER or type command to continue" to be suppressed
Browse files Browse the repository at this point in the history
If in headless mode, we need to exit at this point. If we continue, we will enter the normal mode and the message "Press ENTER or type command to continue" will be displayed and we will be in the input waiting state.
  • Loading branch information
Code-Hex committed Apr 30, 2020
1 parent acf5e3e commit a02dc40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/nvim/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,14 @@ int main(int argc, char **argv)
// Execute any "+", "-c" and "-S" arguments.
if (params.n_commands > 0) {
exe_commands(&params);
// If in headless mode, we need to exit at this point.
// If we continue, we will enter the normal mode and the
// message "Press ENTER or type command to continue" will be
// displayed and we will be in the input waiting state.
if (headless_mode) {
msg_putchar('\n');
return 0;
}
}

starting = 0;
Expand Down

0 comments on commit a02dc40

Please sign in to comment.