Skip to main content

popup_geometry

Function popup_geometry 

Source
pub fn popup_geometry(client_width: usize) -> (u16, u16)
Expand description

How much of the client a popup takes: near-full on a small screen (a phone over ssh), 80% on a roomy terminal.

One rule, two callers. The binding below opens the popup with it at key-press time, and the picker reopens itself with it when the terminal has grown since (see tui::outgrown), because tmux never grows a popup past the size it was asked for. Two copies of this would drift into a picker that resizes itself to a geometry the binding would never have chosen.