ConfirmEdit saves the edit buffer to the selected item.
()
| 111 | |
| 112 | // ConfirmEdit saves the edit buffer to the selected item. |
| 113 | func (s *SettingsOverlay) ConfirmEdit() { |
| 114 | if s.editing && s.selectedIndex < len(s.items) { |
| 115 | s.items[s.selectedIndex].StringVal = s.editBuffer |
| 116 | s.editing = false |
| 117 | s.editBuffer = "" |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | // CancelEdit discards the edit buffer. |
| 122 | func (s *SettingsOverlay) CancelEdit() { |
no outgoing calls