Skip to content

Commit

Permalink
fix(tui): Draw log pane over editor
Browse files Browse the repository at this point in the history
This is a small and mediocre hackfix where cursor control is a bit
messed up still
  • Loading branch information
ja-he committed Jul 2, 2024
1 parent cc388bf commit ccac3f4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions internal/ui/panes/root_pane.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ func (p *RootPane) getCurrentlyActivePanesInOrder() (active []ui.Pane, inactive
// append day, week, or month pane
active = append(active, p.focussedViewPane)

// TODO: this change breaks the cursor hiding, as that is done in the draw
// call when !condition. it should be done differently anyways though,
// imo.
if p.log.IsVisible() {
active = append(active, p.log)
} else {
inactive = append(inactive, p.log)
}
if p.summary.IsVisible() {
active = append(active, p.summary)
} else {
Expand All @@ -90,6 +82,12 @@ func (p *RootPane) getCurrentlyActivePanesInOrder() (active []ui.Pane, inactive
}
}

if p.log.IsVisible() {
active = append(active, p.log)
} else {
inactive = append(inactive, p.log)
}

// TODO: help should probably be a subpane? for now, always on top.
if p.help.IsVisible() {
active = append(active, p.help)
Expand Down

0 comments on commit ccac3f4

Please sign in to comment.