Compare commits

..

13 Commits

Author SHA1 Message Date
Bram Moolenaar
77fceb8908 updated for version 7.3.656
Problem:    Internal error in :pyeval.
Solution:   Handle failed object conversion. (ZyX)
2012-09-05 18:54:48 +02:00
Bram Moolenaar
e48a2dd3af updated for version 7.3.655
Problem:    64 bit MingW xpm .a file is missing.
Solution:   Add the file. (Sergey Khorev)
2012-09-05 18:49:24 +02:00
Bram Moolenaar
231e1a1723 updated for version 7.3.654
Problem:    When creating a Vim dictionary from Python objects an empty key
            might be used.
Solution:   Do not use empty keys, throw an IndexError. (ZyX)
2012-09-05 18:45:28 +02:00
Bram Moolenaar
e2db4361d2 updated for version 7.3.653
Problem:    MingW needs build rule for included XPM files.  Object directory
            for 32 and 64 builds is the same, also for MSVC.
Solution:   Add MingW build rule to use included XPM files.  Add the CPU or
            architecture to the object directory name. (Sergey Khorev)
2012-09-05 17:57:39 +02:00
Bram Moolenaar
ac0ddc15e9 updated for version 7.3.652
Problem:    Workaround for Python crash isn't perfect.
Solution:   Change the type of the length argument. (Sean Estabrooks)
2012-09-05 17:28:21 +02:00
Bram Moolenaar
7c0a86b1e8 updated for version 7.3.651
Problem:    Completion after ":help \{-" gives an error message.
Solution:   Prepend a backslash.
2012-09-05 15:15:07 +02:00
Bram Moolenaar
b4a80cdd91 updated for version 7.3.650
Problem:    Completion after ":help \{-" gives an error message and messes up
            the command line.
Solution:   Cancel the tag search if the pattern can't be compiled. (Yasuhiro
            Matsumoto)
2012-09-05 15:03:30 +02:00
Bram Moolenaar
7c82130a76 updated for version 7.3.649
Problem:    When 'clipboard' is set to "unnamed" small deletes end up in the
            numbered registers. (Ingo Karkat)
Solution:   Use the original register name to decide whether to put a delete
            in a numbered register. (Christian Brabandt)
2012-09-05 14:18:45 +02:00
Bram Moolenaar
2c66669c33 updated for version 7.3.648
Problem:    Crash when using a very long file name. (ZyX)
Solution:   Properly check length of buffer space.
2012-09-05 13:30:40 +02:00
Bram Moolenaar
57c0ea8692 updated for version 7.3.647
Problem:    "gnd" doesn't work correctly in Visual mode.
Solution:   Handle Visual mode differently in "gn". (Christian Brabandt)
2012-09-05 12:16:45 +02:00
Bram Moolenaar
465748e411 updated for version 7.3.646
Problem:    When reloading a buffer the undo file becomes unusable unless ":w"
            is executed. (Dmitri Frank)
Solution:   After reloading the buffer write the undo file. (Christian
            Brabandt)
2012-08-29 18:50:54 +02:00
Bram Moolenaar
dd7d846475 updated for version 7.3.645
Problem:    No tests for patch 7.3.625 and 7.3.637.
Solution:   Add more tests for the "gn" command and try/catch. (Christian
            Brabandt)
2012-08-29 16:55:13 +02:00
Bram Moolenaar
0551410a14 updated for version 7.3.644
Problem:    Dead code for BeOS GUI.
Solution:   Remove unused __BEOS__ stuff.
2012-08-29 16:34:27 +02:00
19 changed files with 206 additions and 70 deletions

View File

