Compare commits

...

14 Commits

Author SHA1 Message Date
Bram Moolenaar
9b73a78ed7 updated for version 7.2.398
Problem:    When moving windows the cursor ends up in the wrong line.
Solution:   Set the window width and height properly. (Lech Lorens)
2010-03-17 16:54:57 +01:00
Bram Moolenaar
08bb82e8c5 updated for version 7.2.397
Problem:    Redundant check for w_lines_valid.
Solution:   Remove the if.  (Lech Lorens)
2010-03-17 16:45:12 +01:00
Bram Moolenaar
9c27fc3dba updated for version 7.2.396
Problem:    Get E38 errors. (Dasn)
Solution:   Set cursor to line 1 instead of 0. (Dominique Pelle)
2010-03-17 14:48:24 +01:00
Bram Moolenaar
97e7a84b6d updated for version 7.2.395
Problem:    In help CTRL=] on g?g? escapes the ?, causing it to fail. (Tony
            Mechelynck)
Solution:   Don't escape ? for a help command. (Sergey Khorev)
2010-03-17 13:07:08 +01:00
Bram Moolenaar
33cfa2b0ee updated for version 7.2.394
Problem:    .xz files are not supported.
Solution:   Recognize .xz files so that they can be edited.
2010-03-10 17:16:12 +01:00
Bram Moolenaar
595a7bee57 updated for version 7.2.393
Problem:    Mac: Can't build with different Xcode developer tools directory.
Solution:   make "Developer" directory name configurable. (Rainer Muller)
2010-03-10 16:28:12 +01:00
Bram Moolenaar
581f6dc94d updated for version 7.2.392
Problem:    Netbeans hangs reading from a socket at the maximum block size.
Solution:   Use select() or poll(). (Xavier de Gaye)
2010-03-10 16:12:48 +01:00
Bram Moolenaar
37d619f896 updated for version 7.2.391
Problem:    Internal alloc(0) error when doing "CTRL-V $ c". (Martti Kuparinen)
Solution:   Fix computations in getvcol(). (partly by Lech Lorens)
2010-03-10 14:46:26 +01:00
Bram Moolenaar
be678f86d1 updated for version 7.2.390
Problem:    In some situations the popup menu can be displayed wrong.
Solution:   Remove the popup menu if the cursor moved. (Lech Lorens)
2010-03-10 14:15:54 +01:00
Bram Moolenaar
12682fda7a updated for version 7.2.389
Problem:    synIDattr() cannot return the font.
Solution:   Support the "font" argument. (Christian Brabandt)
2010-03-10 13:43:49 +01:00
Bram Moolenaar
66ca320d9e updated for version 7.2.388
Problem:    Ruby with MingW still doesn't build all versions.
Solution:   Different approach to build file. (Sergey Khorev)
2010-03-10 13:20:40 +01:00
Bram Moolenaar
42d57f0017 updated for version 7.2.387
Problem:    Ruby with MingW still doesn't build all versions.
Solution:   More #ifdefs for the  Ruby code. (Sergey Khorev)
2010-03-10 12:47:00 +01:00
Bram Moolenaar
42624592cb updated for version 7.2.386
Problem:    Focus hack for KDE 3.1 causes problems for other window managers.
Solution:   Remove the hack. (forwarded by Joel Bradshaw)
2010-03-10 12:25:03 +01:00
Bram Moolenaar
f679a43dbb updated for version 7.2.385
Problem:    When in the command line window dragging status line only works
            for last-but-one window. (Jean Johner)
Solution:   Remove the code that disallows this.
2010-03-02 18:16:09 +01:00
22 changed files with 301 additions and 109 deletions

View File

@@ -5388,6 +5388,8 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
the color, cterm: color number as a string,
term: empty string)
"bg" background color (as with "fg")
"font" font name (only available in the GUI)
|highlight-font|
"sp" special color (as with "fg") |highlight-guisp|
"fg#" like "fg", but for the GUI and the GUI is
running the name in "#RRGGBB" form
@@ -5397,6 +5399,7 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
"italic" "1" if italic
"reverse" "1" if reverse
"inverse" "1" if inverse (= reverse)
"standout" "1" if standout
"underline" "1" if underlined
"undercurl" "1" if undercurled

