Compare commits

...

10 Commits

Author SHA1 Message Date
Bram Moolenaar
0a11f8ce4e updated for version 7.3.366
Problem:    A tags file with an extremely long name causes errors.
Solution:   Ignore tags that are too long. (Arno Renevier)
2011-12-08 15:12:11 +01:00
Bram Moolenaar
f0b6b0cc3b updated for version 7.3.365
Problem:    Crash when using a large Unicode character in a file that has
            syntax highlighting. (ngollan)
Solution:   Check for going past the end of the utf tables. (Dominique Pelle)
2011-12-08 15:09:52 +01:00
Bram Moolenaar
2bbafdbcee updated for version 7.3.364
Problem:    Can't compile on HP-UX. (John Marriott)
Solution:   Only use TTYM_URXVT when it is defined.
2011-12-01 20:59:21 +01:00
Bram Moolenaar
3388bb4847 updated for version 7.3.363
Problem:    C indenting is wrong after #endif followed by a semicolon.
Solution:   Add special handling for a semicolon in a line by itself. (Lech
            Lorens)
2011-11-30 17:20:23 +01:00
Bram Moolenaar
0612ec8d53 updated for version 7.3.362
Problem:    ml_get error when using ":g" with folded lines.
Solution:   Adjust the line number for changed_lines(). (Christian Brabandt)
2011-11-30 17:01:58 +01:00
Bram Moolenaar
89c7122c05 updated for version 7.3.361
Problem:    Accessing memory after it is freed when EXITFREE is defined.
Solution:   Don't access curwin when firstwin is NULL. (Dominique Pelle)
2011-11-30 15:40:56 +01:00
Bram Moolenaar
8000baffa7 updated for version 7.3.360
Problem:    Interrupting the load of an autoload function may cause a crash.
Solution:   Do not use the hashitem when not valid. (Yukihiro Nakadaira)
2011-11-30 15:19:28 +01:00
Bram Moolenaar
195ea0ff6c updated for version 7.3.359
Problem:    Command line completion shows dict functions.
Solution:   Skip dict functions for completion. (Yasuhiro Matsumoto)
2011-11-30 14:57:31 +01:00
Bram Moolenaar
b491c03ee7 updated for version 7.3.358
Problem:    Mouse support doesn't work properly.
Solution:   Add HMT_URXVT. (lilydjwg, James McCoy)
2011-11-30 14:47:15 +01:00
Bram Moolenaar
26fdd7da96 updated for version 7.3.357
Problem:    Compiler warning in MS-Windows console build.
Solution:   Adjust return type of PrintHookProc(). (Mike Williams)
2011-11-30 13:42:44 +01:00
11 changed files with 126 additions and 16 deletions

View File

@@ -567,8 +567,9 @@ buf_freeall(buf, flags)
diff_buf_delete(buf); /* Can't use 'diff' for unloaded buffer. */
#endif
#ifdef FEAT_SYN_HL
if (curwin->w_buffer == buf)
reset_synblock(curwin); /* remove any ownsyntax */
/* Remove any ownsyntax, unless exiting. */
if (firstwin != NULL && curwin->w_buffer == buf)
reset_synblock(curwin);
#endif
#ifdef FEAT_FOLDING

View File

@@ -875,7 +875,7 @@ eval_init()
#ifdef EBCDIC
/*
* Sort the function table, to enable binary sort.
* Sort the function table, to enable binary search.
*/
sortFunctions();
#endif
@@ -19589,9 +19589,14 @@ find_var_in_ht(ht, varname, writing)
* worked find the variable again. Don't auto-load a script if it was
* loaded already, otherwise it would be loaded every time when
* checking if a function name is a Funcref variable. */
if (ht == &globvarht && !writing
&& script_autoload(varname, FALSE) && !aborting())
if (ht == &globvarht && !writing)
{
/* Note: script_autoload() may make "hi" invalid. It must either
* be obtained again or not used. */
if (!script_autoload(varname, FALSE) || aborting())
return NULL;
hi = hash_find(ht, varname);
}
if (HASHITEM_EMPTY(hi))
return NULL;
}
@@ -21737,6 +21742,9 @@ get_user_func_name(xp, idx)
++hi;
fp = HI2UF(hi);
if (fp->uf_flags & FC_DICT)
return NULL; /* don't show dict functions */
if (STRLEN(fp->uf_name) + 4 >= IOSIZE)
return fp->uf_name; /* prevents overflow */

View File

@@ -820,7 +820,13 @@ do_move(line1, line2, dest)
curwin->w_cursor.lnum = dest + (line2 - line1) + 1;
if (line1 < dest)
changed_lines(line1, 0, dest + num_lines + 1, 0L);
{
dest += num_lines + 1;
last_line = curbuf->b_ml.ml_line_count;
if (dest > last_line + 1)
dest = last_line + 1;
changed_lines(line1, 0, dest, 0L);
}
else
changed_lines(dest + 1, 0, line1 + num_lines, 0L);

View File