@@ -1,14 +1,15 @@
# Makefile for VIM on Win32, using 'EGCS/mingw32 1.1.2'.
# Makefile for VIM on Win32
#
# Info at http://www.mingw.org
# Also requires 'GNU make 3.77', which you can get through a link
# to 'JanJaap's page from the above page.
# Alternative x86 and 64-builds: http://mingw-w64.sourceforge.net
# Also requires GNU make, which you can download from the same sites.
# Get missing libraries from http://gnuwin32.sf.net.
#
# Tested on Win32 NT 4 and Win95.
#
# To make everything, just 'make -f Make_ming.mak'
# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'
# After a run, you can 'make -f Make_ming.mak clean' to clean up
# To make everything, just 'make -f Make_ming.mak'.
# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'.
# After a run, you can 'make -f Make_ming.mak clean' to clean up.
#
# NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
# it's just run out of memory or something. Run again, and it will continue
@@ -20,8 +21,8 @@
# "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
# http://www.matcode.com/mpress.htm
#
# Maintained by Ron Aaron <ronaharon@yahoo.com>
# updated 2003 Jan 20
# Maintained by Ron Aaron <ronaharon@yahoo.com> et al.
# Updated 2012 Sep 5.
#>>>>> choose options:
# set to yes for a debug build
@@ -31,32 +32,33 @@ OPTIMIZE=MAXSPEED
# set to yes to make gvim, no for vim
GUI=yes
# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
# set to TINY to make minimal version (few features)
# Set to TINY to make minimal version (few features).
FEATURES=BIG
# set to one of i386, i486, i586, i686 as the minimum target processor
# Set to one of i386, i486, i586, i686 as the minimum target processor.
# For amd64/x64 architecture set ARCH=x86-64 .
ARCH=i386
# set to yes to cross-compile from unix; no=native Windows
# Set to yes to cross-compile from unix; no=native Windows.
CROSS=no
# set to path to iconv.h and libiconv.a to enable using 'iconv.dll'
# Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
#ICONV="."
ICONV=yes
GETTEXT=yes
# set to yes to include multibyte support
# Set to yes to include multibyte support.
MBYTE=yes
# set to yes to include IME support
# Set to yes to include IME support.
IME=yes
DYNAMIC_IME=yes
# set to yes to enable writing a postscript file with :hardcopy
# Set to yes to enable writing a postscript file with :hardcopy.
POSTSCRIPT=no
# set to yes to enable OLE support
# Set to yes to enable OLE support.
OLE=no
# Set the default $(WINVER) to make it work with pre-Win2k
# Set the default $(WINVER) to make it work with pre-Win2k.
ifndef WINVER
WINVER = 0x0500
endif
# Set to yes to enable Cscope support
# Set to yes to enable Cscope support.
CSCOPE=yes
# Set to yes to enable Netbeans support
# Set to yes to enable Netbeans support.
NETBEANS=$(GUI)
@@ -431,11 +433,32 @@ endif
endif
endif
ifdef XPM
# Only allow XPM for a GUI build.
ifeq (yes, $(GUI))
CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include
ifndef XPM
ifeq ($(ARCH),i386)
XPM = xpm/x86
endif
ifeq ($(ARCH),i486)
XPM = xpm/x86
endif
ifeq ($(ARCH),i586)
XPM = xpm/x86
endif
ifeq ($(ARCH),i686)
XPM = xpm/x86
endif
ifeq ($(ARCH),x86-64)
XPM = xpm/x64
endif
endif
ifdef XPM
ifneq ($(XPM),no)
CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
endif
endif
endif
ifeq ($(DEBUG),yes)
@@ -565,10 +588,10 @@ TARGET := gvim$(DEBUG_SUFFIX).exe
DEFINES += $(DEF_GUI)
OBJ += $(GUIOBJ)
LFLAGS += -mwindows
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
else
TARGET := vim$(DEBUG_SUFFIX).exe
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
endif
ifdef GETTEXT

View File