View File

@@ -1,6 +1,6 @@
" Vim plugin for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2009 Jul 01
" Last Change: 2010 Mar 10
" Exit quickly when:
" - this plugin was already loaded
@@ -20,21 +20,25 @@ augroup gzip
"
" Set binary mode before reading the file.
" Use "gzip -d", gunzip isn't always available.
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma setlocal bin
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin
autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d")
autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d")
autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z")
autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z")
autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
autocmd FileAppendPre *.Z call gzip#appre("uncompress")
autocmd FileAppendPre *.lzma call gzip#appre("lzma -d")
autocmd FileAppendPre *.xz call gzip#appre("xz -d")
autocmd FileAppendPost *.gz call gzip#write("gzip")
autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
autocmd FileAppendPost *.Z call gzip#write("compress -f")
autocmd FileAppendPost *.lzma call gzip#write("lzma -z")
autocmd FileAppendPost *.xz call gzip#write("xz -z")
augroup END

View File

@@ -212,23 +212,25 @@ ifndef RUBY_VER_LONG
RUBY_VER_LONG = 1.6
endif
ifndef RUBY_PLATFORM
ifeq ($(RUBY_VER), 16)
ifndef RUBY_PLATFORM
RUBY_PLATFORM = i586-mswin32
endif
ifndef RUBY_INSTALL_NAME
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
endif
else ifneq ("X$(wildcard, $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32)", X)
RUBY_PLATFORM = i386-mingw32
else
ifndef RUBY_PLATFORM
RUBY_PLATFORM = i386-mswin32
endif
endif
ifndef RUBY_INSTALL_NAME
ifeq ($(RUBY_VER), 16)
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER)
else
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER)
endif
endif
RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
ifeq (no, $(DYNAMIC_RUBY))
RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
endif

76
src/auto/configure vendored
View File

@@ -718,6 +718,7 @@ EXNAME
VIMNAME
OS_EXTRA_OBJ
OS_EXTRA_SRC
XCODE_SELECT
CPP_MM
STRIP
AWK
@@ -774,6 +775,7 @@ ac_user_opts='
enable_option_checking
enable_darwin
with_mac_arch
with_developer_dir
with_local_dir
with_vim_name
with_ex_name
@@ -1492,6 +1494,7 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-mac-arch=ARCH current, intel, ppc or both
--with-developer-dir=PATH use PATH as location for Xcode developer tools
--with-local-dir=PATH search PATH instead of /usr/local for local libraries.
--without-local-dir do not search /usr/local for local libraries.
--with-vim-name=NAME what to call the Vim executable
@@ -3833,13 +3836,78 @@ $as_echo "defaulting to $MACARCH" >&6; }
fi
{ $as_echo "$as_me:$LINENO: checking --with-developer-dir argument" >&5
$as_echo_n "checking --with-developer-dir argument... " >&6; }
# Check whether --with-developer-dir was given.
if test "${with_developer_dir+set}" = set; then
withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5
$as_echo "$DEVELOPER_DIR" >&6; }
else
DEVELOPER_DIR=""; { $as_echo "$as_me:$LINENO: result: not present" >&5
$as_echo "not present" >&6; }
fi
if test "x$DEVELOPER_DIR" = "x"; then
# Extract the first word of "xcode-select", so it can be a program name with args.
set dummy xcode-select; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_XCODE_SELECT+set}" = set; then
$as_echo_n "(cached) " >&6
else
case $XCODE_SELECT in
[\\/]* | ?:[\\/]*)
ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
XCODE_SELECT=$ac_cv_path_XCODE_SELECT
if test -n "$XCODE_SELECT"; then
{ $as_echo "$as_me:$LINENO: result: $XCODE_SELECT" >&5
$as_echo "$XCODE_SELECT" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$XCODE_SELECT" != "x"; then
{ $as_echo "$as_me:$LINENO: checking for developer dir using xcode-select" >&5
$as_echo_n "checking for developer dir using xcode-select... " >&6; }
DEVELOPER_DIR=`$XCODE_SELECT -print-path`
{ $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5
$as_echo "$DEVELOPER_DIR" >&6; }
else
DEVELOPER_DIR=/Developer
fi
fi
if test "x$MACARCH" = "xboth"; then
{ $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5
$as_echo_n "checking for 10.4 universal SDK... " >&6; }
save_cppflags="$CPPFLAGS"
save_cflags="$CFLAGS"
save_ldflags="$LDFLAGS"
CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3960,9 +4028,9 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
if test "x$MACARCH" = "xboth"; then
CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
else
CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
@@ -17319,7 +17387,7 @@ $as_echo "no" >&6; }
fi
fi
if test "x$MACARCH" = "xboth"; then
LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
fi
DEPEND_CFLAGS_FILTER=

