Skip to content

Commit 51e4114

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 3712d18 + b3435b0 commit 51e4114

19 files changed

Lines changed: 246 additions & 208 deletions

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,6 @@ test1 \
20452045
test_breakindent \
20462046
test_changelist \
20472047
test_close_count \
2048-
test_command_count \
20492048
test_comparators \
20502049
test_erasebackword \
20512050
test_eval \
@@ -2083,6 +2082,7 @@ test_arglist \
20832082
test_channel \
20842083
test_charsearch \
20852084
test_cmdline \
2085+
test_command_count \
20862086
test_crypt \
20872087
test_cscope \
20882088
test_cursor_func \

src/channel.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,12 @@ add_channel(void)
346346
return channel;
347347
}
348348

349+
int
350+
has_any_channel(void)
351+
{
352+
return first_channel != NULL;
353+
}
354+
349355
/*
350356
* Called when the refcount of a channel is zero.
351357
* Return TRUE if "channel" has a callback and the associated job wasn't

src/ex_docmd.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9083,9 +9083,18 @@ do_sleep(long msec)
90839083
if (due_time > 0 && due_time < wait_now)
90849084
wait_now = due_time;
90859085
}
9086+
#endif
9087+
#ifdef FEAT_JOB_CHANNEL
9088+
if (has_any_channel() && wait_now > 100L)
9089+
wait_now = 100L;
90869090
#endif
90879091
ui_delay(wait_now, TRUE);
9088-
ui_breakcheck();
9092+
#ifdef FEAT_JOB_CHANNEL
9093+
if (has_any_channel())
9094+
ui_breakcheck_force(TRUE);
9095+
else
9096+
#endif
9097+
ui_breakcheck();
90899098
#ifdef MESSAGE_QUEUE
90909099
/* Process the netbeans and clientserver messages that may have been
90919100
* received in the call to ui_breakcheck() when the GUI is in use. This

src/os_amiga.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ mch_call_shell(
13811381
* trouble with lattice-c programs.
13821382
*/
13831383
void
1384-
mch_breakcheck(void)
1384+
mch_breakcheck(int force)
13851385
{
13861386
if (SetSignal(0L, (long)(SIGBREAKF_CTRL_C|SIGBREAKF_CTRL_D|SIGBREAKF_CTRL_E|SIGBREAKF_CTRL_F)) & SIGBREAKF_CTRL_C)
13871387
got_int = TRUE;

src/os_unix.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5386,9 +5386,10 @@ mch_clear_job(job_T *job)
53865386
* In cooked mode we should get SIGINT, no need to check.
53875387
*/
53885388
void
5389-
mch_breakcheck(void)
5389+
mch_breakcheck(int force)
53905390
{
5391-
if (curr_tmode == TMODE_RAW && RealWaitForChar(read_cmd_fd, 0L, NULL, NULL))
5391+
if ((curr_tmode == TMODE_RAW || force)
5392+
&& RealWaitForChar(read_cmd_fd, 0L, NULL, NULL))
53925393
fill_input_buf(FALSE);
53935394
}
53945395

src/os_win32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6187,10 +6187,10 @@ mch_remove(char_u *name)
61876187

61886188

61896189
/*
6190-
* check for an "interrupt signal": CTRL-break or CTRL-C
6190+
* Check for an "interrupt signal": CTRL-break or CTRL-C.
61916191
*/
61926192
void
6193-
mch_breakcheck(void)
6193+
mch_breakcheck(int force)
61946194
{
61956195
#ifndef FEAT_GUI_W32 /* never used */
61966196
if (g_fCtrlCPressed || g_fCBrkPressed)

src/proto/channel.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ int ch_log_active(void);
44
void ch_log(channel_T *ch, char *msg);
55
void ch_logs(channel_T *ch, char *msg, char *name);
66
channel_T *add_channel(void);
7+
int has_any_channel(void);
78
int channel_unref(channel_T *channel);
89
int free_unused_channels_contents(int copyID, int mask);
910
void free_unused_channels(int copyID, int mask);

src/proto/os_amiga.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int mch_get_shellsize(void);
3636
void mch_set_shellsize(void);
3737
void mch_new_shellsize(void);
3838
int mch_call_shell(char_u *cmd, int options);
39-
void mch_breakcheck(void);
39+
void mch_breakcheck(int force);
4040
long Chk_Abort(void);
4141
int mch_expandpath(garray_T *gap, char_u *pat, int flags);
4242
int mch_has_exp_wildcard(char_u *p);

src/proto/os_unix.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void mch_start_job(char **argv, job_T *job, jobopt_T *options);
6161
char *mch_job_status(job_T *job);
6262
int mch_stop_job(job_T *job, char_u *how);
6363
void mch_clear_job(job_T *job);
64-
void mch_breakcheck(void);
64+
void mch_breakcheck(int force);
6565
int mch_expandpath(garray_T *gap, char_u *path, int flags);
6666
int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, int flags);
6767
int mch_has_exp_wildcard(char_u *p);

src/proto/os_win32.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void mch_set_normal_colors(void);
4848
void mch_write(char_u *s, int len);
4949
void mch_delay(long msec, int ignoreinput);
5050
int mch_remove(char_u *name);
51-
void mch_breakcheck(void);
51+
void mch_breakcheck(int force);
5252
long_u mch_total_mem(int special);
5353
int mch_wrename(WCHAR *wold, WCHAR *wnew);
5454
int mch_rename(const char *pszOldFile, const char *pszNewFile);

0 commit comments

Comments
 (0)