comparison src/libvterm/bin/unterm.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 811a12a78164
comparison
equal deleted inserted replaced
13769:804c3b21ce59 13770:2449b6ce1456
7 #include <unistd.h> 7 #include <unistd.h>
8 8
9 #include "vterm.h" 9 #include "vterm.h"
10 10
11 #define DEFINE_INLINES 11 #define DEFINE_INLINES
12 #include "../src/utf8.h" /* fill_utf8 */ 12 #include "../src/utf8.h" // fill_utf8
13 13
14 #define streq(a,b) (!strcmp(a,b)) 14 #define streq(a,b) (!strcmp(a,b))
15 15
16 static VTerm *vt; 16 static VTerm *vt;
17 static VTermScreen *vts; 17 static VTermScreen *vts;
19 static int cols; 19 static int cols;
20 static int rows; 20 static int rows;
21 21
22 static enum { 22 static enum {
23 FORMAT_PLAIN, 23 FORMAT_PLAIN,
24 FORMAT_SGR 24 FORMAT_SGR,
25 } format = FORMAT_PLAIN; 25 } format = FORMAT_PLAIN;
26 26
27 static int col2index(VTermColor target) 27 static int col2index(VTermColor target)
28 { 28 {
29 int index; 29 int index;
42 switch(format) { 42 switch(format) {
43 case FORMAT_PLAIN: 43 case FORMAT_PLAIN:
44 break; 44 break;
45 case FORMAT_SGR: 45 case FORMAT_SGR:
46 { 46 {
47 /* If all 7 attributes change, that means 7 SGRs max */ 47 // If all 7 attributes change, that means 7 SGRs max
48 /* Each colour could consume up to 3 */ 48 // Each colour could consume up to 3
49 int sgr[7 + 2*3]; int sgri = 0; 49 int sgr[7 + 2*3]; int sgri = 0;
50 50
51 if(!prevcell->attrs.bold && cell->attrs.bold) 51 if(!prevcell->attrs.bold && cell->attrs.bold)
52 sgr[sgri++] = 1; 52 sgr[sgri++] = 1;
53 if(prevcell->attrs.bold && !cell->attrs.bold) 53 if(prevcell->attrs.bold && !cell->attrs.bold)