From fdacad8bbb64dc1d6d189dd232008307b77b3642 Mon Sep 17 00:00:00 2001 From: Sprite_tm Date: Tue, 21 May 2024 21:56:03 +0300 Subject: [PATCH] Ticket #4540: mcedit: macro deletes text. (edit_user_menu): fix misinterpretation of return value of edit_block_delete_cmd(). The bug was introduced in e2e34d82abbc4d674fb965ba087c1a5a6105ea51. Signed-off-by: Andrew Borodin --- src/editor/edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/edit.c b/src/editor/edit.c index 115dbec810..1da706220a 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -1821,14 +1821,14 @@ edit_user_menu (WEdit * edit, const char *menu_file, int selected_entry) if (user_menu_cmd (CONST_WIDGET (edit), menu_file, selected_entry) && (mc_stat (block_file_vpath, &status) == 0) && (status.st_size != 0)) { - gboolean rc = FALSE; + gboolean rc = TRUE; FILE *fd; /* i.e. we have marked block */ if (mark) rc = edit_block_delete_cmd (edit); - if (!rc) + if (rc) { off_t ins_len;