View File

@@ -1255,7 +1255,10 @@ getvcol(wp, pos, start, cursor, end)
vcol = 0;
ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
posptr = ptr + pos->col;
if (pos->col == MAXCOL)
posptr = NULL; /* continue until the NUL */
else
posptr = ptr + pos->col;
/*
* This function is used very often, do some speed optimizations.
@@ -1313,7 +1316,7 @@ getvcol(wp, pos, start, cursor, end)
incr = CHARSIZE(c);
}
if (ptr >= posptr) /* character at pos->col */
if (posptr != NULL && ptr >= posptr) /* character at pos->col */
break;
vcol += incr;
@@ -1334,7 +1337,7 @@ getvcol(wp, pos, start, cursor, end)
break;
}
if (ptr >= posptr) /* character at pos->col */
if (posptr != NULL && ptr >= posptr) /* character at pos->col */
break;
vcol += incr;

View File

@@ -116,6 +116,22 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
MACARCH="$withval"; AC_MSG_RESULT($MACARCH),
MACARCH="current"; AC_MSG_RESULT(defaulting to $MACARCH))
AC_MSG_CHECKING(--with-developer-dir argument)
AC_ARG_WITH(developer-dir, [ --with-developer-dir=PATH use PATH as location for Xcode developer tools],
DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR),
DEVELOPER_DIR=""; AC_MSG_RESULT(not present))
if test "x$DEVELOPER_DIR" = "x"; then
AC_PATH_PROG(XCODE_SELECT, xcode-select)
if test "x$XCODE_SELECT" != "x"; then
AC_MSG_CHECKING(for developer dir using xcode-select)
DEVELOPER_DIR=`$XCODE_SELECT -print-path`
AC_MSG_RESULT([$DEVELOPER_DIR])
else
DEVELOPER_DIR=/Developer
fi
fi
if test "x$MACARCH" = "xboth"; then
AC_MSG_CHECKING(for 10.4 universal SDK)
dnl There is a terrible inconsistency (but we appear to get away with it):
@@ -127,7 +143,7 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
save_cppflags="$CPPFLAGS"
save_cflags="$CFLAGS"
save_ldflags="$LDFLAGS"
CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
AC_TRY_LINK([ ], [ ],
AC_MSG_RESULT(found, will make universal binary),
@@ -157,9 +173,9 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
dnl TODO: use -arch i386 on Intel machines
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
if test "x$MACARCH" = "xboth"; then
CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
else
CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
fi
dnl If Carbon is found, assume we don't want X11
@@ -3233,7 +3249,7 @@ if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
fi
fi
if test "x$MACARCH" = "xboth"; then
LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
fi
dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to

View File

@@ -4684,6 +4684,7 @@ ins_complete(c)
int startcol = 0; /* column where searched text starts */
colnr_T curs_col; /* cursor column */
int n;
int save_w_wrow;
compl_direction = ins_compl_key2dir(c);
if (!compl_started)
@@ -5067,6 +5068,7 @@ ins_complete(c)
/*
* Find next match (and following matches).
*/
save_w_wrow = curwin->w_wrow;
n = ins_compl_next(TRUE, ins_compl_key2count(c), ins_compl_use_match(c));
/* may undisplay the popup menu */
@@ -5220,6 +5222,12 @@ ins_complete(c)
/* RedrawingDisabled may be set when invoked through complete(). */
n = RedrawingDisabled;
RedrawingDisabled = 0;
/* If the cursor moved we need to remove the pum first. */
setcursor();
if (save_w_wrow != curwin->w_wrow)
ins_compl_del_pum();
ins_compl_show_pum();
setcursor();
RedrawingDisabled = n;

View File

@@ -16627,7 +16627,7 @@ f_synIDattr(argvars, rettv)
p = highlight_has_attr(id, HL_BOLD, modec);
break;
case 'f': /* fg[#] */
case 'f': /* fg[#] or font */
p = highlight_color(id, what, modec);
break;

View File

@@ -1053,15 +1053,14 @@ find_wl_entry(win, lnum)
{
int i;
if (win->w_lines_valid > 0)
for (i = 0; i < win->w_lines_valid; ++i)
if (win->w_lines[i].wl_valid)
{
if (lnum < win->w_lines[i].wl_lnum)
return -1;
if (lnum <= win->w_lines[i].wl_lastlnum)
return i;
}
for (i = 0; i < win->w_lines_valid; ++i)
if (win->w_lines[i].wl_valid)
{
if (lnum < win->w_lines[i].wl_lnum)
return -1;
if (lnum <= win->w_lines[i].wl_lastlnum)
return i;
}
return -1;
}

View File

@@ -2313,19 +2313,6 @@ gui_mch_dialog(int type, /* type of dialog */
gtk_widget_destroy(dialog);
}
/* Terrible hack: When the text area still has focus when we remove the
* dialog, somehow gvim loses window focus. This is with "point to type"
* in the KDE 3.1 window manager. Warp the mouse pointer to outside the
* window and back to avoid that. */
if (!gui.in_focus)
{
int x, y;
gdk_window_get_pointer(gui.drawarea->window, &x, &y, NULL);
gui_mch_setmouse(-100, -100);
gui_mch_setmouse(x, y);
}
return response > 0 ? response : 0;
}

