Skip to content

Commit 1b14651

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 4374735 + 6e450a5 commit 1b14651

6 files changed

Lines changed: 44 additions & 17 deletions

File tree

src/Make_mvc.mak

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,9 +1123,6 @@ clean:
11231123
cd GvimExt
11241124
$(MAKE) /NOLOGO -f Makefile clean
11251125
cd ..
1126-
cd GvimExt
1127-
$(MAKE) /NOLOGO -f Makefile clean
1128-
cd ..
11291126
- if exist testdir\*.out del testdir\*.out
11301127

11311128
test:

src/evalfunc.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3973,7 +3973,8 @@ get_buffer_info(buf_T *buf)
39733973
dict_add_nr_str(dict, "bufnr", buf->b_fnum, NULL);
39743974
dict_add_nr_str(dict, "name", 0L,
39753975
buf->b_ffname != NULL ? buf->b_ffname : (char_u *)"");
3976-
dict_add_nr_str(dict, "lnum", buflist_findlnum(buf), NULL);
3976+
dict_add_nr_str(dict, "lnum", buf == curbuf ? curwin->w_cursor.lnum
3977+
: buflist_findlnum(buf), NULL);
39773978
dict_add_nr_str(dict, "loaded", buf->b_ml.ml_mfp != NULL, NULL);
39783979
dict_add_nr_str(dict, "listed", buf->b_p_bl, NULL);
39793980
dict_add_nr_str(dict, "changed", bufIsChanged(buf), NULL);
@@ -9535,15 +9536,15 @@ do_searchpair(
95359536

95369537
/* Make two search patterns: start/end (pat2, for in nested pairs) and
95379538
* start/middle/end (pat3, for the top pair). */
9538-
pat2 = alloc((unsigned)(STRLEN(spat) + STRLEN(epat) + 15));
9539-
pat3 = alloc((unsigned)(STRLEN(spat) + STRLEN(mpat) + STRLEN(epat) + 23));
9539+
pat2 = alloc((unsigned)(STRLEN(spat) + STRLEN(epat) + 17));
9540+
pat3 = alloc((unsigned)(STRLEN(spat) + STRLEN(mpat) + STRLEN(epat) + 25));
95409541
if (pat2 == NULL || pat3 == NULL)
95419542
goto theend;
9542-
sprintf((char *)pat2, "\\(%s\\m\\)\\|\\(%s\\m\\)", spat, epat);
9543+
sprintf((char *)pat2, "\\m\\(%s\\m\\)\\|\\(%s\\m\\)", spat, epat);
95439544
if (*mpat == NUL)
95449545
STRCPY(pat3, pat2);
95459546
else
9546-
sprintf((char *)pat3, "\\(%s\\m\\)\\|\\(%s\\m\\)\\|\\(%s\\m\\)",
9547+
sprintf((char *)pat3, "\\m\\(%s\\m\\)\\|\\(%s\\m\\)\\|\\(%s\\m\\)",
95479548
spat, epat, mpat);
95489549
if (flags & SP_START)
95499550
options |= SEARCH_START;

src/term.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6075,8 +6075,12 @@ hex_digit(int c)
60756075
guicolor_T
60766076
gui_get_color_cmn(char_u *name)
60776077
{
6078-
/* On MS-Windows an RGB macro is available and it's different from ours,
6079-
* but does what is needed. */
6078+
/* On MS-Windows an RGB macro is available and it produces 0x00bbggrr color
6079+
* values as used by the MS-Windows GDI api. It should be used only for
6080+
* MS-Windows GDI builds. */
6081+
# if defined(RGB) && defined(WIN32) && !defined(FEAT_GUI)
6082+
# undef RGB
6083+
# endif
60806084
# ifndef RGB
60816085
# define RGB(r, g, b) ((r<<16) | (g<<8) | (b))
60826086
# endif

src/testdir/Make_dos.mak

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ $(DOSTMP_INFILES): $(*B).in
4444
# This moves test99.in to test99.in.bak temporarily.
4545
$(TEST_OUTFILES): $(DOSTMP)\$(*B).in
4646
-@if exist test.out DEL test.out
47-
move $(*B).in $(*B).in.bak
48-
copy $(DOSTMP)\$(*B).in $(*B).in
49-
copy $(*B).ok test.ok
47+
move $(*B).in $(*B).in.bak > nul
48+
copy $(DOSTMP)\$(*B).in $(*B).in > nul
49+
copy $(*B).ok test.ok > nul
5050
$(VIMPROG) -u dos.vim $(NO_PLUGIN) -s dotest.in $(*B).in
51-
-@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out
52-
-@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in
51+
-@if exist test.out MOVE /y test.out $(DOSTMP)\$(*B).out > nul
52+
-@if exist $(*B).in.bak move /y $(*B).in.bak $(*B).in > nul
5353
-@if exist test.ok del test.ok
5454
-@if exist Xdir1 rd /s /q Xdir1
5555
-@if exist Xfind rd /s /q Xfind
@@ -58,10 +58,10 @@ $(TEST_OUTFILES): $(DOSTMP)\$(*B).in
5858
$(VIMPROG) -u dos.vim $(NO_PLUGIN) "+set ff=unix|f test.out|wq" \
5959
$(DOSTMP)\$(*B).out
6060
@diff test.out $*.ok & if errorlevel 1 \
61-
( move /y test.out $*.failed \
61+
( move /y test.out $*.failed > nul \
6262
& del $(DOSTMP)\$(*B).out \
6363
& echo $* FAILED >> test.log ) \
64-
else ( move /y test.out $*.out )
64+
else ( move /y test.out $*.out > nul )
6565

6666
# Must run test1 first to create small.vim.
6767
# This rule must come after the one that copies the input files to dostmp to

src/testdir/test_search.vim

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,3 +279,18 @@ func Test_use_sub_pat()
279279
call X()
280280
bwipe!
281281
endfunc
282+
283+
func Test_searchpair()
284+
new
285+
call setline(1, ['other code here', '', '[', '" cursor here', ']'])
286+
4
287+
let a=searchpair('\[','',']','bW')
288+
call assert_equal(3, a)
289+
set nomagic
290+
4
291+
let a=searchpair('\[','',']','bW')
292+
call assert_equal(3, a)
293+
set magic
294+
q!
295+
endfunc
296+

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+
147,
784+
/**/
785+
146,
786+
/**/
787+
145,
788+
/**/
789+
144,
790+
/**/
791+
143,
782792
/**/
783793
142,
784794
/**/

0 commit comments

Comments
 (0)