From: Karel Zak Date: Tue, 28 Apr 2026 13:04:09 +0000 (+0200) Subject: cfdisk: remove unnecessary cursor repositioning on exit X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=8ea495145a9e20f60cbb12a75f502371b366c50a;p=thirdparty%2Futil-linux.git cfdisk: remove unnecessary cursor repositioning on exit Remove the mvcur() call that moved the cursor to the bottom of the terminal before endwin(). This pattern was inherited from the original cfdisk (util-linux 2.2, 1996) and is unnecessary on modern terminals where endwin() properly restores the terminal state. The old behavior created extra blank lines between the previous shell prompt and the new one after exiting cfdisk. Addresses: https://github.com/util-linux/util-linux/discussions/4259 Signed-off-by: Karel Zak --- diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index 13cbadf1b..023f28161 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -652,16 +652,9 @@ static int ui_end(void) if (!ui_enabled) return -EINVAL; -#if defined(HAVE_SLCURSES_H) || defined(HAVE_SLANG_SLCURSES_H) - SLsmg_gotorc(ui_lines - 1, 0); - SLsmg_refresh(); -#else - mvcur(0, ui_cols - 1, ui_lines-1, 0); -#endif curs_set(1); nl(); endwin(); - printf("\n"); ui_enabled = 0; return 0; }