Skip to content

Commit

Permalink
Make sure that we have only one LogPane at a time when use only `> lo…
Browse files Browse the repository at this point in the history
…g` for its opening

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
  • Loading branch information
dustdfg committed Dec 15, 2023
1 parent 2d82362 commit da2d4cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/action/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,11 @@ func (h *BufPane) OpenCmd(args []string) {

// ToggleLogCmd toggles the log view
func (h *BufPane) ToggleLogCmd(args []string) {
if h.Buf.Type != buffer.BTLog {
if LogBufPane == nil {
h.OpenLogBuf()
} else {
h.Quit()
LogBufPane.Quit()
LogBufPane = nil
}
}

Expand Down

0 comments on commit da2d4cf

Please sign in to comment.