From b00fdf6eed5fec589a86655249a851c2d9ba3bb8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 21 Sep 2017 22:16:21 +0200 Subject: [PATCH 1/2] patch 8.0.1131: not easy to trigger an autocommand for new terminal window Problem: It is not easy to trigger an autocommand for new terminal window. (Marco Restelli) Solution: Trigger BufWinEnter after setting 'buftype'. --- src/testdir/test_terminal.vim | 4 ++++ src/version.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 17167e89ff..cff85a4593 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -34,7 +34,9 @@ func Stop_shell_in_terminal(buf) endfunc func Test_terminal_basic() + au BufWinEnter * if &buftype == 'terminal' | let b:done = 'yes' | endif let buf = Run_shell_in_terminal({}) + if has("unix") call assert_match('^/dev/', job_info(g:job).tty_out) call assert_match('^/dev/', term_gettty('')) @@ -43,6 +45,7 @@ func Test_terminal_basic() call assert_match('^\\\\.\\pipe\\', term_gettty('')) endif call assert_equal('t', mode()) + call assert_equal('yes', b:done) call assert_match('%aR[^\n]*running]', execute('ls')) call Stop_shell_in_terminal(buf) @@ -54,6 +57,7 @@ func Test_terminal_basic() close call assert_equal("", bufname(buf)) + au! BufWinEnter unlet g:job endfunc diff --git a/src/version.c b/src/version.c index 84dd7e7a8a..1ff5b3ef4b 100644 --- a/src/version.c +++ b/src/version.c @@ -761,6 +761,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1131, /**/ 1130, /**/ From fc7649f8b82efbb4c7066567dd69192d97a2749f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 21 Sep 2017 22:46:47 +0200 Subject: [PATCH 2/2] patch 8.0.1132: #if condition is not portable Problem: #if condition is not portable. Solution: Add defined(). (Zuloloxi, closes #2136) --- src/libvterm/src/vterm.c | 3 ++- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libvterm/src/vterm.c b/src/libvterm/src/vterm.c index b2a7240ffc..1789fb3563 100644 --- a/src/libvterm/src/vterm.c +++ b/src/libvterm/src/vterm.c @@ -130,7 +130,8 @@ static int outbuffer_is_full(VTerm *vt) return vt->outbuffer_cur >= vt->outbuffer_len - 1; } -#if _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE || _BSD_SOURCE +#if (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 500) \ + || defined(_ISOC99_SOURCE) || defined(_BSD_SOURCE) # undef VSNPRINTF # define VSNPRINTF vsnprintf #else diff --git a/src/version.c b/src/version.c index 1ff5b3ef4b..b90665e51f 100644 --- a/src/version.c +++ b/src/version.c @@ -761,6 +761,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1132, /**/ 1131, /**/