Mercurial > vim
diff src/libvterm/src/state.c @ 13770:2449b6ce1456 v8.0.1757
patch 8.0.1757: unnecessary changes in libvterm
commit https://github.com/vim/vim/commit/b691de05f69905fe417f583083d7e3cc16eb865e
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 24 18:39:14 2018 +0200
patch 8.0.1757: unnecessary changes in libvterm
Problem: Unnecessary changes in libvterm.
Solution: Bring back // comments and trailing comma in enums.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 24 Apr 2018 18:45:07 +0200 |
parents | 9f857e6310b6 |
children | 17ade2ec0616 |
line wrap: on
line diff
--- a/src/libvterm/src/state.c +++ b/src/libvterm/src/state.c @@ -101,7 +101,7 @@ static void scroll(VTermState *state, VT else if(rightward < -cols) rightward = -cols; - /* Update lineinfo if full line */ + // Update lineinfo if full line if(rect.start_col == 0 && rect.end_col == state->cols && rightward == 0) { int height = rect.end_row - rect.start_row - abs(downward); @@ -221,7 +221,7 @@ static void set_lineinfo(VTermState *sta info.doublewidth = DWL_OFF; else if(dwl == DWL_ON) info.doublewidth = DWL_ON; - /* else -1 to ignore */ + // else -1 to ignore if(dhl == DHL_OFF) info.doubleheight = DHL_OFF; @@ -248,8 +248,8 @@ static int on_text(const char bytes[], s VTermPos oldpos = state->pos; - /* We'll have at most len codepoints, plus one from a previous incomplete - * sequence. */ + // We'll have at most len codepoints, plus one from a previous incomplete + // sequence. codepoints = vterm_allocator_malloc(state->vt, (len + 1) * sizeof(uint32_t)); encoding = @@ -317,7 +317,7 @@ static int on_text(const char bytes[], s } for(; i < npoints; i++) { - /* Try to find combining characters following this */ + // Try to find combining characters following this int glyph_starts = i; int glyph_ends; int width = 0; @@ -422,54 +422,54 @@ static int on_control(unsigned char cont VTermPos oldpos = state->pos; switch(control) { - case 0x07: /* BEL - ECMA-48 8.3.3 */ + case 0x07: // BEL - ECMA-48 8.3.3 if(state->callbacks && state->callbacks->bell) (*state->callbacks->bell)(state->cbdata); break; - case 0x08: /* BS - ECMA-48 8.3.5 */ + case 0x08: // BS - ECMA-48 8.3.5 if(state->pos.col > 0) state->pos.col--; break; - case 0x09: /* HT - ECMA-48 8.3.60 */ + case 0x09: // HT - ECMA-48 8.3.60 tab(state, 1, +1); break; - case 0x0a: /* LF - ECMA-48 8.3.74 */ - case 0x0b: /* VT */ - case 0x0c: /* FF */ + case 0x0a: // LF - ECMA-48 8.3.74 + case 0x0b: // VT + case 0x0c: // FF linefeed(state); if(state->mode.newline) state->pos.col = 0; break; - case 0x0d: /* CR - ECMA-48 8.3.15 */ + case 0x0d: // CR - ECMA-48 8.3.15 state->pos.col = 0; break; - case 0x0e: /* LS1 - ECMA-48 8.3.76 */ + case 0x0e: // LS1 - ECMA-48 8.3.76 state->gl_set = 1; break; - case 0x0f: /* LS0 - ECMA-48 8.3.75 */ + case 0x0f: // LS0 - ECMA-48 8.3.75 state->gl_set = 0; break; - case 0x84: /* IND - DEPRECATED but implemented for completeness */ + case 0x84: // IND - DEPRECATED but implemented for completeness linefeed(state); break; - case 0x85: /* NEL - ECMA-48 8.3.86 */ + case 0x85: // NEL - ECMA-48 8.3.86 linefeed(state); state->pos.col = 0; break; - case 0x88: /* HTS - ECMA-48 8.3.62 */ + case 0x88: // HTS - ECMA-48 8.3.62 set_col_tabstop(state, state->pos.col); break; - case 0x8d: /* RI - ECMA-48 8.3.104 */ + case 0x8d: // RI - ECMA-48 8.3.104 if(state->pos.row == state->scrollregion_top) { VTermRect rect; rect.start_row = state->scrollregion_top; @@ -483,11 +483,11 @@ static int on_control(unsigned char cont state->pos.row--; break; - case 0x8e: /* SS2 - ECMA-48 8.3.141 */ + case 0x8e: // SS2 - ECMA-48 8.3.141 state->gsingle_set = 2; break; - case 0x8f: /* SS3 - ECMA-48 8.3.142 */ + case 0x8f: // SS3 - ECMA-48 8.3.142 state->gsingle_set = 3; break; @@ -580,11 +580,11 @@ static int on_escape(const char *bytes, return 0; switch(bytes[1]) { - case 'F': /* S7C1T */ + case 'F': // S7C1T state->vt->mode.ctrl8bit = 0; break; - case 'G': /* S8C1T */ + case 'G': // S8C1T state->vt->mode.ctrl8bit = 1; break; @@ -598,31 +598,31 @@ static int on_escape(const char *bytes, return 0; switch(bytes[1]) { - case '3': /* DECDHL top */ + case '3': // DECDHL top if(state->mode.leftrightmargin) break; set_lineinfo(state, state->pos.row, NO_FORCE, DWL_ON, DHL_TOP); break; - case '4': /* DECDHL bottom */ + case '4': // DECDHL bottom if(state->mode.leftrightmargin) break; set_lineinfo(state, state->pos.row, NO_FORCE, DWL_ON, DHL_BOTTOM); break; - case '5': /* DECSWL */ + case '5': // DECSWL if(state->mode.leftrightmargin) break; set_lineinfo(state, state->pos.row, NO_FORCE, DWL_OFF, DHL_OFF); break; - case '6': /* DECDWL */ + case '6': // DECDWL if(state->mode.leftrightmargin) break; set_lineinfo(state, state->pos.row, NO_FORCE, DWL_ON, DHL_OFF); break; - case '8': /* DECALN */ + case '8': // DECALN { VTermPos pos; uint32_t E[] = { 'E', 0 }; @@ -637,7 +637,7 @@ static int on_escape(const char *bytes, } return 2; - case '(': case ')': case '*': case '+': /* SCS */ + case '(': case ')': case '*': case '+': // SCS if(len != 2) return 0; @@ -655,26 +655,26 @@ static int on_escape(const char *bytes, return 2; - case '7': /* DECSC */ + case '7': // DECSC savecursor(state, 1); return 1; - case '8': /* DECRC */ + case '8': // DECRC savecursor(state, 0); return 1; - case '<': /* Ignored by VT100. Used in VT52 mode to switch up to VT100 */ + case '<': // Ignored by VT100. Used in VT52 mode to switch up to VT100 return 1; - case '=': /* DECKPAM */ + case '=': // DECKPAM state->mode.keypad = 1; return 1; - case '>': /* DECKPNM */ + case '>': // DECKPNM state->mode.keypad = 0; return 1; - case 'c': /* RIS - ECMA-48 8.3.105 */ + case 'c': // RIS - ECMA-48 8.3.105 { VTermPos oldpos = state->pos; vterm_state_reset(state, 1); @@ -683,23 +683,23 @@ static int on_escape(const char *bytes, return 1; } - case 'n': /* LS2 - ECMA-48 8.3.78 */ + case 'n': // LS2 - ECMA-48 8.3.78 state->gl_set = 2; return 1; - case 'o': /* LS3 - ECMA-48 8.3.80 */ + case 'o': // LS3 - ECMA-48 8.3.80 state->gl_set = 3; return 1; - case '~': /* LS1R - ECMA-48 8.3.77 */ + case '~': // LS1R - ECMA-48 8.3.77 state->gr_set = 1; return 1; - case '}': /* LS2R - ECMA-48 8.3.79 */ + case '}': // LS2R - ECMA-48 8.3.79 state->gr_set = 2; return 1; - case '|': /* LS3R - ECMA-48 8.3.81 */ + case '|': // LS3R - ECMA-48 8.3.81 state->gr_set = 3; return 1; @@ -711,11 +711,11 @@ static int on_escape(const char *bytes, static void set_mode(VTermState *state, int num, int val) { switch(num) { - case 4: /* IRM - ECMA-48 7.2.10 */ + case 4: // IRM - ECMA-48 7.2.10 state->mode.insert = val; break; - case 20: /* LNM - ANSI X3.4-1977 */ + case 20: // LNM - ANSI X3.4-1977 state->mode.newline = val; break; @@ -732,11 +732,11 @@ static void set_dec_mode(VTermState *sta state->mode.cursor = val; break; - case 5: /* DECSCNM - screen mode */ + case 5: // DECSCNM - screen mode settermprop_bool(state, VTERM_PROP_REVERSE, val); break; - case 6: /* DECOM - origin mode */ + case 6: // DECOM - origin mode { VTermPos oldpos = state->pos; state->mode.origin = val; @@ -758,13 +758,13 @@ static void set_dec_mode(VTermState *sta settermprop_bool(state, VTERM_PROP_CURSORVISIBLE, val); break; - case 69: /* DECVSSM - vertical split screen mode */ - /* DECLRMM - left/right margin mode */ + case 69: // DECVSSM - vertical split screen mode + // DECLRMM - left/right margin mode state->mode.leftrightmargin = val; if(val) { int row; - /* Setting DECVSSM must clear doublewidth/doubleheight state of every line */ + // Setting DECVSSM must clear doublewidth/doubleheight state of every line for(row = 0; row < state->rows; row++) set_lineinfo(state, row, FORCE, DWL_OFF, DHL_OFF); } @@ -911,7 +911,7 @@ static int on_csi(const char *leader, co int selective; if(leader && leader[0]) { - if(leader[1]) /* longer than 1 char */ + if(leader[1]) // longer than 1 char return 0; switch(leader[0]) { @@ -925,7 +925,7 @@ static int on_csi(const char *leader, co } if(intermed && intermed[0]) { - if(intermed[1]) /* longer than 1 char */ + if(intermed[1]) // longer than 1 char return 0; switch(intermed[0]) { @@ -949,7 +949,7 @@ static int on_csi(const char *leader, co #define INTERMED(i,b) ((i << 16) | b) switch(intermed_byte << 16 | leader_byte << 8 | command) { - case 0x40: /* ICH - ECMA-48 8.3.64 */ + case 0x40: // ICH - ECMA-48 8.3.64 count = CSI_ARG_COUNT(args[0]); if(!is_cursor_in_scrollregion(state)) @@ -967,54 +967,54 @@ static int on_csi(const char *leader, co break; - case 0x41: /* CUU - ECMA-48 8.3.22 */ + case 0x41: // CUU - ECMA-48 8.3.22 count = CSI_ARG_COUNT(args[0]); state->pos.row -= count; state->at_phantom = 0; break; - case 0x42: /* CUD - ECMA-48 8.3.19 */ + case 0x42: // CUD - ECMA-48 8.3.19 count = CSI_ARG_COUNT(args[0]); state->pos.row += count; state->at_phantom = 0; break; - case 0x43: /* CUF - ECMA-48 8.3.20 */ + case 0x43: // CUF - ECMA-48 8.3.20 count = CSI_ARG_COUNT(args[0]); state->pos.col += count; state->at_phantom = 0; break; - case 0x44: /* CUB - ECMA-48 8.3.18 */ + case 0x44: // CUB - ECMA-48 8.3.18 count = CSI_ARG_COUNT(args[0]); state->pos.col -= count; state->at_phantom = 0; break; - case 0x45: /* CNL - ECMA-48 8.3.12 */ + case 0x45: // CNL - ECMA-48 8.3.12 count = CSI_ARG_COUNT(args[0]); state->pos.col = 0; state->pos.row += count; state->at_phantom = 0; break; - case 0x46: /* CPL - ECMA-48 8.3.13 */ + case 0x46: // CPL - ECMA-48 8.3.13 count = CSI_ARG_COUNT(args[0]); state->pos.col = 0; state->pos.row -= count; state->at_phantom = 0; break; - case 0x47: /* CHA - ECMA-48 8.3.9 */ + case 0x47: // CHA - ECMA-48 8.3.9 val = CSI_ARG_OR(args[0], 1); state->pos.col = val-1; state->at_phantom = 0; break; - case 0x48: /* CUP - ECMA-48 8.3.21 */ + case 0x48: // CUP - ECMA-48 8.3.21 row = CSI_ARG_OR(args[0], 1); col = argcount < 2 || CSI_ARG_IS_MISSING(args[1]) ? 1 : CSI_ARG(args[1]); - /* zero-based */ + // zero-based state->pos.row = row-1; state->pos.col = col-1; if(state->mode.origin) { @@ -1024,13 +1024,13 @@ static int on_csi(const char *leader, co state->at_phantom = 0; break; - case 0x49: /* CHT - ECMA-48 8.3.10 */ + case 0x49: // CHT - ECMA-48 8.3.10 count = CSI_ARG_COUNT(args[0]); tab(state, count, +1); break; - case 0x4a: /* ED - ECMA-48 8.3.39 */ - case LEADER('?', 0x4a): /* DECSED - Selective Erase in Display */ + case 0x4a: // ED - ECMA-48 8.3.39 + case LEADER('?', 0x4a): // DECSED - Selective Erase in Display selective = (leader_byte == '?'); switch(CSI_ARG(args[0])) { case CSI_ARG_MISSING: @@ -1072,8 +1072,8 @@ static int on_csi(const char *leader, co } break; - case 0x4b: /* EL - ECMA-48 8.3.41 */ - case LEADER('?', 0x4b): /* DECSEL - Selective Erase in Line */ + case 0x4b: // EL - ECMA-48 8.3.41 + case LEADER('?', 0x4b): // DECSEL - Selective Erase in Line selective = (leader_byte == '?'); rect.start_row = state->pos.row; rect.end_row = state->pos.row + 1; @@ -1095,7 +1095,7 @@ static int on_csi(const char *leader, co break; - case 0x4c: /* IL - ECMA-48 8.3.67 */ + case 0x4c: // IL - ECMA-48 8.3.67 count = CSI_ARG_COUNT(args[0]); if(!is_cursor_in_scrollregion(state)) @@ -1110,7 +1110,7 @@ static int on_csi(const char *leader, co break; - case 0x4d: /* DL - ECMA-48 8.3.32 */ + case 0x4d: // DL - ECMA-48 8.3.32 count = CSI_ARG_COUNT(args[0]); if(!is_cursor_in_scrollregion(state)) @@ -1125,7 +1125,7 @@ static int on_csi(const char *leader, co break; - case 0x50: /* DCH - ECMA-48 8.3.26 */ + case 0x50: // DCH - ECMA-48 8.3.26 count = CSI_ARG_COUNT(args[0]); if(!is_cursor_in_scrollregion(state)) @@ -1143,7 +1143,7 @@ static int on_csi(const char *leader, co break; - case 0x53: /* SU - ECMA-48 8.3.147 */ + case 0x53: // SU - ECMA-48 8.3.147 count = CSI_ARG_COUNT(args[0]); rect.start_row = state->scrollregion_top; @@ -1155,7 +1155,7 @@ static int on_csi(const char *leader, co break; - case 0x54: /* SD - ECMA-48 8.3.113 */ + case 0x54: // SD - ECMA-48 8.3.113 count = CSI_ARG_COUNT(args[0]); rect.start_row = state->scrollregion_top; @@ -1167,7 +1167,7 @@ static int on_csi(const char *leader, co break; - case 0x58: /* ECH - ECMA-48 8.3.38 */ + case 0x58: // ECH - ECMA-48 8.3.38 count = CSI_ARG_COUNT(args[0]); rect.start_row = state->pos.row; @@ -1179,36 +1179,36 @@ static int on_csi(const char *leader, co erase(state, rect, 0); break; - case 0x5a: /* CBT - ECMA-48 8.3.7 */ + case 0x5a: // CBT - ECMA-48 8.3.7 count = CSI_ARG_COUNT(args[0]); tab(state, count, -1); break; - case 0x60: /* HPA - ECMA-48 8.3.57 */ + case 0x60: // HPA - ECMA-48 8.3.57 col = CSI_ARG_OR(args[0], 1); state->pos.col = col-1; state->at_phantom = 0; break; - case 0x61: /* HPR - ECMA-48 8.3.59 */ + case 0x61: // HPR - ECMA-48 8.3.59 count = CSI_ARG_COUNT(args[0]); state->pos.col += count; state->at_phantom = 0; break; - case 0x63: /* DA - ECMA-48 8.3.24 */ + case 0x63: // DA - ECMA-48 8.3.24 val = CSI_ARG_OR(args[0], 0); if(val == 0) - /* DEC VT100 response */ + // DEC VT100 response vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, "?1;2c"); break; - case LEADER('>', 0x63): /* DEC secondary Device Attributes */ - /* This returns xterm version number 100. */ + case LEADER('>', 0x63): // DEC secondary Device Attributes + // This returns xterm version number 100. vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, ">%d;%d;%dc", 0, 100, 0); break; - case 0x64: /* VPA - ECMA-48 8.3.158 */ + case 0x64: // VPA - ECMA-48 8.3.158 row = CSI_ARG_OR(args[0], 1); state->pos.row = row-1; if(state->mode.origin) @@ -1216,16 +1216,16 @@ static int on_csi(const char *leader, co state->at_phantom = 0; break; - case 0x65: /* VPR - ECMA-48 8.3.160 */ + case 0x65: // VPR - ECMA-48 8.3.160 count = CSI_ARG_COUNT(args[0]); state->pos.row += count; state->at_phantom = 0; break; - case 0x66: /* HVP - ECMA-48 8.3.63 */ + case 0x66: // HVP - ECMA-48 8.3.63 row = CSI_ARG_OR(args[0], 1); col = argcount < 2 || CSI_ARG_IS_MISSING(args[1]) ? 1 : CSI_ARG(args[1]); - /* zero-based */ + // zero-based state->pos.row = row-1; state->pos.col = col-1; if(state->mode.origin) { @@ -1235,7 +1235,7 @@ static int on_csi(const char *leader, co state->at_phantom = 0; break; - case 0x67: /* TBC - ECMA-48 8.3.154 */ + case 0x67: // TBC - ECMA-48 8.3.154 val = CSI_ARG_OR(args[0], 0); switch(val) { @@ -1257,44 +1257,44 @@ static int on_csi(const char *leader, co } break; - case 0x68: /* SM - ECMA-48 8.3.125 */ + case 0x68: // SM - ECMA-48 8.3.125 if(!CSI_ARG_IS_MISSING(args[0])) set_mode(state, CSI_ARG(args[0]), 1); break; - case LEADER('?', 0x68): /* DEC private mode set */ + case LEADER('?', 0x68): // DEC private mode set if(!CSI_ARG_IS_MISSING(args[0])) set_dec_mode(state, CSI_ARG(args[0]), 1); break; - case 0x6a: /* HPB - ECMA-48 8.3.58 */ + case 0x6a: // HPB - ECMA-48 8.3.58 count = CSI_ARG_COUNT(args[0]); state->pos.col -= count; state->at_phantom = 0; break; - case 0x6b: /* VPB - ECMA-48 8.3.159 */ + case 0x6b: // VPB - ECMA-48 8.3.159 count = CSI_ARG_COUNT(args[0]); state->pos.row -= count; state->at_phantom = 0; break; - case 0x6c: /* RM - ECMA-48 8.3.106 */ + case 0x6c: // RM - ECMA-48 8.3.106 if(!CSI_ARG_IS_MISSING(args[0])) set_mode(state, CSI_ARG(args[0]), 0); break; - case LEADER('?', 0x6c): /* DEC private mode reset */ + case LEADER('?', 0x6c): // DEC private mode reset if(!CSI_ARG_IS_MISSING(args[0])) set_dec_mode(state, CSI_ARG(args[0]), 0); break; - case 0x6d: /* SGR - ECMA-48 8.3.117 */ + case 0x6d: // SGR - ECMA-48 8.3.117 vterm_state_setpen(state, args, argcount); break; - case 0x6e: /* DSR - ECMA-48 8.3.35 */ - case LEADER('?', 0x6e): /* DECDSR */ + case 0x6e: // DSR - ECMA-48 8.3.35 + case LEADER('?', 0x6e): // DECDSR val = CSI_ARG_OR(args[0], 0); { @@ -1302,12 +1302,12 @@ static int on_csi(const char *leader, co switch(val) { case 0: case 1: case 2: case 3: case 4: - /* ignore - these are replies */ + // ignore - these are replies break; case 5: vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, "%s0n", qmark); break; - case 6: /* CPR - cursor position report */ + case 6: // CPR - cursor position report vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, "%s%d;%dR", qmark, state->pos.row + 1, state->pos.col + 1); break; } @@ -1315,7 +1315,7 @@ static int on_csi(const char *leader, co break; - case LEADER('!', 0x70): /* DECSTR - DEC soft terminal reset */ + case LEADER('!', 0x70): // DECSTR - DEC soft terminal reset vterm_state_reset(state, 0); break; @@ -1323,7 +1323,7 @@ static int on_csi(const char *leader, co request_dec_mode(state, CSI_ARG(args[0])); break; - case INTERMED(' ', 0x71): /* DECSCUSR - DEC set cursor shape */ + case INTERMED(' ', 0x71): // DECSCUSR - DEC set cursor shape val = CSI_ARG_OR(args[0], 1); switch(val) { @@ -1355,7 +1355,7 @@ static int on_csi(const char *leader, co break; - case INTERMED('"', 0x71): /* DECSCA - DEC select character protection attribute */ + case INTERMED('"', 0x71): // DECSCA - DEC select character protection attribute val = CSI_ARG_OR(args[0], 0); switch(val) { @@ -1369,7 +1369,7 @@ static int on_csi(const char *leader, co break; - case 0x72: /* DECSTBM - DEC custom */ + case 0x72: // DECSTBM - DEC custom state->scrollregion_top = CSI_ARG_OR(args[0], 1) - 1; state->scrollregion_bottom = argcount < 2 || CSI_ARG_IS_MISSING(args[1]) ? -1 : CSI_ARG(args[1]); LBOUND(state->scrollregion_top, 0); @@ -1381,15 +1381,15 @@ static int on_csi(const char *leader, co UBOUND(state->scrollregion_bottom, state->rows); if(SCROLLREGION_BOTTOM(state) <= state->scrollregion_top) { - /* Invalid */ + // Invalid state->scrollregion_top = 0; state->scrollregion_bottom = -1; } break; - case 0x73: /* DECSLRM - DEC custom */ - /* Always allow setting these margins, just they won't take effect without DECVSSM */ + case 0x73: // DECSLRM - DEC custom + // Always allow setting these margins, just they won't take effect without DECVSSM state->scrollregion_left = CSI_ARG_OR(args[0], 1) - 1; state->scrollregion_right = argcount < 2 || CSI_ARG_IS_MISSING(args[1]) ? -1 : CSI_ARG(args[1]); LBOUND(state->scrollregion_left, 0); @@ -1402,7 +1402,7 @@ static int on_csi(const char *leader, co if(state->scrollregion_right > -1 && state->scrollregion_right <= state->scrollregion_left) { - /* Invalid */ + // Invalid state->scrollregion_left = 0; state->scrollregion_right = -1; } @@ -1417,7 +1417,7 @@ static int on_csi(const char *leader, co } break; - case INTERMED('\'', 0x7D): /* DECIC */ + case INTERMED('\'', 0x7D): // DECIC count = CSI_ARG_COUNT(args[0]); if(!is_cursor_in_scrollregion(state)) @@ -1432,7 +1432,7 @@ static int on_csi(const char *leader, co break; - case INTERMED('\'', 0x7E): /* DECDC */ + case INTERMED('\'', 0x7E): // DECDC count = CSI_ARG_COUNT(args[0]); if(!is_cursor_in_scrollregion(state)) @@ -1545,7 +1545,7 @@ static void request_status_string(VTermS { if(cmdlen == 1) switch(command[0]) { - case 'm': /* Query SGR */ + case 'm': // Query SGR { long args[20]; int argc = vterm_state_getpen(state, args, sizeof(args)/sizeof(args[0])); @@ -1561,10 +1561,10 @@ static void request_status_string(VTermS vterm_push_output_sprintf_ctrl(state->vt, C1_ST, ""); } return; - case 'r': /* Query DECSTBM */ + case 'r': // Query DECSTBM vterm_push_output_sprintf_dcs(state->vt, "1$r%d;%dr", state->scrollregion_top+1, SCROLLREGION_BOTTOM(state)); return; - case 's': /* Query DECSLRM */ + case 's': // Query DECSLRM vterm_push_output_sprintf_dcs(state->vt, "1$r%d;%ds", SCROLLREGION_LEFT(state)+1, SCROLLREGION_RIGHT(state)); return; } @@ -1779,7 +1779,7 @@ void vterm_state_reset(VTermState *state state->protected_cell = 0; - /* Initialise the props */ + // Initialise the props settermprop_bool(state, VTERM_PROP_CURSORVISIBLE, 1); settermprop_bool(state, VTERM_PROP_CURSORBLINK, 1); settermprop_int (state, VTERM_PROP_CURSORSHAPE, VTERM_PROP_CURSORSHAPE_BLOCK); @@ -1859,7 +1859,7 @@ int vterm_state_set_termprop(VTermState case VTERM_PROP_TITLE: case VTERM_PROP_ICONNAME: case VTERM_PROP_CURSORCOLOR: - /* we don't store these, just transparently pass through */ + // we don't store these, just transparently pass through return 1; case VTERM_PROP_CURSORVISIBLE: state->mode.cursor_visible = val->boolean;