feat: ":restart +cmd" #34788

Problem:
":restart" always executes ":qall" to exit the server.

Solution:
Support ":restart +cmd" so the user can control the command
used to exit the server.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
Sathya Pramodh
2025-07-24 08:15:31 +05:30
committed by GitHub
parent 0dcdd65dcc
commit 54b8c99e51
6 changed files with 77 additions and 35 deletions

View File

@@ -423,6 +423,8 @@ EXTERN int sc_col; // column for shown command
EXTERN int starting INIT( = NO_SCREEN);
// true when planning to exit. Might keep running if there is a changed buffer.
EXTERN bool exiting INIT( = false);
// true when planning to restart.
EXTERN bool restarting INIT( = false);
// internal value of v:dying
EXTERN int v_dying INIT( = 0);
// is stdin a terminal?