mirror of
https://github.com/taigrr/teaqlite.git
synced 2026-04-02 04:59:03 -07:00
cell editing works better
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user