Skip to content

Commit

Permalink
fix(#100): boards view initial cursor x position when first columns a…
Browse files Browse the repository at this point in the history
…re empty
  • Loading branch information
mk-5 committed Jan 16, 2024
1 parent f1a5118 commit 55fdede
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/boards/board_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func (b *boardView) Init() {
}
b.refreshIssuesSummaries()
b.refreshIssuesRows()
b.setInitialCursorX()
b.refreshHighlightedIssue()
app.GetApp().Loading(false)
go b.handleActions()
Expand Down Expand Up @@ -363,6 +364,18 @@ func (b *boardView) refreshIssuesSummaries() {
}
}

func (b *boardView) setInitialCursorX() {
if len(b.issuesColumn) == 0 {
return
}
b.cursorX = len(b.columnsX)
for _, v := range b.issuesColumn {
if v < b.cursorX {
b.cursorX = v
}
}
}

func (b *boardView) moveIssue(issue *jira.Issue, direction int) {
app.GetApp().Loading(true)
inc := 1
Expand Down

0 comments on commit 55fdede

Please sign in to comment.