Compare commits

..

16 Commits

Author SHA1 Message Date
Bram Moolenaar
103e6efc84 updated for version 7.2.419
Problem:    Memory leak in Motif when clicking on "Search Vim Help".
Solution:   Free string returned by XmTextGetString(). (Dominique Pelle)
2010-05-13 16:31:25 +02:00
Bram Moolenaar
ccbab93b42 updated for version 7.2.418
Problem:    Vim tries to set the background or foreground color in a terminal
            to -1.  (Graywh)  Happens with ":hi Normal ctermbg=NONE".
Solution:   When resetting the foreground or background color don't set the
            color, let the clear screen code do that.
2010-05-13 15:40:30 +02:00
Bram Moolenaar
ae61bcf0ab updated for version 7.2.417
Problem:    When 'shell' has an argument with a slash then 'shellpipe' is not
            set properly. (Britton Kerin)
Solution:   Assume there are no spaces in the path, arguments follow.
2010-05-13 13:12:06 +02:00
Bram Moolenaar
0387e653c8 updated for version 7.2.416
Problem:    Logtalk.dict is not installed.
Solution:   Add it to the install target. (Markus Heidelberg)
2010-05-07 16:54:37 +02:00
Bram Moolenaar
ad249fb74c updated for version 7.2.415
Problem:    Win32: Can't open a remote file when starting Vim.
Solution:   Don't invoke cygwin_conv_path() for URLs. (Tomoya Adachi)
2010-05-07 16:35:04 +02:00
Bram Moolenaar
ceb45be4d3 updated for version 7.2.414
Problem:    CTRK-K <space> <space> does not produce 0xa0 as expected. (Tony
            Mechelynck)
Solution:   Remove the Unicode range 0xe000 - 0xefff from digraphs, these are
            not valid characters.
2010-05-07 16:18:14 +02:00
Bram Moolenaar
317fd3ae3b updated for version 7.2.413
Problem:    Large file support is incorrect.
Solution:   Add AC_SYS_LARGEFILE to configure. (James Vega)
2010-05-07 16:05:55 +02:00
Bram Moolenaar
5ea0ac77b3 updated for version 7.2.412
Problem:    [ or ] followed by mouse click doesn't work.
Solution:   Reverse check for key being a mouse event. (Dominique Pelle)
2010-05-07 15:52:08 +02:00
Bram Moolenaar
dfdf3c446f updated for version 7.2.411
Problem:    When parsing 'cino' a comma isn't skipped properly.
Solution:   Skip the comma. (Lech Lorens)
2010-03-23 18:22:46 +01:00
Bram Moolenaar
63fa526b50 updated for version 7.2.410
Problem:    Highlighting directories for completion doesn't work properly.
Solution:   Don't halve backslashes when not needed, expaned "~/".
            (Dominique Pelle)
2010-03-23 18:06:52 +01:00
Bram Moolenaar
d25bc23870 updated for version 7.2.409
Problem:    Summary of number of substitutes is incorrect for ":folddo". (Jean
            Johner)
Solution:   Reset sub_nsubs and sub_nlines in global_exe().
2010-03-23 17:49:24 +01:00
Bram Moolenaar
46475520d7 updated for version 7.2.408
Problem:    With ":g/the/s/foo/bar/" the '[ and '] marks can be set to a line
            that was not changed.
Solution:   Only set '[ and '] marks when a substitution was done.
2010-03-23 17:36:29 +01:00
Bram Moolenaar
06975a4a98 updated for version 7.2.407
Problem:    When using an expression in ":s" backslashes in the result are
            dropped. (Sergey Goldgaber, Christian Brabandt)
Solution:   Double backslashes.
2010-03-23 16:27:22 +01:00
Bram Moolenaar
70c49c1af4 updated for version 7.2.406
Problem:    Patch 7.2.119 introduces uninit mem read. (Dominique Pelle)
Solution:   Only used ScreeenLinesC when ScreeenLinesUC is not zero. (Yukihiro
            Nakadaira)  Also clear ScreeenLinesC when allocating.
2010-03-23 15:36:35 +01:00
Bram Moolenaar
53339b2877 updated for version 7.2.405
Problem:    When built with small features the matching text is not
            highlighted for ":s/pat/repl/c".
Solution:   Remove the #ifdef for IncSearch. (James Vega)
2010-03-23 14:39:12 +01:00
Bram Moolenaar
216b71069a updated for version 7.2.404
Problem:    Pointers for composing characters are not properly initialized.
Solution:   Compute the size of the pointer, not what it points to. (Yukihiro
            Nakadaira)
