comparison 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
comparison
equal deleted inserted replaced
32727:6beeb2e0105d 32728:b13f723a7ec6
146 if(c == 0x00 || c == 0x7f) { // NUL, DEL 146 if(c == 0x00 || c == 0x7f) { // NUL, DEL
147 if(IS_STRING_STATE()) { 147 if(IS_STRING_STATE()) {
148 string_fragment(vt, string_start, bytes + pos - string_start, FALSE); 148 string_fragment(vt, string_start, bytes + pos - string_start, FALSE);
149 string_start = bytes + pos + 1; 149 string_start = bytes + pos + 1;
150 } 150 }
151 if(vt->parser.emit_nul)
152 do_control(vt, c);
151 continue; 153 continue;
152 } 154 }
153 if(c == 0x18 || c == 0x1a) { // CAN, SUB 155 if(c == 0x18 || c == 0x1a) { // CAN, SUB
154 vt->parser.in_esc = FALSE; 156 vt->parser.in_esc = FALSE;
155 ENTER_NORMAL_STATE(); 157 ENTER_NORMAL_STATE();
158 if(vt->parser.emit_nul)
159 do_control(vt, c);
156 continue; 160 continue;
157 } 161 }
158 else if(c == 0x1b) { // ESC 162 else if(c == 0x1b) { // ESC
159 vt->parser.intermedlen = 0; 163 vt->parser.intermedlen = 0;
160 if(!IS_STRING_STATE()) 164 if(!IS_STRING_STATE())
400 404
401 void *vterm_parser_get_cbdata(VTerm *vt) 405 void *vterm_parser_get_cbdata(VTerm *vt)
402 { 406 {
403 return vt->parser.cbdata; 407 return vt->parser.cbdata;
404 } 408 }
409
410 void vterm_parser_set_emit_nul(VTerm *vt, int emit)
411 {
412 vt->parser.emit_nul = emit;
413 }