Skip to content

Commit e611cd9

Browse files
cpcloudcursoragent
andcommitted
fix(calendar): use [/] for year navigation instead of ctrl+shift+h/l
Bubbletea v1 can't distinguish ctrl+shift+letter from ctrl+letter in most terminals, so ctrl+shift+h/l silently did nothing. Switched to [/] which works everywhere and follows the escalating-jump pattern (h/l day, H/L month, [/] year). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6fdc566 commit e611cd9

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,8 @@ in case things crash or otherwise go haywire, be diligent about this.
10751075
HOAFeeCents and PropertyTaxCents. Why aren't those just plain int64s?
10761076

10771077
## Moar
1078-
- for the calendar widget, let's make ctrl+shift+h/l moves years
1078+
- ~~for the calendar widget, let's make ctrl+shift+h/l moves years~~ DONE
1079+
- calendar widget day column alignment bug: centering shifted short last rows (6fdc566)
10791080
- let's make sure that deleting, even soft deleting doesn't break the model,
10801081
e.g., if i try to delete a quote that's linked to a project, i get
10811082
a reasonable error message, probably in the status bar but open to thoughts

docs/content/reference/keybindings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ input:
117117
| `h`/`l` | Move one day left/right |
118118
| `j`/`k` | Move one week down/up |
119119
| `H`/`L` | Move one month back/forward |
120-
| `ctrl+shift+h`/`l` | Move one year back/forward |
120+
| `[`/`]` | Move one year back/forward |
121121
| `enter` | Pick the highlighted date |
122122
| `esc` | Cancel (keep original value) |
123123

internal/app/calendar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func calendarGrid(cal calendarState, styles Styles) string {
8080
// Navigation hints split into two lines to keep the box compact.
8181
hintStyle := lipgloss.NewStyle().Foreground(textDim)
8282
hints := lipgloss.JoinVertical(lipgloss.Left,
83-
hintStyle.Render("h/l day · j/k week · H/L month · ctrl+shift+h/l year"),
83+
hintStyle.Render("h/l day · j/k week · H/L month · [/] year"),
8484
hintStyle.Render("enter pick · esc cancel"),
8585
)
8686

internal/app/model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,9 @@ func (m *Model) handleCalendarKey(key tea.KeyMsg) (tea.Model, tea.Cmd) {
455455
calendarMoveMonth(m.calendar, -1)
456456
case "L":
457457
calendarMoveMonth(m.calendar, 1)
458-
case "ctrl+shift+h":
458+
case "[":
459459
calendarMoveYear(m.calendar, -1)
460-
case "ctrl+shift+l":
460+
case "]":
461461
calendarMoveYear(m.calendar, 1)
462462
case "enter":
463463
m.confirmCalendar()

internal/app/view.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ func (m *Model) helpView() string {
511511
{"h/l", "Previous/next day"},
512512
{"j/k", "Next/previous week"},
513513
{"H/L", "Previous/next month"},
514-
{"ctrl+shift+h/l", "Previous/next year"},
514+
{"[/]", "Previous/next year"},
515515
{"enter", "Pick date"},
516516
{"esc", "Cancel"},
517517
},

0 commit comments

Comments
 (0)