2010-03-23 13:56:59 +01:00
16 changed files with 504 additions and 75 deletions

View File

@@ -30,7 +30,7 @@
# want to disable using X11 libraries. This speeds up starting Vim,
# but the window title will not be set and the X11 selection can not
# used.
# - Uncomment the line "CONF_OPT_XSMP = --without-xsmp" if you have the
# - Uncomment the line "CONF_OPT_XSMP = --disable-xsmp" if you have the
# X11 Session Management Protocol (XSMP) library (libSM) but do not
# want to use it.
# This can speedup Vim startup but Vim loses the ability to catch the
@@ -1882,7 +1882,7 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(DEST_RT) \
cd $(PLUGSOURCE); $(INSTALL_DATA) *.vim README.txt $(DEST_PLUG)
cd $(DEST_PLUG); chmod $(HELPMOD) *.vim README.txt
# install the ftplugin files
cd $(FTPLUGSOURCE); $(INSTALL_DATA) *.vim README.txt $(DEST_FTP)
cd $(FTPLUGSOURCE); $(INSTALL_DATA) *.vim README.txt logtalk.dict $(DEST_FTP)
cd $(DEST_FTP); chmod $(HELPMOD) *.vim README.txt
# install the compiler files
cd $(COMPSOURCE); $(INSTALL_DATA) *.vim README.txt $(DEST_COMP)

359
src/auto/configure vendored
View File

