Patch 8.2.0778
Problem:    Libvterm code lags behind the upstream version.
Solution:   Include revisions 720 - 723.
Files:      src/libvterm/t/10state_putglyph.test, src/libvterm/Makefile,
            src/libvterm/t/run-test.pl, src/libvterm/src/state.c,
            src/libvterm/t/92lp1805050.test


*** ../vim-8.2.0777/src/libvterm/t/10state_putglyph.test        2018-03-25 
14:54:41.000000000 +0200
--- src/libvterm/t/10state_putglyph.test        2020-05-17 15:50:36.583242095 
+0200
***************
*** 30,35 ****
--- 30,42 ----
    putglyph 0xff10 2 0,0
    putglyph 0x20 1 0,2
  
+ !UTF-8 emoji wide char
+ # U+1F600 = 0xF0 0x9F 0x98 0x80  name: GRINNING FACE
+ RESET
+ PUSH "\xF0\x9F\x98\x80 "
+   putglyph 0x1f600 2 0,0
+   putglyph 0x20 1 0,2
+ 
  !UTF-8 combining chars
  # U+0301 = 0xCC 0x81  name: COMBINING ACUTE
  RESET
*** ../vim-8.2.0777/src/libvterm/Makefile       2020-05-17 14:59:24.063410405 
+0200
--- src/libvterm/Makefile       2020-05-17 15:52:35.958886721 +0200
***************
*** 118,124 ****
        mkdir __distdir
        cp LICENSE __distdir
        mkdir __distdir/src
