xonecas.io
62159
Sy

symb / commit 39cdd6f

fix: correct some shortcuts

xonecas2026-02-17 39cdd6f54214ac900769dd1e035a5f8630dd9f40 parent 02874d6

3 files changed

internal/tui/editor/update.go+1−1
@@ -174,7 +174,7 @@ func (m *Model) handleEditKey(key string) bool {
174174 } else {
175175 m.deleteBack()
176176 }
177- case "delete", "ctrl+d":
177+ case "delete":
178178 if m.HasSelection() {
179179 m.DeleteSelection()
180180 } else {
internal/tui/modal/modal.go+13−5
@@ -304,11 +304,18 @@ func (m *Model) renderList(innerW, listHeight int) []string {
304304 if i == m.selected && m.inList {
305305 lines = append(lines, selStyle.Render(padRight(item.Name, innerW)))
306306 } else {
307- line := item.Name
307+ name := baseStyle.Render(item.Name)
308+ visW := lipgloss.Width(item.Name)
309+ desc := ""
308310 if item.Desc != "" {
309- line += dimStyle.Render(" " + item.Desc)
311+ desc = dimStyle.Render(" " + item.Desc)
312+ visW += 2 + lipgloss.Width(item.Desc)
310313 }
311- lines = append(lines, baseStyle.Render(padRight(line, innerW)))
314+ pad := ""
315+ if visW < innerW {
316+ pad = baseStyle.Render(strings.Repeat(" ", innerW-visW))
317+ }
318+ lines = append(lines, name+desc+pad)
312319 }
313320 }
314321
@@ -319,8 +326,9 @@ func (m *Model) renderList(innerW, listHeight int) []string {
319326 }
320327
321328 func padRight(s string, w int) string {
322- if len(s) >= w {
329+ vis := lipgloss.Width(s)
330+ if vis >= w {
323331 return s
324332 }
325- return s + strings.Repeat(" ", w-len(s))
333+ return s + strings.Repeat(" ", w-vis)
326334 }
internal/tui/update.go+4−6
@@ -273,7 +273,6 @@ func (m *Model) handleCtrlH() (Model, tea.Cmd, bool) {
273273 return *m, nil, true
274274 }
275275
276-
277276 // handleUserMsg records a user message in the DB and conversation display.
278277 func (m *Model) handleUserMsg(msg llmUserMsg) Model {
279278 now := time.Now()
@@ -865,16 +864,16 @@ func (m *Model) openKeybindsModal() {
865864 items := []modal.Item{
866865 {Name: "ctrl+h", Desc: "keybinds"},
867866 {Name: "ctrl+f", Desc: "file search"},
868- {Name: "ctrl+s", Desc: "send diff"},
867+ {Name: "ctrl+s", Desc: "save editor (send diff) [experimental]"},
869868 {Name: "ctrl+shift+c", Desc: "copy selection"},
870869 {Name: "ctrl+shift+v", Desc: "paste"},
871870 {Name: "ctrl+c", Desc: "quit"},
872871 {Name: "esc", Desc: "cancel/blur"},
873- {Name: "enter", Desc: "send message"},
872+ {Name: "enter", Desc: "send message in input, newline on editor"},
874873 {Name: "shift+enter", Desc: "newline in input"},
875874 {Name: "tab", Desc: "indent"},
876- {Name: "backspace/ctrl+h", Desc: "delete backward"},
877- {Name: "delete/ctrl+d", Desc: "delete forward"},
875+ {Name: "backspace", Desc: "delete backward"},
876+ {Name: "delete", Desc: "delete forward"},
878877 {Name: "up/down/left/right", Desc: "move cursor"},
879878 {Name: "shift+arrows", Desc: "extend selection"},
880879 {Name: "home/end/ctrl+a/ctrl+e", Desc: "line start/end"},
@@ -931,7 +930,6 @@ func (m *Model) updateKeybindsModal(msg tea.Msg) (Model, tea.Cmd, bool) {
931930 return *m, nil, false
932931 }
933932
934-
935933 func (m *Model) updateFileModal(msg tea.Msg) (Model, tea.Cmd, bool) {
936934 if m.fileModal == nil {
937935 return *m, nil, false