fix(tui): wider max width
This commit is contained in:
@@ -457,12 +457,12 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
case tea.WindowSizeMsg:
|
||||
msg.Height -= 2 // Make space for the status bar
|
||||
a.width, a.height = msg.Width, msg.Height
|
||||
container := min(a.width, 84)
|
||||
container := min(a.width, 104)
|
||||
if a.fileViewer.HasFile() {
|
||||
if a.width < fileViewerFullWidthCutoff {
|
||||
container = a.width
|
||||
} else {
|
||||
container = min(min(a.width, max(a.width/2, 50)), 84)
|
||||
container = min(min(a.width, max(a.width/2, 50)), 104)
|
||||
}
|
||||
}
|
||||
layout.Current = &layout.LayoutInfo{
|
||||
@@ -915,9 +915,8 @@ func (a appModel) executeCommand(command commands.Command) (tea.Model, tea.Cmd)
|
||||
a.modal = themeDialog
|
||||
case commands.FileListCommand:
|
||||
a.editor.Blur()
|
||||
provider := completions.NewFileContextGroup(a.app)
|
||||
findDialog := dialog.NewFindDialog(provider)
|
||||
findDialog.SetWidth(layout.Current.Container.Width - 8)
|
||||
findDialog := dialog.NewFindDialog(a.fileProvider)
|
||||
cmds = append(cmds, findDialog.Init())
|
||||
a.modal = findDialog
|
||||
case commands.FileCloseCommand:
|
||||
a.fileViewer, cmd = a.fileViewer.Clear()
|
||||
|
||||
Reference in New Issue
Block a user