Merge remote-tracking branch 'vim/master'

This commit is contained in:
Kazuki Sakamoto
2018-08-05 18:57:58 -07:00
7 changed files with 41 additions and 14 deletions
+3
View File
@@ -7690,6 +7690,9 @@ $as_echo "$rubyhdrdir" >&6; }
if test "$enable_rubyinterp" = "dynamic"; then
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
if test -z "$libruby_soname"; then
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
fi
$as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
+1 -1
View File
@@ -4239,7 +4239,7 @@ build_stl_str_hl(
#ifdef FEAT_EVAL
vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
set_internal_string_var((char_u *)"actual_curbuf", tmp);
set_internal_string_var((char_u *)"g:actual_curbuf", tmp);
save_curbuf = curbuf;
save_curwin = curwin;
+3
View File
@@ -2020,6 +2020,9 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
AC_DEFINE(FEAT_RUBY)
if test "$enable_rubyinterp" = "dynamic"; then
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_ALIASES']].split[[0]]"`
if test -z "$libruby_soname"; then
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_SO']]"`
fi
AC_DEFINE(DYNAMIC_RUBY)
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
RUBY_LIBS=
+6 -13
View File
@@ -253,11 +253,12 @@ static void ruby_vim_init(void);
# define rb_hash_new dll_rb_hash_new
# define rb_inspect dll_rb_inspect
# define rb_int2inum dll_rb_int2inum
# ifdef RUBY19_OR_LATER
# define rb_intern2 dll_rb_intern2
# else
# define rb_intern dll_rb_intern
# endif
// ruby.h may redefine rb_intern to use RUBY_CONST_ID_CACHE(), but that won't
// work. Not using the cache appears to be the best solution.
# undef rb_intern
# define rb_intern dll_rb_intern
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
# define rb_fix2int dll_rb_fix2int
@@ -392,11 +393,7 @@ static VALUE (*dll_rb_hash_aset) (VALUE, VALUE, VALUE);
static VALUE (*dll_rb_hash_new) (void);
static VALUE (*dll_rb_inspect) (VALUE);
static VALUE (*dll_rb_int2inum) (long);
# ifdef RUBY19_OR_LATER
static ID (*dll_rb_intern2) (const char*, long);
# else
static ID (*dll_rb_intern) (const char*);
# endif
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
static long (*dll_rb_fix2int) (VALUE);
static long (*dll_rb_num2int) (VALUE);
@@ -596,11 +593,7 @@ static struct
{"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
{"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
{"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
# ifdef RUBY19_OR_LATER
{"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
# else
{"rb_intern", (RUBY_PROC*)&dll_rb_intern},
# endif
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
{"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
{"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
+2
View File
@@ -529,6 +529,8 @@ term_start(
set_string_option_direct((char_u *)"buftype", -1,
(char_u *)"terminal", OPT_FREE|OPT_LOCAL, 0);
// Avoid that 'buftype' is reset when this buffer is entered.
curbuf->b_p_initialized = TRUE;
/* Mark the buffer as not modifiable. It can only be made modifiable after
* the job finished. */
+16
View File
@@ -1615,3 +1615,19 @@ func Test_zz2_terminal_guioptions_bang()
set guioptions&
call delete(filename)
endfunc
func Test_terminal_hidden()
if !has('unix')
return
endif
term ++hidden cat
let bnr = bufnr('$')
call assert_equal('terminal', getbufvar(bnr, '&buftype'))
exe 'sbuf ' . bnr
call assert_equal('terminal', &buftype)
call term_sendkeys(bnr, "asdf\<CR>")
call WaitForAssert({-> assert_match('asdf', term_getline(bnr, 2))})
call term_sendkeys(bnr, "\<C-D>")
call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))})
bwipe!
endfunc
+10
View File
@@ -809,6 +809,16 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
240,
/**/
239,
/**/
238,
/**/
237,
/**/
236,
/**/
235,
/**/