Skip to content

Commit 079c0c9

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents d96d409 + a899e6e commit 079c0c9

File tree

10 files changed

+74
-13
lines changed

10 files changed

+74
-13
lines changed

src/mbyte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5807,7 +5807,7 @@ static char e_xim[] = N_("E285: Failed to create input context");
58075807
#endif
58085808

58095809
#if defined(FEAT_GUI_X11) || defined(PROTO)
5810-
# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(sun)
5810+
# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(SUN_SYSTEM)
58115811
# define USE_X11R6_XIM
58125812
# endif
58135813

src/option.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ struct vimoption
441441

442442
/* when option changed, what to display: */
443443
#define P_RSTAT 0x1000 /* redraw status lines */
444-
#define P_RWIN 0x2000 /* redraw current window */
445-
#define P_RBUF 0x4000 /* redraw current buffer */
444+
#define P_RWIN 0x2000 /* redraw current window and recompute text */
445+
#define P_RBUF 0x4000 /* redraw current buffer and recompute text */
446446
#define P_RALL 0x6000 /* redraw all windows */
447447
#define P_RCLR 0x7000 /* clear and redraw all */
448448

@@ -463,6 +463,7 @@ struct vimoption
463463
#define P_CURSWANT 0x4000000L /* update curswant required; not needed when
464464
* there is a redraw flag */
465465
#define P_NDNAME 0x8000000L /* only normal dir name chars allowed */
466+
#define P_RWINONLY 0x10000000L /* only redraw current window */
466467

467468
#define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
468469

