Skip to content

Module Completion Menu Redrawing

Problem

  • After the module completion menu exits, it redraws the content in its area

  • Some special colors and characters may display abnormally due to redrawing

    Module Completion Menu Redrawing Issue

Cause

  • Some special colors and characters are not standard PowerShell supported
    • For example, some colors and shape characters used in Oh-My-Posh or Starship
  • When getting the buffer through PowerShell methods, differences appear
  • Redrawing based on these different buffers causes problems

Related issues:

Solutions

Set Height Offset

  • It can make the module completion menu avoid the terminal theme area:

    powershell
    psc menu config height_from_menu_bottom_to_cursor_when_above 1

    Set Height Offset

Force Menu Below

  • If you want the module completion menu to always display below, use:

    powershell
    psc menu config enable_menu_show_below 1
  • When the height below is not enough for the module completion menu to display below, it will scroll the buffer upward and display at the top

    Force Menu Below

Released under the MIT.