mirror of
https://github.com/neovim/neovim.git
synced 2025-10-20 16:51:48 +00:00
fix(excmd): don't allow range or args for :detach/:restart (#34280)
Also remove the CMDWIN and LOCK_OK flags, so that there is no need to check for text_locked() and curbuf_locked().
This commit is contained in:
@@ -69,8 +69,6 @@
|
||||
#include "nvim/message.h"
|
||||
#include "nvim/mouse.h"
|
||||
#include "nvim/move.h"
|
||||
#include "nvim/msgpack_rpc/channel.h"
|
||||
#include "nvim/msgpack_rpc/server.h"
|
||||
#include "nvim/normal.h"
|
||||
#include "nvim/normal_defs.h"
|
||||
#include "nvim/ops.h"
|
||||
@@ -5600,17 +5598,6 @@ static void ex_restart(exarg_T *eap)
|
||||
{
|
||||
bool forceit = eap && eap->forceit;
|
||||
|
||||
// Refuse to restart if text is locked (i.e in command line etc.)
|
||||
if (text_locked()) {
|
||||
text_locked_msg();
|
||||
return;
|
||||
}
|
||||
|
||||
// Refuse to restart if buffer is locked.
|
||||
if (curbuf_locked()) {
|
||||
return;
|
||||
}
|
||||
|
||||
win_T *wp = curwin;
|
||||
|
||||
// If any buffer is changed and not saved, we cannot restart.
|
||||
|
Reference in New Issue
Block a user