diff options
author | Michael Davis | 2023-03-08 01:51:52 +0000 |
---|---|---|
committer | GitHub | 2023-03-08 01:51:52 +0000 |
commit | 0c6d25acae86cf87356fd3b3b59a25904226e41b (patch) | |
tree | 8d7a9b4307b1c5dd516a6aadb63dafb90b9fb82b /helix-tui/src/backend/crossterm.rs | |
parent | 6dc017b9e23be4f9331bfac8d10f39cdfa54e7bd (diff) |
DynamicPicker: Recalculate column widths for new options (#6004)
This fixes blank row text in a DynamicPicker which is initially given
no options. This can happen for language servers which respond to
the workspace symbol request for an empty query with an empty list
of symbols, and that behavior is somewhat common since returning all
symbols as the spec suggests is very expensive.
For empty options, `Picker::new` calculated the widths of each column
as 0. We can recalculate the column widths when the new options are
set to fix this. This refactor is also a good opportunity to formalize
setting new options on a picker: besides setting the new options and
calculating column widths we also want to reset the cursor and rescore
the options.
Diffstat (limited to 'helix-tui/src/backend/crossterm.rs')
0 files changed, 0 insertions, 0 deletions