Skip to content

Commit 60c26e0

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents c7d7373 + 3cb4448 commit 60c26e0

File tree

7 files changed

+41
-14
lines changed

7 files changed

+41
-14
lines changed

src/auto/configure

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7690,6 +7690,9 @@ $as_echo "$rubyhdrdir" >&6; }
76907690

76917691
if test "$enable_rubyinterp" = "dynamic"; then
76927692
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
7693+
if test -z "$libruby_soname"; then
7694+
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
7695+
fi
76937696
$as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
76947697

76957698
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"

src/buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4239,7 +4239,7 @@ build_stl_str_hl(
42394239

42404240
#ifdef FEAT_EVAL
42414241
vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
4242-
set_internal_string_var((char_u *)"actual_curbuf", tmp);
4242+
set_internal_string_var((char_u *)"g:actual_curbuf", tmp);
42434243

42444244
save_curbuf = curbuf;
42454245
save_curwin = curwin;

src/configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,6 +2020,9 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
20202020
AC_DEFINE(FEAT_RUBY)
20212021
if test "$enable_rubyinterp" = "dynamic"; then
20222022
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_ALIASES']].split[[0]]"`
2023+
if test -z "$libruby_soname"; then
2024+
libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_SO']]"`
2025+
fi
20232026
AC_DEFINE(DYNAMIC_RUBY)
20242027
RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
20252028
RUBY_LIBS=

src/if_ruby.c

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,12 @@ static void ruby_vim_init(void);
253253
# define rb_hash_new dll_rb_hash_new
254254
# define rb_inspect dll_rb_inspect
255255
# define rb_int2inum dll_rb_int2inum
256-
# ifdef RUBY19_OR_LATER
257-
# define rb_intern2 dll_rb_intern2
258-
# else
259-
# define rb_intern dll_rb_intern
260-
# endif
256+
257+
// ruby.h may redefine rb_intern to use RUBY_CONST_ID_CACHE(), but that won't
258+
// work. Not using the cache appears to be the best solution.
259+
# undef rb_intern
260+
# define rb_intern dll_rb_intern
261+
261262
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
262263
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
263264
# define rb_fix2int dll_rb_fix2int
@@ -392,11 +393,7 @@ static VALUE (*dll_rb_hash_aset) (VALUE, VALUE, VALUE);
392393
static VALUE (*dll_rb_hash_new) (void);
393394
static VALUE (*dll_rb_inspect) (VALUE);
394395
static VALUE (*dll_rb_int2inum) (long);
395-
# ifdef RUBY19_OR_LATER
396-
static ID (*dll_rb_intern2) (const char*, long);
397-
# else
398396
static ID (*dll_rb_intern) (const char*);
399-
# endif
400397
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
401398
static long (*dll_rb_fix2int) (VALUE);
402399
static long (*dll_rb_num2int) (VALUE);
@@ -596,11 +593,7 @@ static struct
596593
{"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
597594
{"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
598595
{"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
599-
# ifdef RUBY19_OR_LATER
600-
{"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
601-
# else
602596
{"rb_intern", (RUBY_PROC*)&dll_rb_intern},
603-
# endif
604597
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
605598
{"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
606599
{"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},

src/terminal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,8 @@ term_start(
529529

530530
set_string_option_direct((char_u *)"buftype", -1,
531531
(char_u *)"terminal", OPT_FREE|OPT_LOCAL, 0);
532+
// Avoid that 'buftype' is reset when this buffer is entered.
533+
curbuf->b_p_initialized = TRUE;
532534

533535
/* Mark the buffer as not modifiable. It can only be made modifiable after
534536
* the job finished. */

src/testdir/test_terminal.vim

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,3 +1615,19 @@ func Test_zz2_terminal_guioptions_bang()
16151615
set guioptions&
16161616
call delete(filename)
16171617
endfunc
1618+
1619+
func Test_terminal_hidden()
1620+
if !has('unix')
1621+
return
1622+
endif
1623+
term ++hidden cat
1624+
let bnr = bufnr('$')
1625+
call assert_equal('terminal', getbufvar(bnr, '&buftype'))
1626+
exe 'sbuf ' . bnr
1627+
call assert_equal('terminal', &buftype)
1628+
call term_sendkeys(bnr, "asdf\<CR>")
1629+
call WaitForAssert({-> assert_match('asdf', term_getline(bnr, 2))})
1630+
call term_sendkeys(bnr, "\<C-D>")
1631+
call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))})
1632+
bwipe!
1633+
endfunc

src/version.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,16 @@ static char *(features[]) =
809809

810810
static int included_patches[] =
811811
{ /* Add new patch number below this line */
812+
/**/
813+
240,
814+
/**/
815+
239,
816+
/**/
817+
238,
818+
/**/
819+
237,
820+
/**/
821+
236,
812822
/**/
813823
235,
814824
/**/

0 commit comments

Comments
 (0)