fix(layout_strategies): odd flex layout default behavior #3148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue with the flex layout by changing the default values for
flip_columns
andflip_lines
to match thepreview_cutoff
values for the horizontal and vertical layouts. This should improve the user experience for users who have their default layout set to 'flex'. See the issue description linked below for more information.Fixes #3138
Type of change
How Has This Been Tested?
The change implemented in this PR was tested using the following two tests:
layout_strategy
to'flex'
with no additional configuration. Run:Telescope live_grep
and resize window. Observe that layout changes to vertical whenwidth < 120
givenheight >= 40
.layout_strategy
to'flex'
andlayout_config.horizontal.preview_cutoff
andlayout_config.vertical.preview_cutoff
to custom values. Run:Telescope live_grep
and resize window. Observe that layout changes to vertical when the window size matches thepreview_cutoff
values set.Configuration:
Checklist: