Patch 8.0.1652
Problem: term_dumpwrite() does not output composing characters.
Solution: Use the cell index.
Files: src/terminal.c, src/testdir/test_terminal.vim
*** ../vim-8.0.1651/src/terminal.c 2018-03-26 21:38:45.196332620 +0200
--- src/terminal.c 2018-03-29 17:21:33.049215658 +0200
***************
*** 3573,3579 ****
for (i = 0; i < VTERM_MAX_CHARS_PER_CELL
&& cell.chars[i] != NUL; ++i)
{
! len = utf_char2bytes(cell.chars[0], charbuf);
fwrite(charbuf, len, 1, fd);
}
}
--- 3573,3579 ----
for (i = 0; i < VTERM_MAX_CHARS_PER_CELL
&& cell.chars[i] != NUL; ++i)
{
! len = utf_char2bytes(cell.chars[i], charbuf);
fwrite(charbuf, len, 1, fd);
}
}
*** ../vim-8.0.1651/src/testdir/test_terminal.vim 2018-03-29
16:36:32.565685046 +0200
--- src/testdir/test_terminal.vim 2018-03-29 17:20:53.849417884 +0200
***************
*** 978,983 ****
--- 978,1005 ----
call assert_equal(':popup PopUp :',
trim(getline(a:off + 20)))
endfunc
+ func Test_terminal_dumpwrite_composing()
+ if !CanRunVimInTerminal()
+ return
+ endif
+ let save_enc = &encoding
+ set encoding=utf-8
+ call assert_equal(1, winnr('$'))
+
+ let text = " a\u0300 e\u0302 o\u0308"
+ call writefile([text], 'Xcomposing')
+ let buf = RunVimInTerminal('Xcomposing', {})
+ call WaitFor({-> term_getline(buf, 1) =~ text})
+ call term_dumpwrite(buf, 'Xdump')
+ let dumpline = readfile('Xdump')[0]
+ call assert_match('|à| |ê| |ö', dumpline)
+
+ call StopVimInTerminal(buf)
+ call delete('Xcomposing')
+ call delete('Xdump')
+ let &encoding = save_enc
+ endfunc
+
" just testing basic functionality.
func Test_terminal_dumpload()
call assert_equal(1, winnr('$'))
*** ../vim-8.0.1651/src/version.c 2018-03-29 16:36:32.565685046 +0200
--- src/version.c 2018-03-29 16:55:14.225036509 +0200
***************
*** 764,765 ****
--- 764,767 ----
{ /* Add new patch number below this line */
+ /**/
+ 1652,
/**/
--
>From "know your smileys":
;-0 Can't find shift key
,-9 Kann Umschalttaste nicht finden
/// Bram Moolenaar -- [email protected] -- 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 [email protected].
For more options, visit https://groups.google.com/d/optout.