@@ -82,6 +82,7 @@ type Model struct {
8282 nsResolved []dnsutil.HostResolution
8383 nsExpanded bool
8484 nsResolving bool
85+ txtExpanded bool
8586 mailData * mail.Records
8687 mxResolved []dnsutil.HostResolution
8788 mxExpanded bool
@@ -328,6 +329,11 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
328329 }
329330 }
330331 case "x" :
332+ if ! m .isIP && m .active == tabDNS && m .dnsData != nil && len (m .dnsData .TXT ) > 0 {
333+ m .txtExpanded = ! m .txtExpanded
334+ m .updateViewport ()
335+ return m , nil
336+ }
331337 if ! m .isIP && m .active == tabMail && m .mailHasSPFTree () {
332338 max := spfMaxDepth (m .spfRoot ())
333339 switch {
@@ -342,6 +348,11 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
342348 return m , nil
343349 }
344350 case "X" :
351+ if ! m .isIP && m .active == tabDNS && m .dnsData != nil && len (m .dnsData .TXT ) > 0 {
352+ m .txtExpanded = ! m .txtExpanded
353+ m .updateViewport ()
354+ return m , nil
355+ }
345356 if ! m .isIP && m .active == tabMail && m .mailHasSPFTree () {
346357 max := spfMaxDepth (m .spfRoot ())
347358 if m .spfDepth == SPFExpandAll || m .spfDepth >= max {
@@ -630,7 +641,7 @@ func (m Model) contentForTab(t tab) string {
630641 if m .nsExpanded {
631642 res = m .nsResolved
632643 }
633- return RenderDNS (m .dnsData , res )
644+ return RenderDNS (m .dnsData , res , m . txtExpanded )
634645 }
635646 case tabTLS :
636647 if m .loading {
@@ -756,6 +767,13 @@ func (m Model) View() tea.View {
756767 footerParts = append (footerParts , "i resolve mx" )
757768 }
758769 }
770+ if ! m .isIP && m .active == tabDNS && m .dnsData != nil && len (m .dnsData .TXT ) > 0 {
771+ if m .txtExpanded {
772+ footerParts = append (footerParts , "x/X truncate txt" )
773+ } else {
774+ footerParts = append (footerParts , "x/X full txt" )
775+ }
776+ }
759777 if ! m .isIP && m .active == tabMail && m .mailHasSPFTree () {
760778 max := spfMaxDepth (m .spfRoot ())
761779 switch {
0 commit comments