To: vim_dev@googlegroups.com Subject: Patch 8.1.0387 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0387 Problem: No test for 'ambiwidth' detection. Solution: Add a test. Files: src/testdir/test_startup_utf8.vim *** ../vim-8.1.0386/src/testdir/test_startup_utf8.vim 2016-08-09 22:02:09.000000000 +0200 --- src/testdir/test_startup_utf8.vim 2018-09-13 20:43:32.424363080 +0200 *************** *** 4,9 **** --- 4,10 ---- endif source shared.vim + source screendump.vim func Test_read_stdin_utf8() let linesin = ['テスト', '€ÀÈÌÒÙ'] *************** *** 62,64 **** --- 63,86 ---- call delete('Xtestout') call delete('Xtestin') endfunc + + func Test_detect_ambiwidth() + if !CanRunVimInTerminal() + return + endif + + " Use the title termcap entries to output the escape sequence. + call writefile([ + \ 'set enc=utf-8', + \ 'set ambiwidth=double', + \ 'call test_option_not_set("ambiwidth")', + \ 'redraw', + \ ], 'Xscript') + let buf = RunVimInTerminal('-S Xscript', {}) + call term_wait(buf) + call term_sendkeys(buf, "S\=&ambiwidth\\") + call WaitForAssert({-> assert_match('single', term_getline(buf, 1))}) + + call StopVimInTerminal(buf) + call delete('Xscript') + endfunc *** ../vim-8.1.0386/src/version.c 2018-09-13 20:31:47.103018229 +0200 --- src/version.c 2018-09-13 20:44:22.175933419 +0200 *************** *** 796,797 **** --- 796,799 ---- { /* Add new patch number below this line */ + /**/ + 387, /**/ -- hundred-and-one symptoms of being an internet addict: 45. You buy a Captain Kirk chair with a built-in keyboard and mouse. /// Bram Moolenaar -- Bram@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 ///