Skip to content

Commit 365fede

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents acf95bf + a87f8fd commit 365fede

13 files changed

Lines changed: 339 additions & 865 deletions

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ SRC_ALL = \
141141
src/testdir/if_ver*.vim \
142142
src/testdir/color_ramp.vim \
143143
src/proto.h \
144+
src/protodef.h \
144145
src/proto/arabic.pro \
145146
src/proto/beval.pro \
146147
src/proto/blowfish.pro \

src/INSTALLpc.txt

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ INSTALLpc.txt - Installation of Vim on PC
33
This file contains instructions for compiling Vim. If you already have an
44
executable version of Vim, you don't need this.
55

6-
You can find the lastest here: https://github.com/vim/vim-win32-installer
6+
You can find the latest here: https://github.com/vim/vim-win32-installer
77
This page also has links to install support for interfaces such as Perl,
88
Python, Lua, etc.
99

@@ -164,6 +164,11 @@ options:
164164
msvc2015
165165
For x64 builds run this with the "x86_amd64" option:
166166
msvc2015 x86_amd64
167+
This enables x86_x64 cross compiler. This works on any editions including
168+
Express edition.
169+
If you use Community (or Professional) edition, you can enable the x64 native
170+
compiler by using the "x64" option:
171+
msvc2015 x64
167172

168173
The following Visual C++ team blog can serve as a reference page:
169174
http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
@@ -182,7 +187,7 @@ Visual C++ Toolkit 2003 *msvc-2003-toolkit*
182187

183188
You could download the Microsoft Visual C++ Toolkit 2003 from
184189
http://msdn.microsoft.com/visualc/vctoolkit2003/
185-
Unfortunately this URL is no longer valid. Inofficial downloads appear to be
190+
Unfortunately this URL is no longer valid. Unofficial downloads appear to be
186191
available from links mentioned on these pages (use at your own risk):
187192
http://www.filewatcher.com/m/VCToolkitSetup.exe.32952488.0.0.html
188193
http://feargame.net/wiki/index.php?title=Building_Source_with_the_VC2003_Toolkit
@@ -276,12 +281,12 @@ Download an installer:
276281

277282
Execute the installer and follow the instructions to update basic packages.
278283
At the end keep the checkbox checked to run msys2 now. If needed, you can
279-
open the window from the start menu, MSYS2 64 bit / MSYS2 MSYS
284+
open the window from the start menu, MSYS2 64 bit / MSYS2 MSYS.
280285

281286
Execute:
282287
$ pacman -Syu
283-
284-
And restart MSYS2 window (select "MSYS2 MSYS" icon from the Start Menu).
288+
289+
And restart MSYS2 console (select "MSYS2 MSYS" icon from the Start Menu).
285290
Then execute:
286291
$ pacman -Su
287292

@@ -297,6 +302,7 @@ The following package groups are required for building Vim:
297302
* mingw-w64-i686-toolchain (for building 32-bit Vim)
298303
* mingw-w64-x86_64-toolchain (for building 64-bit Vim)
299304

305+
(These groups also include some useful packages which are not used by Vim.)
300306
Use the following command to install them:
301307

302308
$ pacman -S base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
@@ -305,8 +311,18 @@ Or you can use the `pacboy` command to avoid long package names:
305311

306312
$ pacboy -S base-devel: toolchain:m
307313

314+
The suffix ":" means that it disables the package name translation.
315+
The suffix ":m" means both i686 and x86_64. You can also use the ":i" suffix
316+
to install only i686, and the ":x" suffix to install only x86_64.
308317
(See `pacboy help` for the help.)
309318

319+
See also the pacman page in ArchWiki for the general usage of pacman:
320+
https://wiki.archlinux.org/index.php/pacman
321+
322+
MSYS2 has its own git package, and you can also install it via pacman:
323+
324+
$ pacman -S git
325+
310326

311327
2.3. Keep the build environment up-to-date
312328

@@ -316,7 +332,7 @@ In that case, you just need to execute the command:
316332
$ pacman -Syu
317333

318334

319-
# Build Vim
335+
2.4. Build Vim
320336

321337
Select one of the following icon from the Start Menu:
322338

@@ -329,12 +345,12 @@ Go to the source directory of Vim, then execute the make command. E.g.:
329345
make -f Make_ming.mak GUI=no
330346
make -f Make_ming.mak GUI=no DEBUG=yes
331347

332-
NOTE: you can't execute the vim.exe in the MSYS console, open a normal Windows
348+
NOTE: you can't execute vim.exe in the MSYS2 console, open a normal Windows
333349
console for that. You need to set $PATH to be able to build there, e.g.:
334350