@@ -213,6 +213,7 @@ CPU = i386
# We're on Windows 95
CPU = i386
!endif # !PROCESSOR_ARCHITECTURE
OBJDIR = $(OBJDIR)$(CPU)
# Build a retail version by default
@@ -283,10 +284,12 @@ NETBEANS_LIB = WSock32.lib
!ifndef XPM
# XPM is not set, use the included xpm files, depending on the architecture.
!if ("$(CPU)" == "AMD64") || ("$(CPU)" == "IA64")
!if "$(CPU)" == "AMD64"
XPM = xpm\x64
!else
!elseif "$(CPU)" == "i386"
XPM = xpm\x86
!else
XPM = no
!endif
!endif
!if "$(XPM)" != "no"

View File

@@ -3234,12 +3234,15 @@ maketitle()
{
/* format: "fname + (path) (1 of 2) - VIM" */
#define SPACE_FOR_FNAME (IOSIZE - 100)
#define SPACE_FOR_DIR (IOSIZE - 20)
#define SPACE_FOR_ARGNR (IOSIZE - 10) /* at least room for " - VIM" */
if (curbuf->b_fname == NULL)
vim_strncpy(buf, (char_u *)_("[No Name]"), IOSIZE - 100);
vim_strncpy(buf, (char_u *)_("[No Name]"), SPACE_FOR_FNAME);
else
{
p = transstr(gettail(curbuf->b_fname));
vim_strncpy(buf, p, IOSIZE - 100);
vim_strncpy(buf, p, SPACE_FOR_FNAME);
vim_free(p);
}
@@ -3263,7 +3266,7 @@ maketitle()
buf[off++] = ' ';
buf[off++] = '(';
home_replace(curbuf, curbuf->b_ffname,
buf + off, IOSIZE - off, TRUE);
buf + off, SPACE_FOR_DIR - off, TRUE);
#ifdef BACKSLASH_IN_FILENAME
/* avoid "c:/name" to be reduced to "c" */
if (isalpha(buf[off]) && buf[off + 1] == ':')
@@ -3274,18 +3277,28 @@ maketitle()
if (p == buf + off)
/* must be a help buffer */
vim_strncpy(buf + off, (char_u *)_("help"),
(size_t)(IOSIZE - off - 1));
(size_t)(SPACE_FOR_DIR - off - 1));
else
*p = NUL;
/* translate unprintable chars */
p = transstr(buf + off);
vim_strncpy(buf + off, p, (size_t)(IOSIZE - off - 1));
vim_free(p);
/* Translate unprintable chars and concatenate. Keep some
* room for the server name. When there is no room (very long
* file name) use (...). */
if (off < SPACE_FOR_DIR)
{
p = transstr(buf + off);
vim_strncpy(buf + off, p, (size_t)(SPACE_FOR_DIR - off));
vim_free(p);
}
else
{
vim_strncpy(buf + off, (char_u *)"...",
(size_t)(SPACE_FOR_ARGNR - off));
}
STRCAT(buf, ")");
}
append_arg_number(curwin, buf, IOSIZE, FALSE);
append_arg_number(curwin, buf, SPACE_FOR_ARGNR, FALSE);
#if defined(FEAT_CLIENTSERVER)
if (serverName != NULL)

View File

