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 <kzak@redhat.com>
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;
}