Skip to content
Myr

Ignore cursor position report

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #2081

authored by Junegunn Choi · committed by Junegunn Choi · parent 3ab1c42 · Browse files · 1 file+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−0 removed

  • other:+8 added−0 removed

1 file+8 added−0 removed

modified:src/tui/light.go+8 added
26 unmodified lines
2728const consoleDevice string = "/dev/tty"2930var offsetRegexp *regexp.Regexp = regexp.MustCompile("(.*)\x1b\\[([0-9]+);([0-9]+)R")31var offsetRegexpBegin *regexp.Regexp = regexp.MustCompile("^\x1b\\[[0-9]+;[0-9]+R")3233func (r *LightRenderer) stderr(str string) {34 r.stderrInternal(str, true)35}
297 unmodified lines
333func (r *LightRenderer) escSequence(sz *int) Event {334 if len(r.buffer) < 2 {335 return Event{ESC, 0, nil}336 }337338 loc := offsetRegexpBegin.FindIndex(r.buffer)339 if loc != nil && loc[0] == 0 {340 *sz = loc[1]341 return Event{Invalid, 0, nil}342 }343344 *sz = 2345 if r.buffer[1] >= 1 && r.buffer[1] <= 'z'-'a'+1 {346 return Event{int(CtrlAltA + r.buffer[1] - 1), 0, nil}347 }
588 unmodified lines