term-terminal-state
term-terminal-state is a variable defined in `term.el
'.
Its value is 0Documentation: State of the terminal emulator: state 0: Normal state state 1: Last character was a graphic in the last column. If next char is graphic, first move one column right (and line warp) before displaying it. This emulates (more or less) the behavior of xterm. state 2: seen ESC state 3: seen ESC [ (or ESC [ ?) state 4: term-terminal-parameter contains pending output.