View File

@@ -39,8 +39,8 @@
# define rb_cTrueClass (*dll_rb_cTrueClass)
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
/*
* On ver 1.8, all Ruby functions are exported with "__declspce(dllimport)"
* in ruby.h. But it cause trouble for these variables, because it is
* On ver 1.8, all Ruby functions are exported with "__declspec(dllimport)"
* in ruby.h. But it causes trouble for these variables, because it is
* defined in this file. When defined this RUBY_EXPORT it modified to
* "extern" and be able to avoid this problem.
*/
@@ -53,6 +53,13 @@
# undef _WIN32_WINNT
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
/* Ruby 1.9 defines a number of static functions which use rb_num2long and
* rb_int2big */
# define rb_num2long rb_num2long_stub
# define rb_int2big rb_int2big_stub
#endif
#include <ruby.h>
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19
# include <ruby/encoding.h>
@@ -159,7 +166,14 @@ static void ruby_vim_init(void);
#define rb_str_concat dll_rb_str_concat
#define rb_str_new dll_rb_str_new
#define rb_str_new2 dll_rb_str_new2
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
# define rb_string_value_ptr dll_rb_string_value_ptr
# define rb_float_new dll_rb_float_new
# define rb_ary_new dll_rb_ary_new
# define rb_ary_push dll_rb_ary_push
#endif
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \
|| defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
# define rb_errinfo dll_rb_errinfo
#else
# define ruby_errinfo (*dll_ruby_errinfo)
@@ -226,7 +240,8 @@ static VALUE (*dll_rb_str_cat) (VALUE, const char*, long);
static VALUE (*dll_rb_str_concat) (VALUE, VALUE);
static VALUE (*dll_rb_str_new) (const char*, long);
static VALUE (*dll_rb_str_new2) (const char*);
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \
|| defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
static VALUE (*dll_rb_errinfo) (void);
#else
static VALUE *dll_ruby_errinfo;
@@ -235,6 +250,15 @@ static void (*dll_ruby_init) (void);
static void (*dll_ruby_init_loadpath) (void);
static void (*dll_NtInitialize) (int*, char***);
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static char * (*dll_rb_string_value_ptr) (volatile VALUE*);
static VALUE (*dll_rb_float_new) (double);
static VALUE (*dll_rb_ary_new) (void);
static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
#endif
@@ -246,6 +270,17 @@ static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*);
static VALUE (*dll_rb_sprintf) (const char*, ...);
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
static SIGNED_VALUE rb_num2long_stub(VALUE x)
{
return dll_rb_num2long(x);
}
static VALUE rb_int2big_stub(SIGNED_VALUE x)
{
return dll_rb_int2big(x);
}
#endif
static HINSTANCE hinstRuby = 0; /* Instance of ruby.dll */
/*
@@ -301,17 +336,33 @@ static struct
{"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat},
{"rb_str_new", (RUBY_PROC*)&dll_rb_str_new},
{"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2},
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \
|| defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
{"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo},
#else
{"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo},
#endif
{"ruby_init", (RUBY_PROC*)&dll_ruby_init},
{"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
{"NtInitialize", (RUBY_PROC*)&dll_NtInitialize},
{
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19
"NtInitialize",
#else
"ruby_sysinit",
#endif
(RUBY_PROC*)&dll_NtInitialize},
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
{"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr},
{"rb_float_new", (RUBY_PROC*)&dll_rb_float_new},
{"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new},
{"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push},
#endif
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
{"rb_int2big", (RUBY_PROC*)&dll_rb_int2big},
#endif
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19
{"ruby_script", (RUBY_PROC*)&dll_ruby_script},
{"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index},
@@ -569,7 +620,8 @@ static int ensure_ruby_initialized(void)
static void error_print(int state)
{
#ifndef DYNAMIC_RUBY
#if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19)
#if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19) \
&& !(defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19)
RUBYEXTERN VALUE ruby_errinfo;
#endif
#endif
@@ -605,7 +657,8 @@ static void error_print(int state)
break;
case TAG_RAISE:
case TAG_FATAL:
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19
#if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \
|| defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
eclass = CLASS_OF(rb_errinfo());
einfo = rb_obj_as_string(rb_errinfo());
#else

View File

@@ -21,21 +21,6 @@
# include <X11/Xatom.h>
# endif
# if defined(HAVE_SYS_SELECT_H) && \
(!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME))
# include <sys/select.h>
# endif
# ifndef HAVE_SELECT
# ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
# else
# ifdef HAVE_POLL_H
# include <poll.h>
# endif
# endif
# endif
/*
* This file provides procedures that implement the command server
* functionality of Vim when in contact with an X11 server.

View File

@@ -2113,12 +2113,12 @@ errorret:
if (buf->b_ml.ml_mfp == NULL) /* there are no lines */
return (char_u *)"";
/*
* See if it is the same line as requested last time.
* Otherwise may need to flush last used line.
* Don't use the last used line when 'swapfile' is reset, need to load all
* blocks.
*/
/*
* See if it is the same line as requested last time.
* Otherwise may need to flush last used line.
* Don't use the last used line when 'swapfile' is reset, need to load all
* blocks.
*/
if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release)
{
ml_flush_line(buf);

View File

@@ -735,6 +735,14 @@ messageFromNetbeans(gpointer clientData UNUSED,
int readlen = 0;
#ifndef FEAT_GUI_GTK
static int level = 0;
#endif
#ifdef HAVE_SELECT
struct timeval tval;
fd_set rfds;
#else
# ifdef HAVE_POLL
struct pollfd fds;
# endif
#endif
if (sd < 0)
@@ -755,9 +763,26 @@ messageFromNetbeans(gpointer clientData UNUSED,
return; /* out of memory! */
}
/* Keep on reading for as long as there is something to read. */
/* Keep on reading for as long as there is something to read.
* Use select() or poll() to avoid blocking on a message that is exactly
* MAXMSGSIZE long. */
for (;;)
{
#ifdef HAVE_SELECT
FD_ZERO(&rfds);
FD_SET(sd, &rfds);
tval.tv_sec = 0;
tval.tv_usec = 0;
if (select(sd + 1, &rfds, NULL, NULL, &tval) <= 0)
break;
#else
# ifdef HAVE_POLL
fds.fd = sd;
fds.events = POLLIN;
if (poll(&fds, 1, 0) <= 0)
break;
# endif
#endif
len = sock_read(sd, buf, MAXMSGSIZE);
if (len <= 0)
break; /* error or nothing more to read */

View File

@@ -5526,11 +5526,11 @@ nv_ident(cap)
break;
default:
tag_cmd = TRUE;
if (curbuf->b_help)
STRCPY(buf, "he! ");
else
{
tag_cmd = TRUE;
if (g_cmd)
STRCPY(buf, "tj ");
else

View File

@@ -28,11 +28,6 @@
# include <sys/wait.h>
# endif
# if defined(HAVE_SYS_SELECT_H) && \
(!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME))
# include <sys/select.h>
# endif
# ifndef WEXITSTATUS
# ifdef HAVE_UNION_WAIT
# define WEXITSTATUS(stat_val) ((stat_val).w_T.w_Retcode)
@@ -65,16 +60,6 @@
# include <string.h>
#endif
#ifndef HAVE_SELECT
# ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
# else
# ifdef HAVE_POLL_H
# include <poll.h>
# endif
# endif
#endif
#ifdef HAVE_SYS_STREAM_H
# include <sys/stream.h>
#endif

View File

@@ -640,7 +640,7 @@ pum_set_selected(n, repeat)
curbuf->b_changed = 0;
curbuf->b_p_ma = FALSE;
curwin->w_cursor.lnum = 0;
curwin->w_cursor.lnum = 1;
curwin->w_cursor.col = 0;
if (curwin != curwin_save && win_valid(curwin_save))

View File

@@ -8326,7 +8326,7 @@ highlight_has_attr(id, flag, modec)
char_u *
highlight_color(id, what, modec)
int id;
char_u *what; /* "fg", "bg", "sp", "fg#", "bg#" or "sp#" */
char_u *what; /* "font", "fg", "bg", "sp", "fg#", "bg#" or "sp#" */
int modec; /* 'g' for GUI, 'c' for cterm, 't' for term */
{
static char_u name[20];
@@ -8334,20 +8334,30 @@ highlight_color(id, what, modec)
int fg = FALSE;
# ifdef FEAT_GUI
int sp = FALSE;
int font = FALSE;
# endif
if (id <= 0 || id > highlight_ga.ga_len)
return NULL;
if (TOLOWER_ASC(what[0]) == 'f')
if (TOLOWER_ASC(what[0]) == 'f' && TOLOWER_ASC(what[1]) == 'g')
fg = TRUE;
# ifdef FEAT_GUI
else if (TOLOWER_ASC(what[0]) == 's')
else if (TOLOWER_ASC(what[0]) == 'f' && TOLOWER_ASC(what[1]) == 'o'
&& TOLOWER_ASC(what[2]) == 'n' && TOLOWER_ASC(what[3]) == 't')
font = TRUE;
else if (TOLOWER_ASC(what[0]) == 's' && TOLOWER_ASC(what[1]) == 'p')
sp = TRUE;
else if (!(TOLOWER_ASC(what[0]) == 'b' && TOLOWER_ASC(what[1]) == 'g'))
return NULL;
if (modec == 'g')
{
/* return font name */
if (font)
return HL_TABLE()[id - 1].sg_font_name;
/* return #RRGGBB form (only possible when GUI is running) */
if (gui.in_use && what[1] && what[2] == '#')
if (gui.in_use && what[2] == '#')
{
guicolor_T color;
long_u rgb;
@@ -8374,6 +8384,8 @@ highlight_color(id, what, modec)
return (HL_TABLE()[id - 1].sg_gui_sp_name);
return (HL_TABLE()[id - 1].sg_gui_bg_name);
}
if (font || sp)
return NULL;
# endif
if (modec == 'c')
{

View File

@@ -2598,14 +2598,7 @@ retnomove:
if (cmdwin_type != 0 && wp != curwin)
{
/* A click outside the command-line window: Use modeless
* selection if possible. Allow dragging the status line of
* windows just above the command-line window. */
if (wp->w_winrow + wp->w_height
!= curwin->w_prev->w_winrow + curwin->w_prev->w_height)
{
on_status_line = 0;
dragwin = NULL;
}
* selection if possible. Allow dragging the status lines. */
# ifdef FEAT_VERTSPLIT
on_sep_line = 0;
# endif

View File

@@ -681,6 +681,34 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
398,
/**/
397,
/**/
396,
/**/
395,
/**/
394,
/**/
393,
/**/
392,
/**/
391,
/**/
390,
/**/
389,
/**/
388,
/**/
387,
/**/
386,
/**/
385,
/**/
384,
/**/

View File

@@ -477,6 +477,23 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */
# include <stdarg.h>
#endif
# if defined(HAVE_SYS_SELECT_H) && \
(!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME))
# include <sys/select.h>
# endif
# ifndef HAVE_SELECT
# ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
# define HAVE_POLL
# else
# ifdef HAVE_POLL_H
# include <poll.h>
# define HAVE_POLL
# endif
# endif
# endif
/* ================ end of the header file puzzle =============== */
/*

View File

@@ -991,28 +991,28 @@ win_split_ins(size, flags, newwin, dir)
wp->w_p_scr = curwin->w_p_scr;
if (need_status)
{
--oldwin->w_height;
win_new_height(oldwin, oldwin->w_height - 1);
oldwin->w_status_height = need_status;
}
if (flags & (WSP_TOP | WSP_BOT))
{
/* set height and row of new window to full height */
wp->w_winrow = tabline_height();
wp->w_height = curfrp->fr_height - (p_ls > 0);
win_new_height(wp, curfrp->fr_height - (p_ls > 0));
wp->w_status_height = (p_ls > 0);
}
else
{
/* height and row of new window is same as current window */
wp->w_winrow = oldwin->w_winrow;
wp->w_height = oldwin->w_height;
win_new_height(wp, oldwin->w_height);
wp->w_status_height = oldwin->w_status_height;
}
frp->fr_height = curfrp->fr_height;
/* "new_size" of the current window goes to the new window, use
* one column for the vertical separator */
wp->w_width = new_size;
win_new_width(wp, new_size);
if (before)
wp->w_vsep_width = 1;
else
@@ -1049,13 +1049,13 @@ win_split_ins(size, flags, newwin, dir)
if (flags & (WSP_TOP | WSP_BOT))
{
wp->w_wincol = 0;
wp->w_width = Columns;
win_new_width(wp, Columns);
wp->w_vsep_width = 0;
}
else
{
wp->w_wincol = oldwin->w_wincol;
wp->w_width = oldwin->w_width;
win_new_width(wp, oldwin->w_width);
wp->w_vsep_width = oldwin->w_vsep_width;
}
frp->fr_width = curfrp->fr_width;
@@ -1111,7 +1111,7 @@ win_split_ins(size, flags, newwin, dir)
}
/*
* make the new window the current window and redraw
* equalize the window sizes.
*/
if (do_equal || dir != 0)
win_equal(wp, TRUE,
@@ -1143,6 +1143,10 @@ win_split_ins(size, flags, newwin, dir)
if (size != 0)
p_wh = size;
}
/*
* make the new window the current window
*/
win_enter(wp, FALSE);
#ifdef FEAT_VERTSPLIT
if (flags & WSP_VERT)