@@ -821,6 +821,7 @@ with_gnome_libs
with_gnome
with_motif_lib
with_tlib
enable_largefile
enable_acl
enable_gpm
enable_sysmouse
@@ -1485,6 +1486,7 @@ Optional Features:
--enable-nextaw-check If auto-select GUI, check for neXtaw default=yes
--enable-carbon-check If auto-select GUI, check for Carbon default=yes
--disable-gtktest Do not try to compile and run a test GTK program
--disable-largefile omit support for large files
--disable-acl Don't check for ACL support.
--disable-gpm Don't use gpm (Linux mouse daemon).
--disable-sysmouse Don't use sysmouse (mouse in *BSD console).
@@ -14345,6 +14347,363 @@ _ACEOF
fi
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then
enableval=$enable_largefile;
fi
if test "$enable_largefile" != no; then
{ $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
if test "${ac_cv_sys_largefile_CC+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_cv_sys_largefile_CC=no
if test "$GCC" != yes; then
ac_save_CC=$CC
while :; do
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext
CC="$CC -n32"
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_largefile_CC=' -n32'; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext
break
done
CC=$ac_save_CC
rm -f conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
$as_echo "$ac_cv_sys_largefile_CC" >&6; }
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
{ $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
$as_echo_n "(cached) " >&6
else
while :; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_file_offset_bits=no; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_file_offset_bits=64; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_sys_file_offset_bits=unknown
break
done
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
_ACEOF
;;
esac
rm -rf conftest*
if test $ac_cv_sys_file_offset_bits = unknown; then
{ $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
if test "${ac_cv_sys_large_files+set}" = set; then
$as_echo_n "(cached) " >&6
else
while :; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_large_files=no; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGE_FILES 1
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_sys_large_files=1; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_sys_large_files=unknown
break
done
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
$as_echo "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
;;
esac
rm -rf conftest*
fi
fi
{ $as_echo "$as_me:$LINENO: checking for st_blksize" >&5
$as_echo_n "checking for st_blksize... " >&6; }
cat >conftest.$ac_ext <<_ACEOF

View File

@@ -196,6 +196,11 @@
#undef HAVE_UTIME
#undef HAVE_BIND_TEXTDOMAIN_CODESET
/* Define, if needed, for accessing large files. */
#undef _LARGE_FILES
#undef _FILE_OFFSET_BITS
#undef _LARGEFILE_SOURCE
/* Define if you do not have utime(), but do have the utimes() function. */
#undef HAVE_UTIMES

View File

@@ -2669,6 +2669,10 @@ AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \
usleep utime utimes)
AC_FUNC_FSEEKO
dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when
dnl appropriate, so that off_t is 64 bits when needed.
AC_SYS_LARGEFILE
dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible
AC_MSG_CHECKING(for st_blksize)
AC_TRY_COMPILE(

View File

@@ -1933,45 +1933,8 @@ static digr_T digraphdefault[] =
{'7', 'c', 0x3226},
{'8', 'c', 0x3227},
{'9', 'c', 0x3228},
{' ', ' ', 0xe000},
{'/', 'c', 0xe001},
{'U', 'A', 0xe002},
{'U', 'B', 0xe003},
{'"', '3', 0xe004},
{'"', '1', 0xe005},
{'"', '!', 0xe006},
{'"', '\'', 0xe007},
{'"', '>', 0xe008},
{'"', '?', 0xe009},
{'"', '-', 0xe00a},
{'"', '(', 0xe00b},
{'"', '.', 0xe00c},
{'"', ':', 0xe00d},
{'"', '0', 0xe00e},
{'"', '"', 0xe00f},
{'"', '<', 0xe010},
{'"', ',', 0xe011},
{'"', ';', 0xe012},
{'"', '_', 0xe013},
{'"', '=', 0xe014},
{'"', '/', 0xe015},
{'"', 'i', 0xe016},
{'"', 'd', 0xe017},
{'"', 'p', 0xe018},
{';', ';', 0xe019},
{',', ',', 0xe01a},
{'b', '3', 0xe01b},
{'C', 'i', 0xe01c},
{'f', '(', 0xe01d},
{'e', 'd', 0xe01e},
{'a', 'm', 0xe01f},
{'p', 'm', 0xe020},
{'F', 'l', 0xe023},
{'G', 'F', 0xe024},
{'>', 'V', 0xe025},
{'!', '*', 0xe026},
{'?', '*', 0xe027},
{'J', '<', 0xe028},
/* code points 0xe000 - 0xefff excluded, they have no assigned
* characters, only used in proposals. */
{'f', 'f', 0xfb00},
{'f', 'i', 0xfb01},
{'f', 'l', 0xfb02},

View File

@@ -4238,6 +4238,7 @@ do_sub(eap)
char_u *sub_firstline; /* allocated copy of first sub line */
int endcolumn = FALSE; /* cursor in last column when done */
pos_T old_cursor = curwin->w_cursor;
int start_nsubs;
cmd = eap->arg;
if (!global_busy)
@@ -4245,6 +4246,7 @@ do_sub(eap)
sub_nsubs = 0;
sub_nlines = 0;
}
start_nsubs = sub_nsubs;
if (eap->cmdidx == CMD_tilde)
which_pat = RE_LAST; /* use last used regexp */
@@ -5106,7 +5108,7 @@ outofmem:
if (do_count)
curwin->w_cursor = old_cursor;
if (sub_nsubs)
if (sub_nsubs > start_nsubs)
{
/* Set the '[ and '] marks. */
curbuf->b_op_start.lnum = eap->line1;
@@ -5236,8 +5238,6 @@ ex_global(eap)
type = *eap->cmd;
cmd = eap->arg;
which_pat = RE_LAST; /* default: use last used regexp */
sub_nsubs = 0;
sub_nlines = 0;
/*
* undocumented vi feature:
@@ -5341,6 +5341,8 @@ global_exe(cmd)
/* When the command writes a message, don't overwrite the command. */
msg_didout = TRUE;
sub_nsubs = 0;
sub_nlines = 0;
global_need_beginline = FALSE;
global_busy = 1;
old_lcount = curbuf->b_ml.ml_line_count;

View File

@@ -3948,12 +3948,26 @@ showmatches(xp, wildmenu)
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS)
{
char_u *halved_slash;
/* highlight directories */
halved_slash = backslash_halve_save(files_found[k]);
j = mch_isdir(halved_slash);
vim_free(halved_slash);
if (xp->xp_numfiles != -1)
{
char_u *halved_slash;
char_u *exp_path;
/* Expansion was done before and special characters
* were escaped, need to halve backslashes. Also
* $HOME has been replaced with ~/. */
exp_path = expand_env_save_opt(files_found[k], TRUE);
halved_slash = backslash_halve_save(
exp_path != NULL ? exp_path : files_found[k]);
j = mch_isdir(halved_slash != NULL ? halved_slash
: files_found[k]);
vim_free(exp_path);
vim_free(halved_slash);
}
else
/* Expansion was done here, file names are literal. */
j = mch_isdir(files_found[k]);
if (showtail)
p = L_SHOWFILE(k);
else

View File

@@ -2917,6 +2917,7 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
*textfield = NUL;
else
vim_strncpy(textfield, p, IOSIZE - 1);
XtFree((char *)p);
}
suppress_dialog_mnemonics(dialogform);

View File

@@ -1477,7 +1477,7 @@ parse_command_name(parmp)
++initstr;
}
/* Avoid using evim mode for "editor". */
/* Use evim mode for "evim" and "egvim", not for "editor". */
if (TOLOWER_ASC(initstr[0]) == 'e'
&& (TOLOWER_ASC(initstr[1]) == 'v'
|| TOLOWER_ASC(initstr[1]) == 'g'))
@@ -2262,7 +2262,7 @@ scripterror:
* Look for evidence of non-Cygwin paths before we bother.
* This is only for when using the Unix files.
*/
if (strpbrk(p, "\\:") != NULL)
if (strpbrk(p, "\\:") != NULL && !path_with_url(p))
{
char posix_path[PATH_MAX];

View File

@@ -6270,6 +6270,8 @@ get_c_indent()
case 'l': ind_keep_case_label = n; break;
case '#': ind_hash_comment = n; break;
}
if (*options == ',')
++options;
}
/* remember where the cursor was when we started */

