diff --git a/src/ansi_formats.go b/src/ansi_formats.go index fcc57017e6bd..efb9a07fc631 100644 --- a/src/ansi_formats.go +++ b/src/ansi_formats.go @@ -12,7 +12,7 @@ type ansiFormats struct { left string right string creset string - clearOEL string + clearEOL string saveCursorPosition string restoreCursorPosition string title string @@ -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%%}" @@ -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\\]" @@ -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" diff --git a/src/ansi_renderer.go b/src/ansi_renderer.go index 43fb20ced0bb..c33743613094 100644 --- a/src/ansi_renderer.go +++ b/src/ansi_renderer.go @@ -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) } }