TextChanged notifies the model changed.
(lines []string)
| 98 | |
| 99 | // TextChanged notifies the model changed. |
| 100 | func (d *Details) TextChanged(lines []string) { |
| 101 | switch d.contentType { |
| 102 | case contentYAML: |
| 103 | d.text.SetText(colorizeYAML(d.app.Styles.Views().Yaml, strings.Join(lines, "\n"))) |
| 104 | default: |
| 105 | d.text.SetText(strings.Join(lines, "\n")) |
| 106 | } |
| 107 | d.text.ScrollToBeginning() |
| 108 | } |
| 109 | |
| 110 | // TextFiltered notifies when the filter changed. |
| 111 | func (d *Details) TextFiltered(lines []string, matches fuzzy.Matches) { |
no test coverage detected