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 };
char *prompt;
bool dereference = FALSE;
char *strNoConfirm;
if (!strncmp(cmd->tx_argv[cmd->tx_argc - 1], "-deref", 6))
{
@ -976,19 +975,13 @@ 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))
{
prompt = TxPrintString("Really throw away all changes made"
" to cell %s? ", def->cd_name);
action = TxDialog(prompt, actionNames, 0);
if (action == 0) /* No */
return;
}
if (def->cd_flags & (CDMODIFIED|CDSTAMPSCHANGED|CDBOXESCHANGED))
{
prompt = TxPrintString("Really throw away all changes made"
" to cell %s? ", def->cd_name);
action = TxDialog(prompt, actionNames, 0);
if (action == 0) /* No */
return;
}
cmdFlushCell(def, dereference);