Skip to content

Commit dfe72b8

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 7b3e0ab + ee91c33 commit dfe72b8

17 files changed

Lines changed: 386 additions & 209 deletions

src/Make_all.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ NEW_TESTS = \
168168
test_stat \
169169
test_statusline \
170170
test_substitute \
171+
test_suspend \
171172
test_swap \
172173
test_syn_attr \
173174
test_syntax \

src/ex_getln.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,11 @@ getcmdline(
13081308
/* CTRL-\ e doesn't work when obtaining an expression, unless it
13091309
* is in a mapping. */
13101310
if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
1311-
|| (ccline.cmdfirstc == '=' && KeyTyped)))
1311+
|| (ccline.cmdfirstc == '=' && KeyTyped)
1312+
#ifdef FEAT_EVAL
1313+
|| cmdline_star > 0
1314+
#endif
1315+
))
13121316
{
13131317
vungetc(c);
13141318
c = Ctrl_BSL;
@@ -1801,7 +1805,8 @@ getcmdline(
18011805
new_cmdpos = -1;
18021806
if (c == '=')
18031807
{
1804-
if (ccline.cmdfirstc == '=')/* can't do this recursively */
1808+
if (ccline.cmdfirstc == '=' // can't do this recursively
1809+
|| cmdline_star > 0) // or when typing a password
18051810
{
18061811
beep_flush();
18071812
c = ESC;
@@ -6516,8 +6521,11 @@ get_ccline_ptr(void)
65166521
char_u *
65176522
get_cmdline_str(void)
65186523
{
6519-
struct cmdline_info *p = get_ccline_ptr();
6524+
struct cmdline_info *p;
65206525

6526+
if (cmdline_star > 0)
6527+
return NULL;
6528+
p = get_ccline_ptr();
65216529
if (p == NULL)
65226530
return NULL;
65236531
return vim_strnsave(p->cmdbuff, p->cmdlen);

src/gui_w32.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3627,7 +3627,7 @@ gui_mch_browseW(
36273627
WCHAR *extp = NULL;
36283628
WCHAR *initdirp = NULL;
36293629
WCHAR *filterp;
3630-
char_u *p;
3630+
char_u *p, *q;
36313631

36323632
if (dflt == NULL)
36333633
fileBuf[0] = NUL;
@@ -3713,16 +3713,16 @@ gui_mch_browseW(
37133713

37143714
/* Convert from UCS2 to 'encoding'. */
37153715
p = utf16_to_enc(fileBuf, NULL);
3716-
if (p != NULL)
3717-
/* when out of memory we get garbage for non-ASCII chars */
3718-
STRCPY(fileBuf, p);
3719-
vim_free(p);
3716+
if (p == NULL)
3717+
return NULL;
37203718

37213719
/* Give focus back to main window (when using MDI). */
37223720
SetFocus(s_hwnd);
37233721

37243722
/* Shorten the file name if possible */
3725-
return vim_strsave(shorten_fname1((char_u *)fileBuf));
3723+
q = vim_strsave(shorten_fname1(p));
3724+
vim_free(p);
3725+
return q;
37263726
}
37273727
# endif /* FEAT_MBYTE */
37283728

src/move.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ comp_botline(win_T *wp)
128128

129129
#ifdef FEAT_SYN_HL
130130
static linenr_T last_cursorline = 0;
131+
132+
void
133+
reset_cursorline(void)
134+
{
135+
last_cursorline = 0;
136+
}
131137
#endif
132138

133139
/*

src/option.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8429,6 +8429,11 @@ set_bool_option(
84298429
p_lrm = !p_lnr;
84308430
#endif
84318431

8432+
#ifdef FEAT_SYN_HL
8433+
else if ((int *)varp == &curwin->w_p_cul && !value && old_value)
8434+
reset_cursorline();
8435+
#endif
8436+
84328437
#ifdef FEAT_PERSISTENT_UNDO
84338438
/* 'undofile' */
84348439
else if ((int *)varp == &curbuf->b_p_udf || (int *)varp == &p_udf)

src/os_unix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8054,7 +8054,7 @@ xsmp_init(void)
80548054
&smcallbacks,
80558055
NULL,
80568056
&xsmp.clientid,
8057-
sizeof(errorstring),
8057+
sizeof(errorstring) - 1,
80588058
errorstring);
80598059
if (xsmp.smcconn == NULL)
80608060
{

src/proto/move.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* move.c */
2+
void reset_cursorline(void);
23
void update_topline_redraw(void);
34
void update_topline(void);
45
void update_curswant(void);

src/proto/quickfix.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* quickfix.c */
22
int qf_init(win_T *wp, char_u *efile, char_u *errorformat, int newlist, char_u *qf_title, char_u *enc);
33
void qf_free_all(win_T *wp);
4-
void copy_loclist(win_T *from, win_T *to);
4+
void copy_loclist_stack(win_T *from, win_T *to);
55
void qf_jump(qf_info_T *qi, int dir, int errornr, int forceit);
66
void qf_list(exarg_T *eap);
77
void qf_age(exarg_T *eap);

0 commit comments

Comments
 (0)