Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/giulianopz/newscanoe int…
Browse files Browse the repository at this point in the history
…o develop
  • Loading branch information
giulianopz committed Jul 16, 2023
2 parents b1a8113 + 1b089fa commit 4d67abb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ jobs:
with:
go-version: '1.20'
cache: false

- uses: actions/checkout@v3

- name: generate version file
run: go generate ./...

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: '1.20'

- name: generate version file
run: go generate ./...

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
Expand Down
5 changes: 2 additions & 3 deletions pkg/display/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (d *display) Quit(quitC chan bool) {
fmt.Fprint(os.Stdout, ansi.ShowCursor())
fmt.Fprint(os.Stdout, ansi.Erase(ansi.ERASE_ENTIRE_SCREEN))
fmt.Fprint(os.Stdout, ansi.MoveCursor(1, 1))
fmt.Fprint(os.Stdout, xterm.DISABLE_MOUSE_TRACKING)
fmt.Fprint(os.Stdout, xterm.ENABLE_MOUSE_TRACKING)
fmt.Fprint(os.Stdout, xterm.CLEAR_SCROLLBACK_BUFFER)
quitC <- true
}
Expand Down Expand Up @@ -350,8 +350,7 @@ func (d *display) RefreshScreen() {

buf := &bytes.Buffer{}

buf.WriteString("\x1b[?1000h\x1b[?1002h\x1b[?1003h\x1b[?1006h")

buf.WriteString(xterm.DISABLE_MOUSE_TRACKING)
buf.WriteString(ansi.Erase(ansi.ERASE_ENTIRE_SCREEN))
buf.WriteString(ansi.HideCursor())
buf.WriteString(ansi.MoveCursor(1, 1))
Expand Down
3 changes: 2 additions & 1 deletion pkg/xterm/control_sequences.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package xterm

const (
DISABLE_MOUSE_TRACKING = "\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l"
ENABLE_MOUSE_TRACKING = "\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l"
DISABLE_MOUSE_TRACKING = "\x1b[?1000h\x1b[?1002h\x1b[?1003h\x1b[?1006h"
CLEAR_SCROLLBACK_BUFFER = "\033[3J"
)

0 comments on commit 4d67abb

Please sign in to comment.