File tree Expand file tree Collapse file tree 10 files changed +117
-15
lines changed
Expand file tree Collapse file tree 10 files changed +117
-15
lines changed Original file line number Diff line number Diff 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+
17041706OBJ_JSON_TEST = \
17051707 objects/memfile.o \
17061708 objects/message.o \
@@ -1722,7 +1724,11 @@ OBJ_MESSAGE_TEST = \
17221724
17231725MESSAGE_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
17281734PRO_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
Original file line number Diff line number Diff 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
75087508int
@@ -12118,8 +12118,8 @@ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
1211812118
1211912119fi
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 \
Original file line number Diff line number Diff 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. */
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 \
Original file line number Diff line number Diff 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!
219222endfunc
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
Original file line number Diff line number Diff line change 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+ 1 put= ' 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
Original file line number Diff line number Diff line change @@ -464,4 +464,22 @@ func Test_completefunc_with_scratch_buffer()
464464 set completeopt &
465465endfunc
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
Original file line number Diff line number Diff line change @@ -779,6 +779,18 @@ static char *(features[]) =
779779
780780static 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/**/
You can’t perform that action at this time.
0 commit comments