View File

@@ -3196,7 +3196,7 @@ get_mouse_class(p)
* There are a few special cases where we want certain combinations of
* characters to be considered as a single word. These are things like
* "->", "/ *", "*=", "+=", "&=", "<=", ">=", "!=" etc. Otherwise, each
* character is in it's own class.
* character is in its own class.
*/
if (c != NUL && vim_strchr((char_u *)"-+*/%<>&|^!=", c) != NULL)
return 1;
@@ -4085,7 +4085,7 @@ check_scrollbind(topline_diff, leftcol_diff)
/*
* Command character that's ignored.
* Used for CTRL-Q and CTRL-S to avoid problems with terminals that use
* xon/xoff
* xon/xoff.
*/
static void
nv_ignore(cap)
@@ -6523,7 +6523,7 @@ nv_brackets(cap)
* [ or ] followed by a middle mouse click: put selected text with
* indent adjustment. Any other button just does as usual.
*/
else if (cap->nchar >= K_LEFTMOUSE && cap->nchar <= K_RIGHTRELEASE)
else if (cap->nchar >= K_RIGHTRELEASE && cap->nchar <= K_LEFTMOUSE)
{
(void)do_mouse(cap->oap, cap->nchar,
(cap->cmdchar == ']') ? FORWARD : BACKWARD,

View File

@@ -3696,9 +3696,32 @@ set_init_3()
* Isolate the name of the shell:
* - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f".
* - Remove any argument. E.g., "csh -f" -> "csh".
* But don't allow a space in the path, so that this works:
* "/usr/bin/csh --rcfile ~/.cshrc"
* But don't do that for Windows, it's common to have a space in the path.
*/
#ifdef WIN3264
p = gettail(p_sh);
p = vim_strnsave(p, (int)(skiptowhite(p) - p));
#else
p = skiptowhite(p_sh);
if (*p == NUL)
{
/* No white space, use the tail. */
p = vim_strsave(gettail(p_sh));
}
else
{
char_u *p1, *p2;
/* Find the last path separator before the space. */
p1 = p_sh;
for (p2 = p_sh; p2 < p; mb_ptr_adv(p2))
if (vim_ispathsep(*p2))
p1 = p2 + 1;
p = vim_strnsave(p1, (int)(p - p1));
}
#endif
if (p != NULL)
{
/*

View File

@@ -6963,6 +6963,8 @@ vim_regsub_both(source, dest, copy, magic, backslash)
eval_result = eval_to_string(source + 2, NULL, TRUE);
if (eval_result != NULL)
{
int had_backslash = FALSE;
for (s = eval_result; *s != NUL; mb_ptr_adv(s))
{
/* Change NL to CR, so that it becomes a line break.
@@ -6970,7 +6972,20 @@ vim_regsub_both(source, dest, copy, magic, backslash)
if (*s == NL)
*s = CAR;
else if (*s == '\\' && s[1] != NUL)
{
++s;
had_backslash = TRUE;
}
}
if (had_backslash && backslash)
{
/* Backslashes will be consumed, need to double them. */
s = vim_strsave_escaped(eval_result, (char_u *)"\\");
if (s != NULL)
{
vim_free(eval_result);
eval_result = s;
}
}
dst += STRLEN(eval_result);

View File

@@ -25,10 +25,11 @@
* one character which occupies two display cells.
* For UTF-8 a multi-byte character is converted to Unicode and stored in
* ScreenLinesUC[]. ScreenLines[] contains the first byte only. For an ASCII
* character without composing chars ScreenLinesUC[] will be 0. When the
* character occupies two display cells the next byte in ScreenLines[] is 0.
* character without composing chars ScreenLinesUC[] will be 0 and
* ScreenLinesC[][] is not used. When the character occupies two display
* cells the next byte in ScreenLines[] is 0.
* ScreenLinesC[][] contain up to 'maxcombine' composing characters
* (drawn on top of the first character). They are 0 when not used.
* (drawn on top of the first character). There is 0 after the last one used.
* ScreenLines2[] is only used for euc-jp to store the second byte if the
* first byte is 0x8e (single-width character).
*
@@ -4893,6 +4894,7 @@ static int comp_char_differs __ARGS((int, int));
/*
* Return if the composing characters at "off_from" and "off_to" differ.
* Only to be used when ScreenLinesUC[off_from] != 0.
*/
static int
comp_char_differs(off_from, off_to)
@@ -6281,6 +6283,7 @@ static int screen_comp_differs __ARGS((int, int*));
/*
* Return TRUE if composing characters for screen posn "off" differs from
* composing characters in "u8cc".
* Only to be used when ScreenLinesUC[off] != 0.
*/
static int
screen_comp_differs(off, u8cc)
@@ -6461,8 +6464,10 @@ screen_puts_len(text, len, row, col, attr)
&& c == 0x8e
&& ScreenLines2[off] != ptr[1])
|| (enc_utf8
&& (ScreenLinesUC[off] != (u8char_T)(c >= 0x80 ? u8c : 0)
|| screen_comp_differs(off, u8cc)))
&& (ScreenLinesUC[off] !=
(u8char_T)(c < 0x80 && u8cc[0] == 0 ? 0 : u8c)
|| (ScreenLinesUC[off] != 0
&& screen_comp_differs(off, u8cc))))
#endif
|| ScreenAttrs[off] != attr
|| exmode_active;
@@ -7536,13 +7541,13 @@ retry:
new_ScreenLines = (schar_T *)lalloc((long_u)(
(Rows + 1) * Columns * sizeof(schar_T)), FALSE);
#ifdef FEAT_MBYTE
vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T) * MAX_MCO);
vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO);
if (enc_utf8)
{
new_ScreenLinesUC = (u8char_T *)lalloc((long_u)(
(Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
for (i = 0; i < p_mco; ++i)
new_ScreenLinesC[i] = (u8char_T *)lalloc((long_u)(
new_ScreenLinesC[i] = (u8char_T *)lalloc_clear((long_u)(
(Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
}
if (enc_dbcs == DBCS_JPNU)

View File

@@ -6205,10 +6205,8 @@ static char *(highlight_init_both[]) =
{
CENT("ErrorMsg term=standout ctermbg=DarkRed ctermfg=White",
"ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White"),
#ifdef FEAT_SEARCH_EXTRA
CENT("IncSearch term=reverse cterm=reverse",
"IncSearch term=reverse cterm=reverse gui=reverse"),
#endif
CENT("ModeMsg term=bold cterm=bold",
"ModeMsg term=bold cterm=bold gui=bold"),
CENT("NonText term=bold ctermfg=Blue",
@@ -7138,7 +7136,8 @@ do_highlight(line, forceit, init)
}
}
}
/* Add one to the argument, to avoid zero */
/* Add one to the argument, to avoid zero. Zero is used for
* "NONE", then "color" is -1. */
if (key[5] == 'F')
{
HL_TABLE()[idx].sg_cterm_fg = color + 1;
@@ -7152,7 +7151,7 @@ do_highlight(line, forceit, init)
#endif
{
must_redraw = CLEAR;
if (termcap_active)
if (termcap_active && color >= 0)
term_fg_color(color);
}
}
@@ -7169,16 +7168,21 @@ do_highlight(line, forceit, init)
#endif
{
must_redraw = CLEAR;
if (termcap_active)
term_bg_color(color);
if (t_colors < 16)
i = (color == 0 || color == 4);
else
i = (color < 7 || color == 8);
/* Set the 'background' option if the value is wrong. */
if (i != (*p_bg == 'd'))
set_option_value((char_u *)"bg", 0L,
i ? (char_u *)"dark" : (char_u *)"light", 0);
if (color >= 0)
{
if (termcap_active)
term_bg_color(color);
if (t_colors < 16)
i = (color == 0 || color == 4);
else
i = (color < 7 || color == 8);
/* Set the 'background' option if the value is
* wrong. */
if (i != (*p_bg == 'd'))
set_option_value((char_u *)"bg", 0L,
i ? (char_u *)"dark"
: (char_u *)"light", 0);
}
}
}
}

View File

@@ -681,6 +681,38 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
419,
/**/
418,
/**/
417,
/**/
416,
/**/
415,
/**/
414,
/**/
413,
/**/
412,
/**/
411,
/**/
410,
/**/
409,
/**/
408,
/**/
407,
/**/
406,
/**/
405,
/**/
404,
/**/
403,
/**/