@@ -979,7 +980,7 @@ static struct vimoption options[] =
979980
(char_u *)NULL, PV_NONE,
980981
#endif
981982
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
982-
{"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWIN,
983+
{"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWINONLY,
983984
#ifdef FEAT_SYN_HL
984985
(char_u *)VAR_WIN, PV_CUL,
985986
#else
@@ -9238,6 +9239,8 @@ check_redraw(long_u flags)
92389239
changed_window_setting();
92399240
if (flags & P_RBUF)
92409241
redraw_curbuf_later(NOT_VALID);
9242+
if (flags & P_RWINONLY)
9243+
redraw_later(NOT_VALID);
92419244
if (doclear)
92429245
redraw_all_later(CLEAR);
92439246
else if (all)

src/os_unixx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# define signal sigset
1818
#endif
1919

20-
/* sun's sys/ioctl.h redefines symbols from termio world */
21-
#if defined(HAVE_SYS_IOCTL_H) && !defined(sun)
20+
/* Sun's sys/ioctl.h redefines symbols from termio world */
21+
#if defined(HAVE_SYS_IOCTL_H) && !defined(SUN_SYSTEM)
2222
# include <sys/ioctl.h>
2323
#endif
2424

src/pty.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
#ifdef sinix
6363
#undef buf_T
6464
#endif
65-
# ifdef sun
65+
# ifdef SUN_SYSTEM
6666
# include <sys/conf.h>
6767
# endif
6868
#endif
@@ -87,11 +87,11 @@
8787
# include <sys/ptem.h>
8888
#endif
8989

90-
#if !defined(sun) && !defined(VMS) && !defined(MACOS)
90+
#if !defined(SUN_SYSTEM) && !defined(VMS) && !defined(MACOS)
9191
# include <sys/ioctl.h>
9292
#endif
9393

94-
#if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
94+
#if defined(SUN_SYSTEM) && defined(LOCKPTY) && !defined(TIOCEXCL)
9595
# include <sys/ttold.h>
9696
#endif
9797

@@ -166,7 +166,7 @@ SetupSlavePTY(int fd)
166166
# endif
167167
if (ioctl(fd, I_PUSH, "ldterm") != 0)
168168
return -1;
169-
# ifdef sun
169+
# ifdef SUN_SYSTEM
170170
if (ioctl(fd, I_PUSH, "ttcompat") != 0)
171171
return -1;
172172
# endif
@@ -391,7 +391,7 @@ OpenPTY(char **ttyn)
391391
continue;
392392
}
393393
#endif
394-
#if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3)
394+
#if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3)
395395
/* Hack to ensure that the slave side of the pty is
396396
* unused. May not work in anything other than SunOS4.1
397397
*/

src/testdir/test_channel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ def handle(self):
127127
print("sending: {0}".format(cmd))
128128
self.request.sendall(cmd.encode('utf-8'))
129129
response = "ok"
130-
time.sleep(0.01)
130+
# Need to wait for Vim to give up, otherwise it
131+
# sometimes fails on OS X.
132+
time.sleep(0.2)
131133
elif decoded[1] == 'malformed2':
132134
cmd = '"unterminated string'
133135
print("sending: {0}".format(cmd))

src/testdir/test_channel.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ func Ch_requestHandler(handle, msg)
2626
endfunc
2727

2828
func Ch_communicate(port)
29+
" Avoid dropping messages, since we don't use a callback here.
30+
let s:chopt.drop = 'never'
2931
let handle = ch_open('localhost:' . a:port, s:chopt)
32+
unlet s:chopt.drop
3033
if ch_status(handle) == "fail"
3134
call assert_false(1, "Can't open channel")
3235
return

src/testdir/test_cmdline.vim

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,26 @@ func Test_expand_star_star()
194194
bwipe!
195195
call delete('a', 'rf')
196196
endfunc
197+
198+
func Test_paste_in_cmdline()
199+
let @a = "def"
200+
call feedkeys(":abc \<C-R>a ghi\<C-B>\"\<CR>", 'tx')
201+
call assert_equal('"abc def ghi', @:)
202+
203+
new
204+
call setline(1, 'asdf.x /tmp/some verylongword a;b-c*d ')
205+
206+
call feedkeys(":aaa \<C-R>\<C-W> bbb\<C-B>\"\<CR>", 'tx')
207+
call assert_equal('"aaa asdf bbb', @:)
208+
209+
call feedkeys("ft:aaa \<C-R>\<C-F> bbb\<C-B>\"\<CR>", 'tx')
210+
call assert_equal('"aaa /tmp/some bbb', @:)
211+
212+
set incsearch
213+
call feedkeys("fy:aaa veryl\<C-R>\<C-W> bbb\<C-B>\"\<CR>", 'tx')
214+
call assert_equal('"aaa verylongword bbb', @:)
215+
216+
call feedkeys("f;:aaa \<C-R>\<C-A> bbb\<C-B>\"\<CR>", 'tx')
217+
call assert_equal('"aaa a;b-c*d bbb', @:)
218+
bwipe!
219+
endfunc

src/testdir/test_goto.vim

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,18 @@ func Test_gd_string_only()
273273
\ ]
274274
call XTest_goto_decl('gd', lines, 5, 10)
275275
endfunc
276+
277+
" Check that setting 'cursorline' does not change curswant
278+
func Test_cursorline_keep_col()
279+
new
280+
call setline(1, ['long long long line', 'short line'])
281+
normal ggfi
282+
let pos = getcurpos()
283+
normal j
284+
set cursorline
285+
normal k
286+
call assert_equal(pos, getcurpos())
287+
bwipe!
288+
set nocursorline
289+
endfunc
290+

src/version.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,16 @@ static char *(features[]) =
779779

780780
static int included_patches[] =
781781
{ /* Add new patch number below this line */
782+
/**/
783+
123,
784+
/**/
785+
122,
786+
/**/
787+
121,
788+
/**/
789+
120,
790+
/**/
791+
119,
782792
/**/
783793
118,
784794
/**/

src/vim.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@
269269
# define UNUSED
270270
#endif
271271

272+
/* Used to check for "sun", "__sun" is used by newer compilers. */
273+
#if defined(__sun)
274+
# define SUN_SYSTEM
275+
#endif
276+
272277
/* if we're compiling in C++ (currently only KVim), the system
273278
* headers must have the correct prototypes or nothing will build.
274279
* conversely, our prototypes might clash due to throw() specifiers and
@@ -2490,7 +2495,7 @@ typedef enum
24902495
#define FNE_INCL_BR 1 /* include [] in name */
24912496
#define FNE_CHECK_START 2 /* check name starts with valid character */
24922497

2493-
#if (defined(sun) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
2498+
#if (defined(SUN_SYSTEM) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
24942499
&& defined(S_ISCHR)
24952500
# define OPEN_CHR_FILES
24962501
#endif

0 commit comments

Comments
 (0)