cell editing works better

This commit is contained in:
2025-07-13 17:50:56 -07:00
parent 3fdac7d9d8
commit 76bcc8520c
4 changed files with 57 additions and 23 deletions

View File

@@ -82,14 +82,14 @@ func (m *EditCellModel) View() string {
}
content := TitleStyle.Render(fmt.Sprintf("Edit Cell: %s", columnName)) + "\n\n"
// Display value with visible cursor
displayValue := m.value
if m.cursor <= len(displayValue) {
// Insert cursor character at cursor position
displayValue = displayValue[:m.cursor] + "_" + displayValue[m.cursor:]
}
content += fmt.Sprintf("Value: %s\n\n", displayValue)
content += HelpStyle.Render("enter: save • esc: cancel")