@@ -4851,7 +4851,7 @@ do_sub(eap)
#ifdef FEAT_EVAL
if (do_count)
{
/* prevent accidently changing the buffer by a function */
/* prevent accidentally changing the buffer by a function */
save_ma = curbuf->b_p_ma;
curbuf->b_p_ma = FALSE;
sandbox++;
@@ -5264,7 +5264,7 @@ do_sub_msg(count_only)
* is assumed to be 'p' if missing.
*
* This is implemented in two passes: first we scan the file for the pattern and
* set a mark for each line that (not) matches. secondly we execute the command
* set a mark for each line that (not) matches. Secondly we execute the command
* for each line that has a mark. This is required because after deleting
* lines we do not know where to search for the next match.
*/
@@ -5896,9 +5896,14 @@ find_help_tags(arg, num_matches, matches, keep_lang)
}
else
{
/* replace "[:...:]" with "\[:...:]"; "[+...]" with "\[++...]" */
if (arg[0] == '[' && (arg[1] == ':'
|| (arg[1] == '+' && arg[2] == '+')))
/* Replace:
* "[:...:]" with "\[:...:]"
* "[++...]" with "\[++...]"
* "\{" with "\\{"
*/
if ((arg[0] == '[' && (arg[1] == ':'
|| (arg[1] == '+' && arg[2] == '+')))
|| (arg[0] == '\\' && arg[1] == '{'))
*d++ = '\\';
for (s = arg; *s; ++s)

View File

@@ -7060,8 +7060,23 @@ buf_check_timestamp(buf, focus)
}
if (reload)
{
/* Reload the buffer. */
buf_reload(buf, orig_mode);
#ifdef FEAT_PERSISTENT_UNDO
if (buf->b_p_udf && buf->b_ffname != NULL)
{
char_u hash[UNDO_HASH_SIZE];
buf_T *save_curbuf = curbuf;
/* Any existing undo file is unusable, write it now. */
curbuf = buf;
u_compute_hash(hash);
u_write_undo(NULL, FALSE, buf, hash);
curbuf = save_curbuf;
}
#endif
}
#ifdef FEAT_AUTOCMD
/* Trigger FileChangedShell when the file was changed in any way. */

View File

@@ -37,8 +37,7 @@ static void gui_set_fg_color __ARGS((char_u *name));
static void gui_set_bg_color __ARGS((char_u *name));
static win_T *xy2win __ARGS((int x, int y));
#if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) \
&& !defined(__APPLE__)
#if defined(UNIX) && !defined(MACOS_X) && !defined(__APPLE__)
# define MAY_FORK
static void gui_do_fork __ARGS((void));
@@ -784,11 +783,9 @@ error:
gui_exit(rc)
int rc;
{
#ifndef __BEOS__
/* don't free the fonts, it leads to a BUS error
* richard@whitequeen.com Jul 99 */
free_highlight_fonts();
#endif
gui.in_use = FALSE;
gui_mch_exit(rc);
}

View File

@@ -74,18 +74,13 @@ static struct PyMethodDef OutputMethods[] = {
static PyObject *
OutputWrite(PyObject *self, PyObject *args)
{
int len;
Py_ssize_t len;
char *str = NULL;
int error = ((OutputObject *)(self))->error;
if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len))
return NULL;
/* TODO: This works around a gcc optimizer problem and avoids Vim
* from crashing. Should find a real solution. */
if (str == NULL)
return NULL;
Py_BEGIN_ALLOW_THREADS
Python_Lock_Vim();
writer((writefn)(error ? emsg : msg), (char_u *)str, len);
@@ -612,6 +607,14 @@ pyll_add(PyObject *self, pylinkedlist_T *ref, pylinkedlist_T **last)
static PyTypeObject DictionaryType;
#define DICTKEY_GET_NOTEMPTY(err) \
DICTKEY_GET(err) \
if (*key == NUL) \
{ \
PyErr_SetString(PyExc_ValueError, _("empty keys are not allowed")); \
return err; \
}
typedef struct
{
PyObject_HEAD
@@ -664,7 +667,7 @@ pydict_to_tv(PyObject *obj, typval_T *tv, PyObject *lookupDict)
if (valObject == NULL)
return -1;
DICTKEY_GET(-1)
DICTKEY_GET_NOTEMPTY(-1)
di = dictitem_alloc(key);
@@ -735,7 +738,7 @@ pymap_to_tv(PyObject *obj, typval_T *tv, PyObject *lookupDict)
return -1;
}
DICTKEY_GET(-1)
DICTKEY_GET_NOTEMPTY(-1)
valObject = PyTuple_GetItem(litem, 1);
if (valObject == NULL)
@@ -789,16 +792,22 @@ DictionaryLength(PyObject *self)
DictionaryItem(PyObject *self, PyObject *keyObject)
{
char_u *key;
dictitem_T *val;
dictitem_T *di;
DICTKEY_DECL
DICTKEY_GET(NULL)
DICTKEY_GET_NOTEMPTY(NULL)
val = dict_find(((DictionaryObject *) (self))->dict, key, -1);
di = dict_find(((DictionaryObject *) (self))->dict, key, -1);
if (di == NULL)
{
PyErr_SetString(PyExc_IndexError, _("no such key in dictionary"));
return NULL;
}
DICTKEY_UNREF
return ConvertToPyObject(&val->di_tv);
return ConvertToPyObject(&di->di_tv);
}
static PyInt
@@ -816,7 +825,7 @@ DictionaryAssItem(PyObject *self, PyObject *keyObject, PyObject *valObject)
return -1;
}
DICTKEY_GET(-1)
DICTKEY_GET_NOTEMPTY(-1)
di = dict_find(d, key, -1);

