~ghost08/tcell-term

12e2388af02cc3618630f6a08ce4df4f924ce7cb — Tim Culverhouse 1 year, 18 days ago 0055e77
fix: remove log call on unknown ansi code

If this happens during a tcell application, it can garble the screen.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
1 files changed, 1 insertions(+), 3 deletions(-)

M termutil/ansi.go
M termutil/ansi.go => termutil/ansi.go +1 -3
@@ 1,7 1,5 @@
package termutil

import "log"

func (t *Terminal) handleANSI(readChan chan MeasuredRune) (renderRequired bool) {
	// if the byte is an escape character, read the next byte to determine which one
	r := <-readChan


@@ 44,7 42,7 @@ func (t *Terminal) handleANSI(readChan chan MeasuredRune) (renderRequired bool) 
	case '^':
		return t.handlePrivacyMessage(readChan)
	default:
		log.Printf("UNKNOWN ESCAPE SEQUENCE: 0x%X", r.Rune)
		// log.Printf("UNKNOWN ESCAPE SEQUENCE: 0x%X", r.Rune)
		return false
	}