Skip to content

Commit

Permalink
try to detect escape to prevent read_cursor_pos to be called in the m…
Browse files Browse the repository at this point in the history
…iddle of one
  • Loading branch information
cracyc committed Oct 27, 2024
1 parent c89fd38 commit e89ae7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions msdos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6530,8 +6530,10 @@ void msdos_putch_tmp(UINT8 data, unsigned int_num, UINT8 reg_ah)
} else if(is_esc) {
// escape sequense
if(use_vt) {
WriteConsoleA(hStdout, tmp, p, NULL, NULL);
p = is_esc = 0;
if((data >= 'a' && data <= 'z') || (data >= 'A' && data <= 'Z')) {
WriteConsoleA(hStdout, tmp, p, NULL, NULL);
p = is_esc = 0;
}
return;
} else if((tmp[1] == ')' || tmp[1] == '(') && p == 3) {
p = is_esc = 0;
Expand Down

0 comments on commit e89ae7a

Please sign in to comment.