mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
Size unified mention popups to visible results (#34771)
## What changed - Size the unified mention popup from its filtered row count, while keeping a one-row minimum and the existing maximum. - Update composer snapshots to cover the compact layout when only one mention result is visible. GitOrigin-RevId: 7cd30a5c53c7e81cf7158a6b3dda3c09bd024f29
This commit is contained in:
@@ -76,7 +76,8 @@ impl Popup {
|
||||
}
|
||||
|
||||
pub(crate) fn calculate_required_height(&self, _width: u16) -> u16 {
|
||||
(MAX_POPUP_ROWS as u16).saturating_add(2)
|
||||
let visible = self.rows().len().clamp(1, MAX_POPUP_ROWS);
|
||||
(visible as u16).saturating_add(2)
|
||||
}
|
||||
|
||||
fn clamp_selection(&mut self) {
|
||||
|
||||
@@ -5,9 +5,9 @@ expression: terminal.backend()
|
||||
" "
|
||||
"› @sa "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
"> Sample Plugin Plugin with skills and an MCP server Plugin"
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" enter insert · esc close · ←/→ switch search modes [All Results] Filesystem Only Plugins "
|
||||
|
||||
@@ -5,9 +5,9 @@ expression: terminal.backend()
|
||||
" "
|
||||
"› @left @bound "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
"> left Plugin used to test bound mention fallback. Plugin"
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" enter insert · esc close · ←/→ switch search modes [All Results] Filesystem Only Plugins "
|
||||
|
||||
Reference in New Issue
Block a user