Wrap preview correctly

pull/295/head
Anton Medvedev 2 months ago
parent e52f84cba5
commit c7a330a914
No known key found for this signature in database

@ -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…
Cancel
Save