@@ -506,26 +506,26 @@ public void DrawMenu(Menu previousMenu, bool menuSelect)
506
506
}
507
507
}
508
508
509
- // if the menu has moved, we need to clear the lines under it
510
- if ( Top < PreviousTop )
509
+ if ( menuSelect )
511
510
{
512
- // In either of the following two cases, we will need to move the cursor to the next line:
513
- // - if extra rows from previous menu were cleared, then we know the current line was erased
514
- // but the cursor was not moved to the next line.
515
- // - if 'CursorLeft != 0', then the rest of the last menu row was erased, but the cursor
516
- // was not moved to the next line.
517
- if ( extraPreRowsCleared || console . CursorLeft != 0 )
511
+ // if the menu has moved, we need to clear the lines under it
512
+ if ( Top < PreviousTop )
518
513
{
519
- // There are lines from the previous rendering that need to be cleared,
520
- // so we are sure there is no need to scroll.
521
- MoveCursorDown ( 1 ) ;
522
- }
514
+ // In either of the following two cases, we will need to move the cursor to the next line:
515
+ // - if extra rows from previous menu were cleared, then we know the current line was erased
516
+ // but the cursor was not moved to the next line.
517
+ // - if 'CursorLeft != 0', then the rest of the last menu row was erased, but the cursor
518
+ // was not moved to the next line.
519
+ if ( extraPreRowsCleared || console . CursorLeft != 0 )
520
+ {
521
+ // There are lines from the previous rendering that need to be cleared,
522
+ // so we are sure there is no need to scroll.
523
+ MoveCursorDown ( 1 ) ;
524
+ }
523
525
524
- Singleton . WriteBlankLines ( PreviousTop - Top ) ;
525
- }
526
+ Singleton . WriteBlankLines ( PreviousTop - Top ) ;
527
+ }
526
528
527
- if ( menuSelect )
528
- {
529
529
RestoreCursor ( ) ;
530
530
console . CursorVisible = true ;
531
531
}
0 commit comments