Skip to content

Commit

Permalink
refactor: typo in EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Dec 27, 2020
1 parent d9cf3b0 commit 85ee0bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/ansi_formats.go
Expand Up @@ -12,7 +12,7 @@ type ansiFormats struct {
left string
right string
creset string
clearOEL string
clearEOL string
saveCursorPosition string
restoreCursorPosition string
title string
Expand All @@ -31,7 +31,7 @@ func (a *ansiFormats) init(shell string) {
a.left = "%%{\x1b[%dC%%}"
a.right = "%%{\x1b[%dD%%}"
a.creset = "%{\x1b[0m%}"
a.clearOEL = "%{\x1b[K%}"
a.clearEOL = "%{\x1b[K%}"
a.saveCursorPosition = "%{\x1b7%}"
a.restoreCursorPosition = "%{\x1b8%}"
a.title = "%%{\033]0;%s\007%%}"
Expand All @@ -45,7 +45,7 @@ func (a *ansiFormats) init(shell string) {
a.left = "\\[\x1b[%dC\\]"
a.right = "\\[\x1b[%dD\\]"
a.creset = "\\[\x1b[0m\\]"
a.clearOEL = "\\[\x1b[K\\]"
a.clearEOL = "\\[\x1b[K\\]"
a.saveCursorPosition = "\\[\x1b7\\]"
a.restoreCursorPosition = "\\[\x1b8\\]"
a.title = "\\[\033]0;%s\007\\]"
Expand All @@ -59,7 +59,7 @@ func (a *ansiFormats) init(shell string) {
a.left = "\x1b[%dC"
a.right = "\x1b[%dD"
a.creset = "\x1b[0m"
a.clearOEL = "\x1b[K"
a.clearEOL = "\x1b[K"
a.saveCursorPosition = "\x1b7"
a.restoreCursorPosition = "\x1b8"
a.title = "\033]0;%s\007"
Expand Down
2 changes: 1 addition & 1 deletion src/ansi_renderer.go
Expand Up @@ -40,7 +40,7 @@ func (r *AnsiRenderer) print(text string) {
// color of the line above the new input line. Clearing the line fixes this,
// but can hopefully one day be removed when this is resolved natively.
if r.formats.shell == pwsh || r.formats.shell == powershell5 {
r.buffer.WriteString(r.formats.clearOEL)
r.buffer.WriteString(r.formats.clearEOL)
}
}

Expand Down

0 comments on commit 85ee0bb

Please sign in to comment.