Skip to content

Commit f5464c4

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents e61a091 + 63de19e commit f5464c4

File tree

10 files changed

+117
-15
lines changed

10 files changed

+117
-15
lines changed

src/Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,12 +1695,14 @@ OBJ_COMMON = \
16951695
$(WSDEBUG_OBJ)
16961696

16971697
# The files included by tests are not in OBJ_COMMON.
1698-
OBJ = $(OBJ_COMMON) \
1698+
OBJ_MAIN = \
16991699
objects/json.o \
17001700
objects/main.o \
17011701
objects/memfile.o \
17021702
objects/message.o
17031703

1704+
OBJ = $(OBJ_COMMON) $(OBJ_MAIN)
1705+
17041706
OBJ_JSON_TEST = \
17051707
objects/memfile.o \
17061708
objects/message.o \
@@ -1722,7 +1724,11 @@ OBJ_MESSAGE_TEST = \
17221724

17231725
MESSAGE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MESSAGE_TEST)
17241726

1725-
ALL_OBJ = $(OBJ_COMMON) $(OBJ_JSON_TEST) $(OBJ_MEMFILE_TEST) $(OBJ_MESSAGE_TEST)
1727+
ALL_OBJ = $(OBJ_COMMON) \
1728+
$(OBJ_MAIN) \
1729+
$(OBJ_JSON_TEST) \
1730+
$(OBJ_MEMFILE_TEST) \
1731+
$(OBJ_MESSAGE_TEST)
17261732

17271733

17281734
PRO_AUTO = \
@@ -2102,6 +2108,7 @@ test_arglist \
21022108
test_delete \
21032109
test_diffmode \
21042110
test_digraph \
2111+
test_display \
21052112
test_ex_undo \
21062113
test_execute_func \
21072114
test_expand \
@@ -2879,7 +2886,9 @@ auto/gui_gtk_gresources.h: gui_gtk_res.xml $(GUI_GTK_RES_INPUTS)
28792886
# commands understand putting object files in another directory, it must be
28802887
# specified for each file separately.
28812888

2882-
objects objects/.dirstamp:
2889+
objects: objects/.dirstamp
2890+
2891+
objects/.dirstamp:
28832892
mkdir -p objects
28842893
touch objects/.dirstamp
28852894

src/auto/configure

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7502,7 +7502,7 @@ $as_echo_n "checking whether compiling with process communication is possible...
75027502
/* Check bitfields */
75037503
struct nbbuf {
75047504
unsigned int initDone:1;
7505-
ushort signmaplen;
7505+
unsigned short signmaplen;
75067506
};
75077507
75087508
int
@@ -12118,8 +12118,8 @@ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
1211812118

1211912119
fi
1212012120

12121-
for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \
12122-
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
12121+
for ac_func in fchdir fchown fsync getcwd getpseudotty \
12122+
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
1212312123
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
1212412124
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
1212512125
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \

