vt: preserve environment of start command
The caller may have already set the command's environment; don't clobber
it when setting TERM.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
eventHandler: buffer events in channel before sending to host
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
key: fix tests
The mod + rune test was broken. Fix expected to be the correct value
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
csi.REP: fix handling of REP
The REP function was not looping over the correct values, and also was
causing a panic when accessing the cell array. Fix the loop variables
and protect against the panic
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
vt: add panic recovery
Add a panic recovery handler. An EventPanic is sent when a panic in the
terminal occurs, giving the host application a chance to clean up the
screen.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
csi: fix default value when only one param in CUP
Fix behavior when CUP is passed only one value. The default was to use
the value as both the row and column, but it should only be used as the
row. The column defaults to 1 (1-indexed) now.
Reported-by: ~stacyharper
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
vt: check for process == nil before calling kill
If Close is called and the command.Process has not started, a panic can
occur due to directly accessing cmd.Process. Check for Process to exist
before calling Kill.
Reported-by: Koni Marti <koni.marti@gmail.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
update license copyright
Update license copyright to reflect the rewrite
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
vt: define an eventhandler at initialization
Define an eventHandler func at initialization. If a client doesn't call
attach or detach, this will be nil and could cause a panic.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
osc: emit pointer to EventTitle
Emit a pointer to EventTitle to maintain backward compatibility
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>