mirror of
https://github.com/antonmedv/fx.git
synced 2024-08-17 22:20:46 +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):
|
case key.Matches(msg, keyMap.Preview):
|
||||||
m.showPreview = true
|
m.showPreview = true
|
||||||
m.preview.SetContent(m.cursorValue())
|
content := lipgloss.NewStyle().Width(m.termWidth).Render(m.cursorValue())
|
||||||
|
m.preview.SetContent(content)
|
||||||
m.preview.GotoTop()
|
m.preview.GotoTop()
|
||||||
|
|
||||||
case key.Matches(msg, keyMap.Print):
|
case key.Matches(msg, keyMap.Print):
|
||||||
|
Loading…
Reference in New Issue
Block a user