mirror of
https://github.com/antonmedv/fx.git
synced 2024-08-18 06:30:33 +03:00
Wrap preview correctly
This commit is contained in:
parent
e52f84cba5
commit
c7a330a914
3
main.go
3
main.go
@ -580,7 +580,8 @@ func (m *model) handleKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
|
||||
case key.Matches(msg, keyMap.Preview):
|
||||
m.showPreview = true
|
||||
m.preview.SetContent(m.cursorValue())
|
||||
content := lipgloss.NewStyle().Width(m.termWidth).Render(m.cursorValue())
|
||||
m.preview.SetContent(content)
|
||||
m.preview.GotoTop()
|
||||
|
||||
case key.Matches(msg, keyMap.Print):
|
||||
|
Loading…
Reference in New Issue
Block a user