cmenu: reset the cursor position on shutdown
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Sun, 1 Nov 2009 03:09:11 +0000 (20:09 -0700)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Sun, 1 Nov 2009 03:09:11 +0000 (20:09 -0700)
Reset the cursor at the top left corner of the screen when exiting the
menu. This fixes odd behaviors when switching back and forth between CLI
and menu in HDT.

Closes: #14

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
com32/cmenu/libmenu/menu.c

index 3a761aa..de4a1ee 100644 (file)
@@ -657,6 +657,7 @@ pt_menuitem showmenus(uchar startmenu)
     // Hide the garbage we left on the screen
     cursoron();
     cls();
+    gotoxy(ms->minrow, ms->mincol);
 
     // Return user choice
     return rv;