View File

@@ -1025,8 +1025,8 @@ static int CurrentSetattr(PyObject *, char *, PyObject *);
static PySequenceMethods BufferAsSeq = {
(PyInquiry) BufferLength, /* sq_length, len(x) */
(binaryfunc) 0, /* BufferConcat, */ /* sq_concat, x+y */
(PyIntArgFunc) 0, /* BufferRepeat, */ /* sq_repeat, x*n */
(binaryfunc) 0, /* BufferConcat, sq_concat, x+y */
(PyIntArgFunc) 0, /* BufferRepeat, sq_repeat, x*n */
(PyIntArgFunc) BufferItem, /* sq_item, x[i] */
(PyIntIntArgFunc) BufferSlice, /* sq_slice, x[i:j] */
(PyIntObjArgProc) BufferAssItem, /* sq_ass_item, x[i]=v */
@@ -1787,6 +1787,10 @@ do_pyeval (char_u *str, typval_T *rettv)
case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
case VAR_FUNC: func_ref(rettv->vval.v_string); break;
case VAR_UNKNOWN:
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
break;
}
}

View File

@@ -1817,6 +1817,10 @@ do_py3eval (char_u *str, typval_T *rettv)
case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
case VAR_FUNC: func_ref(rettv->vval.v_string); break;
case VAR_UNKNOWN:
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
break;
}
}

View File

