From a35242b420305ff86c78f2051e071a185042e341 Mon Sep 17 00:00:00 2001 From: PoliEcho Date: Mon, 14 Apr 2025 09:22:39 +0200 Subject: [PATCH] fix attachment window not disapearing --- src/komens.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/komens.cpp b/src/komens.cpp index 737a523..f9fc0a9 100644 --- a/src/komens.cpp +++ b/src/komens.cpp @@ -273,7 +273,7 @@ void insert_content(WINDOW *content_win, WINDOW *attachment_win, mvwprintw(attachment_win, j + 1, 0, "%zu>", j + 1); wattroff(attachment_win, COLOR_PAIR(COLOR_MAGENTA)); } - { // remove duplicating spaces + { // remove duplicating edges unsigned short attachment_win_top, attachment_win_left, attachment_win_height, attachment_win_width; getbegyx(attachment_win, attachment_win_top, attachment_win_left); @@ -284,6 +284,10 @@ void insert_content(WINDOW *content_win, WINDOW *attachment_win, } refresh(); + wrefresh(attachment_win); + } else { + // remove attachment window if there are no attachments + wclear(attachment_win); wrefresh(attachment_win); } }