diff --git a/cell.go b/cell.go index 59eaac7..159f45f 100644 --- a/cell.go +++ b/cell.go @@ -1,8 +1,6 @@ package mdtt import ( - "strings" - "github.com/charmbracelet/bubbles/textarea" "github.com/charmbracelet/bubbles/textinput" tea "github.com/charmbracelet/bubbletea" @@ -46,8 +44,6 @@ func (m Cell) Update(msg tea.Msg) (Cell, tea.Cmd) { // h := m.textInput.LineInfo().Height // fmt.Println(h) - h := strings.Count(m.textInput.Value(), "\n") + 1 - m.textInput.SetHeight(h) switch msg := msg.(type) { // We handle errors just like any other message @@ -57,7 +53,8 @@ func (m Cell) Update(msg tea.Msg) (Cell, tea.Cmd) { } m.textInput, cmd = m.textInput.Update(msg) - + // h := strings.Count(m.textInput.Value(), "\n") + 1 + // m.textInput.SetHeight(h) width := runewidth.StringWidth(m.textInput.Value()) return m, tea.Batch(cmd, updateWidthCmd(width)) } diff --git a/table.go b/table.go index ec92552..4705fa7 100644 --- a/table.go +++ b/table.go @@ -666,7 +666,6 @@ func (m *TableModel) renderRow(rowID int) string { var value string if isInsertMode && isSelected { value = cell.View() - // value = cell.Value() } else { value = cell.Value() log.Debug("value", "value", value)