Skip to content

Commit 54e5082

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 88f75a7 + 03ff9bc commit 54e5082

File tree

18 files changed

+236
-43
lines changed

18 files changed

+236
-43
lines changed

runtime/doc/term.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*term.txt* For Vim version 8.0. Last change: 2017 Jan 27
1+
*term.txt* For Vim version 8.0. Last change: 2017 Feb 02
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -95,7 +95,12 @@ terminal when entering "raw" mode and 't_BD' when leaving "raw" mode. The
9595
terminal is then expected to put 't_PS' before pasted text and 't_PE' after
9696
pasted text. This way Vim can separate text that is pasted from characters
9797
that are typed. The pasted text is handled like when the middle mouse button
98-
is used.
98+
is used, it is inserted literally and not interpreted as commands.
99+
100+
When the cursor is in the first column, the pasted text will be inserted
101+
before it. Otherwise the pasted text is appended after the cursor position.
102+
This means one cannot paste after the first column. Unfortunately Vim does
103+
not have a way to tell where the mouse pointer was.
99104

100105
Note that in some situations Vim will not recognize the bracketed paste and
101106
you will get the raw text. In other situations Vim will only get the first

src/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2144,8 +2144,9 @@ test_arglist \
21442144
test_fnameescape \
21452145
test_fnamemodify \
21462146
test_fold \
2147-
test_glob2regpat \
2147+
test_ga \
21482148
test_gf \
2149+
test_glob2regpat \
21492150
test_gn \
21502151
test_goto \
21512152
test_gui \

src/ex_docmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11825,7 +11825,7 @@ ses_arglist(
1182511825
s = buf;
1182611826
}
1182711827
}
11828-
if (fputs("argadd ", fd) < 0
11828+
if (fputs("$argadd ", fd) < 0
1182911829
|| ses_put_fname(fd, s, flagp) == FAIL
1183011830
|| put_eol(fd) == FAIL)
1183111831
{

src/misc1.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3264,7 +3264,11 @@ change_warning(
32643264
#endif
32653265
msg_clr_eos();
32663266
(void)msg_end();
3267-
if (msg_silent == 0 && !silent_mode)
3267+
if (msg_silent == 0 && !silent_mode
3268+
#ifdef FEAT_EVAL
3269+
&& time_for_testing != 1
3270+
#endif
3271+
)
32683272
{
32693273
out_flush();
32703274
ui_delay(1000L, TRUE); /* give the user time to think about it */

src/normal.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9113,8 +9113,13 @@ nv_edit(cmdarg_T *cap)
91139113
beginline(BL_WHITE|BL_FIX);
91149114
break;
91159115

9116+
case K_PS: /* Bracketed paste works like "a"ppend, unless the
9117+
cursor is in the first column, then it inserts. */
9118+
if (curwin->w_cursor.col == 0)
9119+
break;
9120+
/*FALLTHROUGH*/
9121+
91169122
case 'a': /* "a"ppend is like "i"nsert on the next character. */
9117-
case K_PS: /* bracketed paste works like "a"ppend */
91189123
#ifdef FEAT_VIRTUALEDIT
91199124
/* increment coladd when in virtual space, increment the
91209125
* column otherwise, also to append after an unprintable char */

src/ops.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2571,8 +2571,7 @@ op_insert(oparg_T *oap, long count1)
25712571
}
25722572

25732573
t1 = oap->start;
2574-
if (edit(NUL, FALSE, (linenr_T)count1))
2575-
return;
2574+
(void)edit(NUL, FALSE, (linenr_T)count1);
25762575

25772576
/* When a tab was inserted, and the characters in front of the tab
25782577
* have been converted to a tab as well, the column of the cursor

src/screen.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,7 +2903,7 @@ win_line(
29032903
int endrow,
29042904
int nochange UNUSED) /* not updating for changed text */
29052905
{
2906-
int col; /* visual column on screen */
2906+
int col = 0; /* visual column on screen */
29072907
unsigned off; /* offset in ScreenLines/ScreenAttrs */
29082908
int c = 0; /* init for GCC */
29092909
long vcol = 0; /* virtual column (for tabs) */
@@ -3429,7 +3429,11 @@ win_line(
34293429
#else
34303430
--ptr;
34313431
#endif
3432-
n_skip = v - vcol;
3432+
#ifdef FEAT_MBYTE
3433+
/* character fits on the screen, don't need to skip it */
3434+
if ((*mb_ptr2cells)(ptr) >= c && col == 0)
3435+
#endif
3436+
n_skip = v - vcol;
34333437
}
34343438

34353439
/*

src/structs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,7 @@ typedef struct
13371337
int uf_varargs; /* variable nr of arguments */
13381338
int uf_flags;
13391339
int uf_calls; /* nr of active calls */
1340+
int uf_cleared; /* func_clear() was already called */
13401341
garray_T uf_args; /* arguments */
13411342
garray_T uf_lines; /* function lines */
13421343
#ifdef FEAT_PROFILE

src/testdir/runtest.vim

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ endfunc
8888

8989
function RunTheTest(test)
9090
echo 'Executing ' . a:test
91+
92+
" Avoid stopping at the "hit enter" prompt
93+
set nomore
94+
95+
" Avoid a three second wait when a message is about to be overwritten by the
96+
" mode message.
97+
set noshowmode
98+
9199
if exists("*SetUp")
92100
try
93101
call SetUp()
@@ -158,12 +166,11 @@ let s:flaky = [
158166
\ 'Test_communicate()',
159167
\ 'Test_nb_basic()',
160168
\ 'Test_pipe_through_sort_all()',
161-
\ 'Test_pipe_through_sort_some()'
169+
\ 'Test_pipe_through_sort_some()',
162170
\ 'Test_reltime()',
163171
\ ]
164172

165173
" Locate Test_ functions and execute them.
166-
set nomore
167174
redir @q
168175
silent function /^Test_
169176
redir END

src/testdir/test_alot.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ source test_float_func.vim
1919
source test_fnamemodify.vim
2020
source test_functions.vim
2121
source test_glob2regpat.vim
22+
source test_ga.vim
2223
source test_goto.vim
2324
source test_help_tagjump.vim
2425
source test_join.vim

0 commit comments

Comments
 (0)