335351
set PATH=c:\msys64\mingw32\bin;c:\msys64\usr\bin;%PATH%
336352

337-
This command is in msys32.bat. Or or the 64 bit compiler use msys64.bat:
353+
This command is in msys32.bat. Or for the 64 bit compiler use msys64.bat:
338354

339355
set PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;%PATH%
340356

src/diff.c

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ diff_mark_adjust_tp(
295295

296296
if (diff_internal())
297297
{
298-
// Will udpate diffs before redrawing. Set _invalid to update the
298+
// Will update diffs before redrawing. Set _invalid to update the
299299
// diffs themselves, set _update to also update folds properly just
300300
// before redrawing.
301301
tp->tp_diff_invalid = TRUE;
@@ -908,6 +908,7 @@ ex_diffupdate(exarg_T *eap) // "eap" can be NULL
908908
int idx_orig;
909909
int idx_new;
910910
diffio_T diffio;
911+
int had_diffs = curtab->tp_first_diff != NULL;
911912

912913
if (diff_busy)
913914
{
@@ -924,14 +925,14 @@ ex_diffupdate(exarg_T *eap) // "eap" can be NULL
924925
if (curtab->tp_diffbuf[idx_orig] != NULL)
925926
break;
926927
if (idx_orig == DB_COUNT)
927-
return;
928+
goto theend;
928929

929930
// Only need to do something when there is another buffer.
930931
for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
931932
if (curtab->tp_diffbuf[idx_new] != NULL)
932933
break;
933934
if (idx_new == DB_COUNT)
934-
return;
935+
goto theend;
935936

936937
// Only use the internal method if it did not fail for one of the buffers.
937938
vim_memset(&diffio, 0, sizeof(diffio));
@@ -948,9 +949,14 @@ ex_diffupdate(exarg_T *eap) // "eap" can be NULL
948949
// force updating cursor position on screen
949950
curwin->w_valid_cursor.lnum = 0;
950951

951-
diff_redraw(TRUE);
952-
953-
apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
952+
theend:
953+
// A redraw is needed if there were diffs and they were cleared, or there
954+
// are diffs now, which means they got updated.
955+
if (had_diffs || curtab->tp_first_diff != NULL)
956+
{
957+
diff_redraw(TRUE);
958+
apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
959+
}
954960
}
955961

956962
/*
@@ -2272,7 +2278,8 @@ diffopt_changed(void)
22722278
if ((diff_flags_new & DIFF_HORIZONTAL) && (diff_flags_new & DIFF_VERTICAL))
22732279
return FAIL;
22742280

2275-
/* If "icase" or "iwhite" was added or removed, need to update the diff. */
2281+
// If flags were added or removed, or the algorithm was changed, need to
2282+
// update the diff.
22762283
if (diff_flags != diff_flags_new || diff_algorithm != diff_algorithm_new)
22772284
FOR_ALL_TABPAGES(tp)
22782285
tp->tp_diff_invalid = TRUE;
@@ -2845,14 +2852,18 @@ ex_diffgetput(exarg_T *eap)
28452852
diff_need_update = FALSE;
28462853
ex_diffupdate(NULL);
28472854
}
2855+
else
2856+
{
2857+
// Check that the cursor is on a valid character and update it's
2858+
// position. When there were filler lines the topline has become
2859+
// invalid.
2860+
check_cursor();
2861+
changed_line_abv_curs();
28482862

2849-
/* Check that the cursor is on a valid character and update it's position.
2850-
* When there were filler lines the topline has become invalid. */
2851-
check_cursor();
2852-
changed_line_abv_curs();
2853-
2854-
/* Also need to redraw the other buffers. */
2855-
diff_redraw(FALSE);
2863+
// Also need to redraw the other buffers.
2864+
diff_redraw(FALSE);
2865+
apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
2866+
}
28562867
}
28572868

28582869
#ifdef FEAT_FOLDING

