Skip to content

Commit b2a781a

Browse files
committed
WIP highlight current card
1 parent cf4ab8c commit b2a781a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/cmd/project/project.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ func projectRun(opts *ProjectOptions) error {
132132
cardHeight := 5
133133
cardsToShow := 7
134134

135+
selectedColumn := 0
136+
selectedCard := 0
137+
135138
loop:
136139
for {
137140
select {
@@ -153,7 +156,11 @@ loop:
153156
if ic == cardsToShow {
154157
break
155158
}
156-
drawRect(s, style, colX+1, (ic*cardHeight)+colY+2, cardWidth, cardHeight)
159+
cardStyle := style
160+
if selectedColumn == ix && selectedCard == ic {
161+
cardStyle = style.Foreground(tcell.ColorGreen)
162+
}
163+
drawRect(s, cardStyle, colX+1, (ic*cardHeight)+colY+2, cardWidth, cardHeight)
157164
cardNote := card.Note
158165
if len(card.Note) > cardWidth-2 {
159166
cardNote = cardNote[0 : cardWidth-2]

0 commit comments

Comments
 (0)