src/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,7 @@ if test "$enable_channel" = "yes"; then
20532053
/* Check bitfields */
20542054
struct nbbuf {
20552055
unsigned int initDone:1;
2056-
ushort signmaplen;
2056+
unsigned short signmaplen;
20572057
};
20582058
], [
20592059
/* Check creating a socket. */

src/edit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3889,7 +3889,7 @@ ins_compl_prep(int c)
38893889
if (prev_col > 0)
38903890
dec_cursor();
38913891
/* only format when something was inserted */
3892-
if (!arrow_used && !ins_need_undo)
3892+
if (!arrow_used && !ins_need_undo && c != Ctrl_E)
38933893
insertchar(NUL, 0, -1);
38943894
if (prev_col > 0
38953895
&& ml_get_curline()[curwin->w_cursor.col] != NUL)

src/screen.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3649,13 +3649,19 @@ win_line(
36493649
draw_state = WL_FOLD;
36503650
if (fdc > 0)
36513651
{
3652-
/* Draw the 'foldcolumn'. */
3653-
fill_foldcolumn(extra, wp, FALSE, lnum);
3654-
n_extra = fdc;
3655-
p_extra = extra;
3656-
p_extra[n_extra] = NUL;
3657-
c_extra = NUL;
3658-
char_attr = hl_attr(HLF_FC);
3652+
/* Draw the 'foldcolumn'. Allocate a buffer, "extra" may
3653+
* already be in used. */
3654+
p_extra_free = alloc(12 + 1);
3655+
3656+
if (p_extra_free != NULL)
3657+
{
3658+
fill_foldcolumn(p_extra_free, wp, FALSE, lnum);
3659+
n_extra = fdc;
3660+
p_extra_free[n_extra] = NUL;
3661+
p_extra = p_extra_free;
3662+
c_extra = NUL;
3663+
char_attr = hl_attr(HLF_FC);
3664+
}
36593665
}
36603666
}
36613667
#endif

src/testdir/Make_all.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ NEW_TESTS = test_arglist.res \
148148
test_cscope.res \
149149
test_diffmode.res \
150150
test_digraph.res \
151+
test_display.res \
151152
test_farsi.res \
152153
test_fnameescape.res \
153154
test_gf.res \

src/testdir/test_cmdline.vim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,22 @@ func Test_paste_in_cmdline()
215215

216216
call feedkeys("f;:aaa \<C-R>\<C-A> bbb\<C-B>\"\<CR>", 'tx')
217217
call assert_equal('"aaa a;b-c*d bbb', @:)
218+
219+
call feedkeys(":\<C-\>etoupper(getline(1))\<CR>\<C-B>\"\<CR>", 'tx')
220+
call assert_equal('"ASDF.X /TMP/SOME VERYLONGWORD A;B-C*D ', @:)
218221
bwipe!
219222
endfunc
223+
224+
func Test_remove_char_in_cmdline()
225+
call feedkeys(":abc def\<S-Left>\<Del>\<C-B>\"\<CR>", 'tx')
226+
call assert_equal('"abc ef', @:)
227+
228+
call feedkeys(":abc def\<S-Left>\<BS>\<C-B>\"\<CR>", 'tx')
229+
call assert_equal('"abcdef', @:)
230+
231+
call feedkeys(":abc def ghi\<S-Left>\<C-W>\<C-B>\"\<CR>", 'tx')
232+
call assert_equal('"abc ghi', @:)
233+
234+
call feedkeys(":abc def\<S-Left>\<C-U>\<C-B>\"\<CR>", 'tx')
235+
call assert_equal('"def', @:)
236+
endfunc

src/testdir/test_display.vim

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
" Test for displaying stuff
2+
if !has('gui_running') && has('unix')
3+
set term=ansi
4+
endif
5+
6+
function! s:screenline(lnum, nr) abort
7+
let line = []
8+
for j in range(a:nr)
9+
for c in range(1, winwidth(0))
10+
call add(line, nr2char(screenchar(a:lnum+j, c)))
11+
endfor
12+
call add(line, "\n")
13+
endfor
14+
return join(line, '')
15+
endfunction
16+
17+
function! Test_display_foldcolumn()
18+
new
19+
vnew
20+
vert resize 25
21+
call assert_equal(25, winwidth(winnr()))
22+
set isprint=@
23+
24+
1put='e more noise blah blah‚ more stuff here'
25+
26+
let expect = "e more noise blah blah<82\n> more stuff here \n"
27+
28+
call cursor(2, 1)
29+
norm! zt
30+
redraw!
31+
call assert_equal(expect, s:screenline(1,2))
32+
set fdc=2
33+
redraw!
34+
let expect = " e more noise blah blah<\n 82> more stuff here \n"
35+
call assert_equal(expect, s:screenline(1,2))
36+
37+
quit!
38+
quit!
39+
endfunction

src/testdir/test_popup.vim

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,4 +464,22 @@ func Test_completefunc_with_scratch_buffer()
464464
set completeopt&
465465
endfunc
466466

467+
" <C-E> - select original typed text before the completion started without
468+
" auto-wrap text.
469+
func Test_completion_ctrl_e_without_autowrap()
470+
new
471+
let tw_save=&tw
472+
set tw=78
473+
let li = [
474+
\ '" zzz',
475+
\ '" zzzyyyyyyyyyyyyyyyyyyy']
476+
call setline(1, li)
477+
0
478+
call feedkeys("A\<C-X>\<C-N>\<C-E>\<Esc>", "tx")
479+
call assert_equal(li, getline(1, '$'))
480+
481+
let &tw=tw_save
482+
q!
483+
endfunc
484+
467485
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

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

780780
static int included_patches[] =
781781
{ /* Add new patch number below this line */
782+
/**/
783+
130,
784+
/**/
785+
129,
786+
/**/
787+
128,
788+
/**/
789+
127,
790+
/**/
791+
126,
792+
/**/
793+
125,
782794
/**/
783795
124,
784796
/**/

0 commit comments

Comments
 (0)