@@ -21,6 +21,7 @@ const (
2121type PreviewPane struct {
2222 childColumn * Column
2323 content string
24+ imageContent string // inline image sequences — excluded from yank
2425 contentLines []string // split content for scrolling
2526 highlighted string
2627 mode PreviewMode
@@ -113,6 +114,7 @@ func (m MillerView) Update(msg tea.Msg) (MillerView, tea.Cmd) {
113114 Trace ("miller: PreviewReady key=%q highlight=%q len=%d" , msg .NodeKey , msg .HighlightType , len (msg .Content ))
114115 m .preview .loading = false
115116 m .preview .content = msg .Content
117+ m .preview .imageContent = msg .ImageContent
116118 m .preview .contentLines = strings .Split (msg .Content , "\n " )
117119 m .preview .highlighted = msg .HighlightType
118120 m .preview .childColumn = nil
@@ -181,6 +183,7 @@ func (m MillerView) handleCursorChanged(msg CursorChangedMsg) (MillerView, tea.C
181183 col .SetItems (treeNodesToItems (node .Children ))
182184 m .preview .childColumn = & col
183185 m .preview .content = ""
186+ m .preview .imageContent = ""
184187 m .preview .contentLines = nil
185188 m .preview .loading = false
186189 m .preview .scrollOffset = 0
@@ -196,6 +199,7 @@ func (m MillerView) handleCursorChanged(msg CursorChangedMsg) (MillerView, tea.C
196199 return m , cmd
197200 }
198201 m .preview .content = ""
202+ m .preview .imageContent = ""
199203 m .preview .contentLines = nil
200204 m .preview .loading = false
201205 return m , nil
@@ -457,10 +461,14 @@ func (m MillerView) renderPreview(previewWidth int) string {
457461 out .WriteByte ('\n' )
458462 }
459463
460- return lipgloss .NewStyle ().
464+ rendered := lipgloss .NewStyle ().
461465 Width (previewWidth ).
462466 MaxHeight (m .height ).
463467 Render (out .String ())
468+ if m .preview .imageContent != "" {
469+ rendered += "\n " + m .preview .imageContent
470+ }
471+ return rendered
464472 }
465473
466474 return lipgloss .NewStyle ().
@@ -740,6 +748,7 @@ func (m *MillerView) updateFocusStyles() {
740748func (m * MillerView ) clearPreview () {
741749 m .preview .childColumn = nil
742750 m .preview .content = ""
751+ m .preview .imageContent = ""
743752 m .preview .contentLines = nil
744753 m .preview .loading = false
745754 m .preview .scrollOffset = 0
0 commit comments