!       cp src/*.c src/*.h __distdir/src
        mkdir __distdir/src/encoding
        cp src/encoding/*.inc __distdir/src/encoding
        mkdir __distdir/include
--- 118,124 ----
        mkdir __distdir
        cp LICENSE __distdir
        mkdir __distdir/src
!       cp src/*.c src/*.h src/*.inc __distdir/src
        mkdir __distdir/src/encoding
        cp src/encoding/*.inc __distdir/src/encoding
        mkdir __distdir/include
*** ../vim-8.2.0777/src/libvterm/t/run-test.pl  2019-08-18 20:58:44.000000000 
+0200
--- src/libvterm/t/run-test.pl  2020-05-17 15:54:04.146624080 +0200
***************
*** 8,21 ****
  use POSIX qw( WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG );
  
  my $VALGRIND = 0;
  GetOptions(
     'valgrind|v+' => \$VALGRIND,
  ) or exit 1;
  
  my ( $hin, $hout, $hpid );
  {
     local $ENV{LD_LIBRARY_PATH} = ".libs";
!    my @command = "t/.libs/harness";
     unshift @command, "valgrind", "--tool=memcheck", "--leak-check=yes", 
"--num-callers=25", "--log-file=valgrind.out", "--error-exitcode=126" if 
$VALGRIND;
  
     $hpid = open2 $hout, $hin, @command or die "Cannot open2 harness - $!";
--- 8,23 ----
  use POSIX qw( WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG );
  
  my $VALGRIND = 0;
+ my $EXECUTABLE = "t/.libs/harness";
  GetOptions(
     'valgrind|v+' => \$VALGRIND,
+    'executable|e=s' => \$EXECUTABLE
  ) or exit 1;
  
  my ( $hin, $hout, $hpid );
  {
     local $ENV{LD_LIBRARY_PATH} = ".libs";
!    my @command = $EXECUTABLE;
     unshift @command, "valgrind", "--tool=memcheck", "--leak-check=yes", 
"--num-callers=25", "--log-file=valgrind.out", "--error-exitcode=126" if 
$VALGRIND;
  
     $hpid = open2 $hout, $hin, @command or die "Cannot open2 harness - $!";
*** ../vim-8.2.0777/src/libvterm/src/state.c    2019-10-10 20:13:41.000000000 
+0200
--- src/libvterm/src/state.c    2020-05-17 15:57:57.969932943 +0200
***************
*** 922,927 ****
--- 922,928 ----
    VTermState *state = user;
    int leader_byte = 0;
    int intermed_byte = 0;
+   int cancel_phantom = 1;
    VTermPos oldpos = state->pos;
    int handled = 1;
  
***************
*** 1237,1242 ****
--- 1238,1261 ----
      state->at_phantom = 0;
      break;
  
+   case 0x62: { // REP - ECMA-48 8.3.103
+     const int row_width = THISROWWIDTH(state);
+     count = CSI_ARG_COUNT(args[0]);
+     col = state->pos.col + count;
+     UBOUND(col, row_width);
+     while (state->pos.col < col) {
+       putglyph(state, state->combine_chars, state->combine_width, state->pos);
+       state->pos.col += state->combine_width;
+     }
+     if (state->pos.col + state->combine_width >= row_width) {
+       if (state->mode.autowrap) {
+         state->at_phantom = 1;
+         cancel_phantom = 0;
+       }
+     }
+     break;
+   }
+ 
    case 0x63: // DA - ECMA-48 8.3.24
      val = CSI_ARG_OR(args[0], 0);
      if(val == 0)
***************
*** 1523,1529 ****
      UBOUND(state->pos.col, THISROWWIDTH(state)-1);
    }
  
!   updatecursor(state, &oldpos, 1);
  
  #ifdef DEBUG
    if(state->pos.row < 0 || state->pos.row >= state->rows ||
--- 1542,1548 ----
      UBOUND(state->pos.col, THISROWWIDTH(state)-1);
    }
  
!   updatecursor(state, &oldpos, cancel_phantom);
  
  #ifdef DEBUG
    if(state->pos.row < 0 || state->pos.row >= state->rows ||
*** ../vim-8.2.0777/src/libvterm/t/92lp1805050.test     2020-05-17 
16:02:59.973046864 +0200
--- src/libvterm/t/92lp1805050.test     2020-05-17 15:55:34.414356523 +0200
***************
*** 0 ****
--- 1,128 ----
+ INIT
+ UTF8 1
+ WANTSTATE g
+ 
+ !REP no argument
+ RESET
+ PUSH "a\e[b"
+   putglyph 0x61 1 0,0
+   putglyph 0x61 1 0,1
+ 
+ !REP zero (zero should be interpreted as one)
+ RESET
+ PUSH "a\e[0b"
+   putglyph 0x61 1 0,0
+   putglyph 0x61 1 0,1
+ 
+ !REP lowercase a times two
+ RESET
+ PUSH "a\e[2b"
+   putglyph 0x61 1 0,0
+   putglyph 0x61 1 0,1
+   putglyph 0x61 1 0,2
+ 
+ !REP with UTF-8 1 char
+ # U+00E9 = 0xC3 0xA9  name: LATIN SMALL LETTER E WITH ACUTE
+ RESET
+ PUSH "\xC3\xA9\e[b"
+   putglyph 0xe9 1 0,0
+   putglyph 0xe9 1 0,1
+ 
+ !REP with UTF-8 wide char
+ # U+00E9 = 0xC3 0xA9  name: LATIN SMALL LETTER E WITH ACUTE
+ RESET
+ PUSH "\xEF\xBC\x90\e[b"
+   putglyph 0xff10 2 0,0
+   putglyph 0xff10 2 0,2
+ 
+ !REP with UTF-8 combining character
+ RESET
+ PUSH "e\xCC\x81\e[b"
+   putglyph 0x65,0x301 1 0,0
+   putglyph 0x65,0x301 1 0,1
+ 
+ !REP till end of line
+ RESET
+ PUSH "a\e[1000bb"
+   putglyph 0x61 1 0,0
+   putglyph 0x61 1 0,1
+   putglyph 0x61 1 0,2
+   putglyph 0x61 1 0,3
+   putglyph 0x61 1 0,4
+   putglyph 0x61 1 0,5
+   putglyph 0x61 1 0,6
+   putglyph 0x61 1 0,7
+   putglyph 0x61 1 0,8
+   putglyph 0x61 1 0,9
+   putglyph 0x61 1 0,10
+   putglyph 0x61 1 0,11
+   putglyph 0x61 1 0,12
+   putglyph 0x61 1 0,13
+   putglyph 0x61 1 0,14
+   putglyph 0x61 1 0,15
+   putglyph 0x61 1 0,16
+   putglyph 0x61 1 0,17
+   putglyph 0x61 1 0,18
+   putglyph 0x61 1 0,19
+   putglyph 0x61 1 0,20
+   putglyph 0x61 1 0,21
+   putglyph 0x61 1 0,22
+   putglyph 0x61 1 0,23
+   putglyph 0x61 1 0,24
+   putglyph 0x61 1 0,25
+   putglyph 0x61 1 0,26
+   putglyph 0x61 1 0,27
+   putglyph 0x61 1 0,28
+   putglyph 0x61 1 0,29
+   putglyph 0x61 1 0,30
+   putglyph 0x61 1 0,31
+   putglyph 0x61 1 0,32
+   putglyph 0x61 1 0,33
+   putglyph 0x61 1 0,34
+   putglyph 0x61 1 0,35
+   putglyph 0x61 1 0,36
+   putglyph 0x61 1 0,37
+   putglyph 0x61 1 0,38
+   putglyph 0x61 1 0,39
+   putglyph 0x61 1 0,40
+   putglyph 0x61 1 0,41
+   putglyph 0x61 1 0,42
+   putglyph 0x61 1 0,43
+   putglyph 0x61 1 0,44
+   putglyph 0x61 1 0,45
+   putglyph 0x61 1 0,46
+   putglyph 0x61 1 0,47
+   putglyph 0x61 1 0,48
+   putglyph 0x61 1 0,49
+   putglyph 0x61 1 0,50
+   putglyph 0x61 1 0,51
+   putglyph 0x61 1 0,52
+   putglyph 0x61 1 0,53
+   putglyph 0x61 1 0,54
+   putglyph 0x61 1 0,55
+   putglyph 0x61 1 0,56
+   putglyph 0x61 1 0,57
+   putglyph 0x61 1 0,58
+   putglyph 0x61 1 0,59
+   putglyph 0x61 1 0,60
+   putglyph 0x61 1 0,61
+   putglyph 0x61 1 0,62
+   putglyph 0x61 1 0,63
+   putglyph 0x61 1 0,64
+   putglyph 0x61 1 0,65
+   putglyph 0x61 1 0,66
+   putglyph 0x61 1 0,67
+   putglyph 0x61 1 0,68
+   putglyph 0x61 1 0,69
+   putglyph 0x61 1 0,70
+   putglyph 0x61 1 0,71
+   putglyph 0x61 1 0,72
+   putglyph 0x61 1 0,73
+   putglyph 0x61 1 0,74
+   putglyph 0x61 1 0,75
+   putglyph 0x61 1 0,76
+   putglyph 0x61 1 0,77
+   putglyph 0x61 1 0,78
+   putglyph 0x61 1 0,79
+   putglyph 0x62 1 1,0
+ 
*** ../vim-8.2.0777/src/version.c       2020-05-17 15:09:23.233533264 +0200
--- src/version.c       2020-05-17 15:51:15.367127949 +0200
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     778,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
117. You are more comfortable typing in html.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202005171405.04HE5G79005348%40masaka.moolenaar.net.

Raspunde prin e-mail lui