Mercurial > vim
diff src/libvterm/src/parser.c @ 32728:b13f723a7ec6 v9.0.1684
patch 9.0.1684: Update libvterm to rev 839
Commit: https://github.com/vim/vim/commit/b00df7aa388994119346a21d77b0d0db2a0a5e9f
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Aug 8 11:03:00 2023 +0800
patch 9.0.1684: Update libvterm to rev 839
Problem: libvterm slightly outdated
Solution: Update libvterm from rev 818 to rev 839
Notable fix: libvterm now handles DECSM/DECRM with multiple arguents,
so several ncurses programs (e.g. nnn) can enable mouse properly when
run in Vim's terminal in XTerm.
closes: #12746
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 11 Aug 2023 21:30:03 +0200 |
parents | b1c66bff0a66 |
children |
line wrap: on
line diff
--- a/src/libvterm/src/parser.c +++ b/src/libvterm/src/parser.c @@ -148,11 +148,15 @@ size_t vterm_input_write(VTerm *vt, cons string_fragment(vt, string_start, bytes + pos - string_start, FALSE); string_start = bytes + pos + 1; } + if(vt->parser.emit_nul) + do_control(vt, c); continue; } if(c == 0x18 || c == 0x1a) { // CAN, SUB vt->parser.in_esc = FALSE; ENTER_NORMAL_STATE(); + if(vt->parser.emit_nul) + do_control(vt, c); continue; } else if(c == 0x1b) { // ESC @@ -402,3 +406,8 @@ void *vterm_parser_get_cbdata(VTerm *vt) { return vt->parser.cbdata; } + +void vterm_parser_set_emit_nul(VTerm *vt, int emit) +{ + vt->parser.emit_nul = emit; +}