forked from drewgreenwell/ps-menu
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Currently, as mentioned in the README file, we have to manually save and restore the cursor position. This can be streamlined by incorporating that logic directly into the Show-Menu function. Below is an example of how the code can be changed:
# Before
If ($Callback) {
& $Callback
Start-Sleep -Milliseconds 10
}# After
If ($Callback) {
$lastTop = [Console]::CursorTop
& $Callback
[System.Console]::SetCursorPosition(0, $lastTop)
Start-Sleep -Milliseconds 10
}Metadata
Metadata
Assignees
Labels
No labels