@@ -2764,19 +2764,22 @@ utf_convert(a, table, tableSize)
int tableSize;
{
int start, mid, end; /* indices into table */
int entries = tableSize / sizeof(convertStruct);
start = 0;
end = tableSize / sizeof(convertStruct);
end = entries;
while (start < end)
{
/* need to search further */
mid = (end + start) /2;
mid = (end + start) / 2;
if (table[mid].rangeEnd < a)
start = mid + 1;
else
end = mid;
}
if (table[start].rangeStart <= a && a <= table[start].rangeEnd
if (start < entries
&& table[start].rangeStart <= a
&& a <= table[start].rangeEnd
&& (a - table[start].rangeStart) % table[start].step == 0)
return (a + table[start].offset);
else
@@ -2791,7 +2794,7 @@ utf_convert(a, table, tableSize)
utf_fold(a)
int a;
{
return utf_convert(a, foldCase, sizeof(foldCase));
return utf_convert(a, foldCase, (int)sizeof(foldCase));
}
static convertStruct toLower[] =
@@ -3119,7 +3122,7 @@ utf_toupper(a)
return TOUPPER_LOC(a);
/* For any other characters use the above mapping table. */
return utf_convert(a, toUpper, sizeof(toUpper));
return utf_convert(a, toUpper, (int)sizeof(toUpper));
}
int
@@ -3152,7 +3155,7 @@ utf_tolower(a)
return TOLOWER_LOC(a);
/* For any other characters use the above mapping table. */
return utf_convert(a, toLower, sizeof(toLower));
return utf_convert(a, toLower, (int)sizeof(toLower));
}
int

View File

@@ -8142,6 +8142,29 @@ term_again:
if (cin_ends_in(l, (char_u *)"};", NULL))
break;
/*
* Find a line only has a semicolon that belongs to a previous
* line ending in '}', e.g. before an #endif. Don't increase
* indent then.
*/
if (*(look = skipwhite(l)) == ';' && cin_nocode(look + 1))
{
pos_T curpos_save = curwin->w_cursor;
while (curwin->w_cursor.lnum > 1)
{
look = ml_get(--curwin->w_cursor.lnum);
if (!(cin_nocode(look) || cin_ispreproc_cont(
&look, &curwin->w_cursor.lnum)))
break;
}
if (curwin->w_cursor.lnum > 0
&& cin_ends_in(look, (char_u *)"}", NULL))
break;
curwin->w_cursor = curpos_save;
}
/*
* If the PREVIOUS line is a function declaration, the current
* line (and the ones that follow) needs to be indented as

View File

@@ -1869,7 +1869,7 @@ AbortProc(HDC hdcPrn, int iCode)
#ifndef FEAT_GUI
static UINT CALLBACK
static UINT_PTR CALLBACK
PrintHookProc(
HWND hDlg, // handle to dialog box
UINT uiMsg, // message identifier

View File

@@ -1906,12 +1906,26 @@ line_read_in:
tagp.tagname = lbuf;
#ifdef FEAT_TAG_ANYWHITE
tagp.tagname_end = skiptowhite(lbuf);
if (*tagp.tagname_end == NUL) /* corrupted tag line */
if (*tagp.tagname_end == NUL)
#else
tagp.tagname_end = vim_strchr(lbuf, TAB);
if (tagp.tagname_end == NULL) /* corrupted tag line */
if (tagp.tagname_end == NULL)
#endif
{
if (vim_strchr(lbuf, NL) == NULL)
{
/* Truncated line, ignore it. Has been reported for
* Mozilla JS with extremely long names. */
if (p_verbose >= 5)
{
verbose_enter();
MSG(_("Ignoring long line in tags file"));
verbose_leave();
}
continue;
}
/* Corrupted tag line. */
line_error = TRUE;
break;
}

View File

@@ -1996,6 +1996,7 @@ set_termname(term)
# define HMT_DEC 4
# define HMT_JSBTERM 8
# define HMT_PTERM 16
# define HMT_URXVT 32
static int has_mouse_termcode = 0;
# endif
@@ -2030,6 +2031,11 @@ set_mouse_termcode(n, s)
if (n == KS_PTERM_MOUSE)
has_mouse_termcode |= HMT_PTERM;
else
# endif
# ifdef FEAT_MOUSE_URXVT
if (n == KS_URXVT_MOUSE)
has_mouse_termcode |= HMT_URXVT;
else
# endif
has_mouse_termcode |= HMT_NORMAL;
# endif
@@ -2067,6 +2073,11 @@ del_mouse_termcode(n)
if (n == KS_PTERM_MOUSE)
has_mouse_termcode &= ~HMT_PTERM;
else
# endif
# ifdef FEAT_MOUSE_URXVT
if (n == KS_URXVT_MOUSE)
has_mouse_termcode &= ~HMT_URXVT;
else
# endif
has_mouse_termcode &= ~HMT_NORMAL;
# endif
@@ -4049,7 +4060,11 @@ check_termcode(max_offset, buf, buflen)
if (tp[1 + (tp[0] != CSI)] == '>' && j == 2)
{
/* if xterm version >= 95 use mouse dragging */
if (extra >= 95 && ttym_flags != TTYM_URXVT)
if (extra >= 95
# ifdef TTYM_URXVT
&& ttym_flags != TTYM_URXVT
# endif
)
set_option_value((char_u *)"ttym", 0L,
(char_u *)"xterm2", 0);
/* if xterm version >= 141 try to get termcap codes */

View File

@@ -1454,6 +1454,16 @@ void func2(void)
int tab[] =
{1, 2,
3, 4,
5, 6};
printf("This line used to be indented incorrectly.\n");
}
int foo[]
#ifdef BAR
= { 1, 2, 3,
4, 5, 6 }
#endif
;

View File

@@ -1307,6 +1307,16 @@ void func2(void)
printf("This line used to be indented incorrectly.\n");
}
int foo[]
#ifdef BAR
= { 1, 2, 3,
4, 5, 6 }
#endif
;
int baz;
void func3(void)
{
int tab[] = {

View File

@@ -714,6 +714,26 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
366,
/**/
365,
/**/
364,
/**/
363,
/**/
362,
/**/
361,
/**/
360,
/**/
359,
/**/
358,
/**/
357,
/**/
356,
/**/