src/gui_beval.c

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -244,16 +244,9 @@ addEventHandler(GtkWidget *target, BalloonEval *beval)
244244
* This allows us to catch events independently of the signal handlers
245245
* in gui_gtk_x11.c.
246246
*/
247-
# if GTK_CHECK_VERSION(3,0,0)
248247
g_signal_connect(G_OBJECT(target), "event",
249248
G_CALLBACK(target_event_cb),
250249
beval);
251-
# else
252-
/* Should use GTK_OBJECT() here, but that causes a lint warning... */
253-
gtk_signal_connect((GtkObject*)(target), "event",
254-
GTK_SIGNAL_FUNC(target_event_cb),
255-
beval);
256-
# endif
257250
/*
258251
* Nasty: Key press events go to the main window thus the drawing area
259252
* will never see them. This means we have to connect to the main window
@@ -262,45 +255,25 @@ addEventHandler(GtkWidget *target, BalloonEval *beval)
262255
if (gtk_socket_id == 0 && gui.mainwin != NULL
263256
&& gtk_widget_is_ancestor(target, gui.mainwin))
264257
{
265-
# if GTK_CHECK_VERSION(3,0,0)
266258
g_signal_connect(G_OBJECT(gui.mainwin), "event",
267259
G_CALLBACK(mainwin_event_cb),
268260
beval);
269-
# else
270-
gtk_signal_connect((GtkObject*)(gui.mainwin), "event",
271-
GTK_SIGNAL_FUNC(mainwin_event_cb),
272-
beval);
273-
# endif
274261
}
275262
}
276263

277264
static void
278265
removeEventHandler(BalloonEval *beval)
279266
{
280-
/* LINTED: avoid warning: dubious operation on enum */
281-
# if GTK_CHECK_VERSION(3,0,0)
282267
g_signal_handlers_disconnect_by_func(G_OBJECT(beval->target),
283268
FUNC2GENERIC(target_event_cb),
284269
beval);
285-
# else
286-
gtk_signal_disconnect_by_func((GtkObject*)(beval->target),
287-
GTK_SIGNAL_FUNC(target_event_cb),
288-
beval);
289-
# endif
290270

291271
if (gtk_socket_id == 0 && gui.mainwin != NULL
292272
&& gtk_widget_is_ancestor(beval->target, gui.mainwin))
293273
{
294-
/* LINTED: avoid warning: dubious operation on enum */
295-
# if GTK_CHECK_VERSION(3,0,0)
296274
g_signal_handlers_disconnect_by_func(G_OBJECT(gui.mainwin),
297275
FUNC2GENERIC(mainwin_event_cb),
298276
beval);
299-
# else
300-
gtk_signal_disconnect_by_func((GtkObject*)(gui.mainwin),
301-
GTK_SIGNAL_FUNC(mainwin_event_cb),
302-
beval);
303-
# endif
304277
}
305278
}
306279

@@ -433,13 +406,8 @@ pointer_event(BalloonEval *beval, int x, int y, unsigned state)
433406
}
434407
else
435408
{
436-
# if GTK_CHECK_VERSION(3,0,0)
437409
beval->timerID = g_timeout_add((guint)p_bdlay,
438410
&timeout_cb, beval);
439-
# else
440-
beval->timerID = gtk_timeout_add((guint32)p_bdlay,
441-
&timeout_cb, beval);
442-
# endif
443411
}
444412
}
445413
}
@@ -1039,11 +1007,7 @@ cancelBalloon(BalloonEval *beval)
10391007

10401008
if (beval->timerID != 0)
10411009
{
1042-
# if GTK_CHECK_VERSION(3,0,0)
10431010
g_source_remove(beval->timerID);
1044-
# else
1045-
gtk_timeout_remove(beval->timerID);
1046-
# endif
10471011
beval->timerID = 0;
10481012
}
10491013
beval->showState = ShS_NEUTRAL;
@@ -1055,17 +1019,9 @@ createBalloonEvalWindow(BalloonEval *beval)
10551019
beval->balloonShell = gtk_window_new(GTK_WINDOW_POPUP);
10561020

10571021
gtk_widget_set_app_paintable(beval->balloonShell, TRUE);
1058-
# if GTK_CHECK_VERSION(3,0,0)
10591022
gtk_window_set_resizable(GTK_WINDOW(beval->balloonShell), FALSE);
1060-
# else
1061-
gtk_window_set_policy(GTK_WINDOW(beval->balloonShell), FALSE, FALSE, TRUE);
1062-
# endif
10631023
gtk_widget_set_name(beval->balloonShell, "gtk-tooltips");
1064-
# if GTK_CHECK_VERSION(3,0,0)
10651024
gtk_container_set_border_width(GTK_CONTAINER(beval->balloonShell), 4);
1066-
# else
1067-
gtk_container_border_width(GTK_CONTAINER(beval->balloonShell), 4);
1068-
# endif
10691025

10701026
# if GTK_CHECK_VERSION(3,0,0)
10711027
g_signal_connect(G_OBJECT(beval->balloonShell), "draw",

0 commit comments

Comments
 (0)