Revert "commands/CmdFI.c: added CmdFlush_NoConfirm option to disable flush prompt"

This reverts commit 772bfe2f71.

See #341
This commit is contained in:
Darryl L. Miles 2025-01-03 09:07:29 +00:00 committed by Tim Edwards
parent 3fc1c7e452
commit cfdd50aa63
1 changed files with 7 additions and 14 deletions

View File

@ -945,7 +945,6 @@ CmdFlush(
static const char * const actionNames[] = { "no", "yes", 0 }; static const char * const actionNames[] = { "no", "yes", 0 };
char *prompt; char *prompt;
bool dereference = FALSE; bool dereference = FALSE;
char *strNoConfirm;
if (!strncmp(cmd->tx_argv[cmd->tx_argc - 1], "-deref", 6)) if (!strncmp(cmd->tx_argv[cmd->tx_argc - 1], "-deref", 6))
{ {
@ -976,11 +975,6 @@ CmdFlush(
} }
} }
strNoConfirm = (char *)Tcl_GetVar(magicinterp, "CmdFlush_NoConfirm", TCL_GLOBAL_ONLY);
if(strNoConfirm){
TxPrintf("CmdFlush_NoConfirm set, skipping prompt.\n");
}else{
if (def->cd_flags & (CDMODIFIED|CDSTAMPSCHANGED|CDBOXESCHANGED)) if (def->cd_flags & (CDMODIFIED|CDSTAMPSCHANGED|CDBOXESCHANGED))
{ {
prompt = TxPrintString("Really throw away all changes made" prompt = TxPrintString("Really throw away all changes made"
@ -989,7 +983,6 @@ CmdFlush(
if (action == 0) /* No */ if (action == 0) /* No */
return; return;
} }
}
cmdFlushCell(def, dereference); cmdFlushCell(def, dereference);
SelectClear(); SelectClear();