@@ -1623,6 +1623,7 @@ op_delete(oap)
#endif
linenr_T old_lcount = curbuf->b_ml.ml_line_count;
int did_yank = FALSE;
int orig_regname = oap->regname;
if (curbuf->b_ml.ml_flags & ML_EMPTY) /* nothing to do */
return OK;
@@ -1715,8 +1716,10 @@ op_delete(oap)
/*
* Put deleted text into register 1 and shift number registers if the
* delete contains a line break, or when a regname has been specified.
* Use the register name from before adjust_clip_reg() may have
* changed it.
*/
if (oap->regname != 0 || oap->motion_type == MLINE
if (orig_regname != 0 || oap->motion_type == MLINE
|| oap->line_count > 1 || oap->use_reg_one)
{
y_current = &y_regs[9];

View File

@@ -4545,7 +4545,6 @@ current_search(count, forward)
int dir;
int result; /* result of various function calls */
char_u old_p_ws = p_ws;
int visual_active = FALSE;
int flags = 0;
pos_T save_VIsual;
int zerowidth = FALSE;
@@ -4561,11 +4560,6 @@ current_search(count, forward)
{
orig_pos = curwin->w_cursor;
save_VIsual = VIsual;
visual_active = TRUE;
/* just started visual selection, only one character */
if (equalpos(VIsual, curwin->w_cursor))
visual_active = FALSE;
pos = curwin->w_cursor;
start_pos = VIsual;
@@ -4619,7 +4613,7 @@ current_search(count, forward)
p_ws = old_p_ws;
return FAIL;
}
else if (!i && !result && !visual_active)
else if (!i && !result)
{
if (forward) /* try again from start of buffer */
{
@@ -4691,7 +4685,8 @@ is_zerowidth(pattern)
regmmatch_T regmatch;
int nmatched = 0;
int result = -1;
pos_T pos;
pos_T pos;
int save_called_emsg = called_emsg;
if (search_regcomp(pattern, RE_SEARCH, RE_SEARCH,
SEARCH_KEEP, &regmatch) == FAIL)
@@ -4704,15 +4699,17 @@ is_zerowidth(pattern)
{
/* Zero-width pattern should match somewhere, then we can check if
* start and end are in the same position. */
called_emsg = FALSE;
nmatched = vim_regexec_multi(&regmatch, curwin, curbuf,
pos.lnum, (colnr_T)0, NULL);
if (!called_emsg)
result = (nmatched != 0
&& regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
&& regmatch.startpos[0].col == regmatch.endpos[0].col);
&& regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
&& regmatch.startpos[0].col == regmatch.endpos[0].col);
}
called_emsg |= save_called_emsg;
vim_free(regmatch.regprog);
return result;
}

View File

@@ -1443,6 +1443,8 @@ find_tags(pat, num_matches, matchesp, flags, mincount, buf_ffname)
orgpat.len = p_tl;
prepare_pats(&orgpat, has_re);
if (has_re && orgpat.regmatch.regprog == NULL)
goto findtag_end;
#ifdef FEAT_TAG_BINS
/* This is only to avoid a compiler warning for using search_info

View File

@@ -34,7 +34,14 @@ gncsearchmatch/one\_s*two\_s
gnd
/[a]bcdx
:1
2gnd
2gnd/join
/$
0gnd
/\>\zs
0gnd/^
gnd$h/\zs
gnd/[u]niquepattern/s
vlgnd
:/^start:/,/^end:/wq! test.out
ENDTEST
@@ -57,4 +64,9 @@ foobar
one
two
abcdx | abcdx | abcdx
join
lines
zero width pattern
delete first and last chars
uniquepattern uniquepattern
end:

View File

@@ -21,4 +21,8 @@ a
SEARCH:
searchmatch
abcdx | | abcdx
join lines
zerowidth pattern
elete first and last char
uniquepattern
end:

View File

@@ -378,6 +378,16 @@ let l = [0, 1, 2, 3]
:unlet dict
:call garbagecollect(1)
:"
:" test for patch 7.3.637
:let a = 'No error caught'
:try|foldopen|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
o=a
:"
:lang C
:redir => a
:try|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
:redir END
o=a
:"
:"
:/^start:/,$wq! test.out

View File

@@ -115,3 +115,9 @@ caught a:000[3]
{'a': {'b': 'B'}}
Vim(call):E737: a
{'a': {'b': 'B'}}
Vim(foldopen):E490:
Error detected while processing :
E492: Not an editor command: foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry

View File

@@ -719,6 +719,32 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
656,
/**/
655,
/**/
654,
/**/
653,
/**/
652,
/**/
651,
/**/
650,
/**/
649,
/**/
648,
/**/
647,
/**/
646,
/**/
645,
/**/
644,
/**/
643,
/**/

View File

@@ -10,6 +10,9 @@ nmake -f Make_mvc.mak GUI=yes CSCOPE=yes NETBEANS=yes XPM=e:\hg\xpm\x86
MinGW:
mingw32-make -f Make_ming.mak GUI=yes CSCOPE=yes XPM=e:/hg/xpm/x86
MinGW 64 for x64:
mingw32-make -f Make_ming.mak GUI=yes ARCH=x86-64 XPM=E:\HG\xpm\x64
Microsoft Visual C++ on x64 (tested with versions 2008 and 2010):
nmake -f Make_mvc.mak GUI=yes CSCOPE=yes XPM=E:\HG\xpm\x64

BIN
src/xpm/x64/lib/libXpm.a Normal file

Binary file not shown.