Skip to content

Commit 43d09fb

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 4c45ccc + 37b9b81 commit 43d09fb

15 files changed

Lines changed: 239 additions & 69 deletions

File tree

nsis/gvim.nsi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,16 @@ Section "Vim executables and runtime files"
191191
File ${VIMSRC}\vimrun.exe
192192
File /oname=tee.exe ${VIMSRC}\teew32.exe
193193
File /oname=xxd.exe ${VIMSRC}\xxdw32.exe
194-
File ${VIMTOOLS}\diff.exe
195194
File ${VIMRT}\vimtutor.bat
196195
File ${VIMRT}\README.txt
197196
File ..\uninstal.txt
198197
File ${VIMRT}\*.vim
199198
File ${VIMRT}\rgb.txt
200199

200+
File ${VIMTOOLS}\diff.exe
201+
File ${VIMTOOLS}\winpty32.dll
202+
File ${VIMTOOLS}\winpty-agent.exe
203+
201204
SetOutPath $0\colors
202205
File ${VIMRT}\colors\*.*
203206

runtime/optwin.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" These commands create the option window.
22
"
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last Change: 2017 Aug 11
4+
" Last Change: 2017 Aug 19
55

66
" If there already is an option window, jump to that one.
77
let buf = bufnr('option-window')
@@ -510,6 +510,10 @@ if has("terminal")
510510
call append("$", "termkey\tkey that precedes Vim commands in a terminal window")
511511
call append("$", "\t(local to window)")
512512
call <SID>OptionL("tk")
513+
if exists("&winptydll")
514+
call append("$", "winptydll\tname of the winpty dynamic library")
515+
call <SID>OptionG("winptydll", &winptydll)
516+
endif
513517
endif
514518

515519

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2291,6 +2291,7 @@ test_arglist \
22912291
test_utf8_comparisons \
22922292
test_viminfo \
22932293
test_vimscript \
2294+
test_virtualedit \
22942295
test_visual \
22952296
test_window_cmd \
22962297
test_window_id \

src/channel.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,7 +3039,9 @@ channel_fill_poll_write(int nfd_in, struct pollfd *fds)
30393039
{
30403040
chanpart_T *in_part = &ch->ch_part[PART_IN];
30413041

3042-
if (in_part->ch_fd != INVALID_FD && in_part->ch_bufref.br_buf != NULL)
3042+
if (in_part->ch_fd != INVALID_FD
3043+
&& (in_part->ch_bufref.br_buf != NULL
3044+
|| in_part->ch_writeque.wq_next != NULL))
30433045
{
30443046
in_part->ch_poll_idx = nfd;
30453047
fds[nfd].fd = in_part->ch_fd;
@@ -3582,7 +3584,7 @@ channel_set_nonblock(channel_T *channel, ch_part_T part)
35823584

35833585
ioctlsocket(fd, FIONBIO, &val);
35843586
#else
3585-
fcntl(fd, F_SETFL, O_NONBLOCK);
3587+
(void)fcntl(fd, F_SETFL, O_NONBLOCK);
35863588
#endif
35873589
ch_part->ch_nonblocking = TRUE;
35883590
}
@@ -3971,13 +3973,7 @@ channel_poll_check(int ret_in, void *fds_in)
39713973
idx = in_part->ch_poll_idx;
39723974
if (ret > 0 && idx != -1 && (fds[idx].revents & POLLOUT))
39733975
{
3974-
if (in_part->ch_buf_append)
3975-
{
3976-
if (in_part->ch_bufref.br_buf != NULL)
3977-
channel_write_new_lines(in_part->ch_bufref.br_buf);
3978-
}
3979-
else
3980-
channel_write_in(channel);
3976+
channel_write_input(channel);
39813977
--ret;
39823978
}
39833979
}

src/misc2.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,18 @@ check_cursor_col_win(win_T *win)
605605
else if (ve_flags == VE_ALL)
606606
{
607607
if (oldcoladd > win->w_cursor.col)
608+
{
608609
win->w_cursor.coladd = oldcoladd - win->w_cursor.col;
610+
if (win->w_cursor.col < len && win->w_cursor.coladd > 0)
611+
{
612+
int cs, ce;
613+
614+
/* check that coladd is not more than the char width */
615+
getvcol(win, &win->w_cursor, &cs, NULL, &ce);
616+
if (win->w_cursor.coladd > ce - cs)
617+
win->w_cursor.coladd = ce - cs;
618+
}
619+
}
609620
else
610621
/* avoid weird number when there is a miscalculation or overflow */
611622
win->w_cursor.coladd = 0;

src/normal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,12 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
15711571

15721572
oap->start = VIsual;
15731573
if (VIsual_mode == 'V')
1574+
{
15741575
oap->start.col = 0;
1576+
# ifdef FEAT_VIRTUALEDIT
1577+
oap->start.coladd = 0;
1578+
# endif
1579+
}
15751580
}
15761581

15771582
/*
@@ -7614,6 +7619,7 @@ nv_gomark(cmdarg_T *cap)
76147619
if (!virtual_active())
76157620
curwin->w_cursor.coladd = 0;
76167621
#endif
7622+
check_cursor_col();
76177623
#ifdef FEAT_FOLDING
76187624
if (cap->oap->op_type == OP_NOP
76197625
&& pos != NULL

src/option.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3276,6 +3276,7 @@ static struct vimoption options[] =
32763276
p_term("t_SC", T_CSC)
32773277
p_term("t_EC", T_CEC)
32783278
p_term("t_SH", T_CSH)
3279+
p_term("t_RS", T_CRS)
32793280
p_term("t_IS", T_CIS)
32803281
p_term("t_ke", T_KE)
32813282
p_term("t_ks", T_KS)

src/syntax.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10000,7 +10000,7 @@ highlight_changed(void)
1000010000
if (ga_grow(&highlight_ga, 28) == FAIL)
1000110001
return FAIL;
1000210002
hlcnt = highlight_ga.ga_len;
10003-
if (id_S == 0)
10003+
if (id_S == -1)
1000410004
{
1000510005
/* Make sure id_S is always valid to simplify code below. Use the last
1000610006
* entry. */

0 commit comments

Comments
 (0)