Skip to content

Commit 6db5cf3

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents b702eb5 + 9407316 commit 6db5cf3

57 files changed

Lines changed: 999 additions & 807 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

runtime/doc/autocmd.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 8.0. Last change: 2017 Dec 17
1+
*autocmd.txt* For Vim version 8.0. Last change: 2018 Jan 31
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -500,6 +500,13 @@ CmdUndefined When a user command is used but it isn't
500500
command is defined. An alternative is to
501501
always define the user command and have it
502502
invoke an autoloaded function. See |autoload|.
503+
*CmdlineChanged*
504+
CmdlineChanged After a change was made to the text inside
505+
command line. Be careful not to mess up the
506+
command line, it may cause Vim to lock up.
507+
<afile> is set to a single character,
508+
indicating the type of command-line.
509+
|cmdwin-char|
503510
*CmdlineEnter*
504511
CmdlineEnter After moving the cursor to the command line,
505512
where the user can type a command or search

runtime/doc/options.txt

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6134,7 +6134,6 @@ A jump table for the options with a short description can be found at |Q_op|.
61346134
{not in Vi}
61356135
{only available when compiled with the |+python/dyn|
61366136
feature}
6137-
Note: EXPERIMENTAL. It may be changed or removed in the future.
61386137
Specifies the name of the Python 2.x home directory. When 'pythonhome'
61396138
and the PYTHONHOME environment variable are not set, PYTHON_HOME,
61406139
which was specified at compile time, will be used for the Python 2.x
@@ -6161,13 +6160,11 @@ A jump table for the options with a short description can be found at |Q_op|.
61616160
{not in Vi}
61626161
{only available when compiled with the |+python3/dyn|
61636162
feature}
6164-
Note: EXPERIMENTAL. It may be changed or removed in the future.
61656163
Specifies the name of the Python 3 home directory. When
61666164
'pythonthreehome' and the PYTHONHOME environment variable are not set,
61676165
PYTHON3_HOME, which was specified at compile time, will be used for
61686166
the Python 3 home directory.
61696167
Environment variables are expanded |:set_env|.
6170-
61716168
This option cannot be set from a |modeline| or in the |sandbox|, for
61726169
security reasons.
61736170

@@ -6314,7 +6311,7 @@ A jump table for the options with a short description can be found at |Q_op|.
63146311
geom pixelGeometry int 0 - 2 (see below)
63156312
renmode renderingMode int 0 - 6 (see below)
63166313
taamode textAntialiasMode int 0 - 3 (see below)
6317-
scrlines Scroll Lines int >= 0 (see below)
6314+
scrlines Scroll Lines int (deprecated)
63186315

63196316
See this URL for detail (except for scrlines):
63206317
https://msdn.microsoft.com/en-us/library/dd368190.aspx
@@ -6348,23 +6345,9 @@ A jump table for the options with a short description can be found at |Q_op|.
63486345
See this URL for detail:
63496346
https://msdn.microsoft.com/en-us/library/dd368170.aspx
63506347

6351-
For scrlines: threshold for lines to be scrolled.
6352-
0 - Always use scrolling. (default)
6353-
1 - Use full page redrawing.
6354-
> 1 - If the lines to be scrolled is grater or equal to the
6355-
specified value, use redrawing. Otherwise use
6356-
scrolling.
6357-
6358-
If you feel scrolling a page (CTRL-F) is too slow with DirectX
6359-
renderer, try this "scrlines" option.
6360-
When set it "1", Vim uses full page redrawing instead of
6361-
scrolling. Redrawing a page is faster than scrolling a
6362-
page in some environments.
6363-
After that, when you feel scrolling lines (CTRL-Y) becomes
6364-
slow, please try "2" or greater value for this option.
6365-
It works threshold line number to switch scrolling to
6366-
redrawing. Scrolling a few lines might be faster than
6367-
redrawing a page in some environments.
6348+
For scrlines:
6349+
This was used for optimizing scrolling behavior, however this
6350+
is now deprecated. If specified, it is simply ignored.
63686351

63696352
Example: >
63706353
set encoding=utf-8

src/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,10 +2118,10 @@ run_message_test: $(MESSAGE_TEST_TARGET)
21182118
# These do not depend on the executable, compile it when needed.
21192119
test1 \
21202120
test_eval \
2121-
test3 test11 test14 test15 test17 \
2122-
test29 test30 test36 test37 test39 \
2121+
test3 test11 test14 test17 \
2122+
test29 test30 test37 test39 \
21232123
test42 test44 test48 test49 \
2124-
test50 test52 test59 \
2124+
test52 test59 \
21252125
test64 test69 \
21262126
test70 test72 \
21272127
test85 test86 test87 test88 \

src/auto/configure

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14446,6 +14446,18 @@ $as_echo "no" >&6; }
1444614446
fi
1444714447

1444814448

14449+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
14450+
$as_echo_n "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
14451+
if echo "$CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_GETPATH_CFLAGS $PYTHON_CFLAGS $PYTHON3_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $GTK_CFLAGS" | grep -q D_FILE_OFFSET_BITS 2>/dev/null; then
14452+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14453+
$as_echo "yes" >&6; }
14454+
$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
14455+
14456+
else
14457+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14458+
$as_echo "no" >&6; }
14459+
fi
14460+
1444914461
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
1445014462
$as_echo_n "checking linker --as-needed support... " >&6; }
1445114463
LINK_AS_NEEDED=

src/channel.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,14 +2226,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
22262226
ex_redraw(&ea);
22272227
showruler(FALSE);
22282228
setcursor();
2229-
out_flush();
2230-
#ifdef FEAT_GUI
2231-
if (gui.in_use)
2232-
{
2233-
gui_update_cursor(TRUE, FALSE);
2234-
gui_mch_flush();
2235-
}
2236-
#endif
2229+
out_flush_cursor(TRUE, FALSE);
22372230
}
22382231
else if (STRCMP(cmd, "expr") == 0 || STRCMP(cmd, "call") == 0)
22392232
{

src/configure.ac

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4466,6 +4466,20 @@ if test "$GCC" = yes; then
44664466
fi
44674467
AC_SUBST(DEPEND_CFLAGS_FILTER)
44684468

4469+
dnl On some systems AC_SYS_LARGEFILE determines that -D_FILE_OFFSET_BITS=64
4470+
dnl isn't required, but the CFLAGS for some of the libraries we're using
4471+
dnl include the define. Since the define changes the size of some datatypes
4472+
dnl (e.g. ino_t and off_t), all of Vim's modules must be compiled with a
4473+
dnl consistent value. It's therefore safest to force the use of the define
4474+
dnl if it's present in any of the *_CFLAGS variables.
4475+
AC_MSG_CHECKING(whether we need to force -D_FILE_OFFSET_BITS=64)
4476+
if echo "$CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_GETPATH_CFLAGS $PYTHON_CFLAGS $PYTHON3_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $GTK_CFLAGS" | grep -q D_FILE_OFFSET_BITS 2>/dev/null; then
4477+
AC_MSG_RESULT(yes)
4478+
AC_DEFINE(_FILE_OFFSET_BITS, 64)
4479+
else
4480+
AC_MSG_RESULT(no)
4481+
fi
4482+
44694483
dnl link.sh tries to avoid overlinking in a hackish way.
44704484
dnl At least GNU ld supports --as-needed which provides the same functionality
44714485
dnl at linker level. Let's use it.

src/edit.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3460,7 +3460,7 @@ ins_compl_clear(void)
34603460
compl_orig_text = NULL;
34613461
compl_enter_selects = FALSE;
34623462
/* clear v:completed_item */
3463-
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
3463+
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
34643464
}
34653465

34663466
/*
@@ -3562,8 +3562,7 @@ ins_compl_new_leader(void)
35623562
{
35633563
/* Show the cursor after the match, not after the redrawn text. */
35643564
setcursor();
3565-
out_flush();
3566-
gui_update_cursor(FALSE, FALSE);
3565+
out_flush_cursor(FALSE, FALSE);
35673566
}
35683567
#endif
35693568
compl_restarting = TRUE;
@@ -4718,7 +4717,7 @@ ins_compl_delete(void)
47184717
* flicker, thus we can't do that. */
47194718
changed_cline_bef_curs();
47204719
/* clear v:completed_item */
4721-
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
4720+
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
47224721
}
47234722

47244723
/*
@@ -4738,7 +4737,7 @@ ins_compl_insert(int in_compl_func)
47384737

47394738
/* Set completed item. */
47404739
/* { word, abbr, menu, kind, info } */
4741-
dict = dict_alloc();
4740+
dict = dict_alloc_lock(VAR_FIXED);
47424741
if (dict != NULL)
47434742
{
47444743
dict_add_nr_str(dict, "word", 0L,
@@ -4950,8 +4949,7 @@ ins_compl_next(
49504949
{
49514950
/* Show the cursor after the match, not after the redrawn text. */
49524951
setcursor();
4953-
out_flush();
4954-
gui_update_cursor(FALSE, FALSE);
4952+
out_flush_cursor(FALSE, FALSE);
49554953
}
49564954
#endif
49574955

src/ex_getln.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,6 +1959,11 @@ getcmdline(
19591959
#endif
19601960

19611961
cmdline_changed:
1962+
#ifdef FEAT_AUTOCMD
1963+
/* Trigger CmdlineChanged autocommands. */
1964+
trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINECHANGED);
1965+
#endif
1966+
19621967
#ifdef FEAT_SEARCH_EXTRA
19631968
/*
19641969
* 'incsearch' highlighting.

src/fileio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7824,6 +7824,7 @@ static struct event_name
78247824
{"BufWritePost", EVENT_BUFWRITEPOST},
78257825
{"BufWritePre", EVENT_BUFWRITEPRE},
78267826
{"BufWriteCmd", EVENT_BUFWRITECMD},
7827+
{"CmdlineChanged", EVENT_CMDLINECHANGED},
78277828
{"CmdlineEnter", EVENT_CMDLINEENTER},
78287829
{"CmdlineLeave", EVENT_CMDLINELEAVE},
78297830
{"CmdwinEnter", EVENT_CMDWINENTER},

src/getchar.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,16 +2972,10 @@ inchar(
29722972
if (wait_time == -1L || wait_time > 100L) /* flush output before waiting */
29732973
{
29742974
cursor_on();
2975-
out_flush();
2976-
#ifdef FEAT_GUI
2977-
if (gui.in_use)
2978-
{
2979-
gui_update_cursor(FALSE, FALSE);
2980-
# ifdef FEAT_MOUSESHAPE
2981-
if (postponed_mouseshape)
2982-
update_mouseshape(-1);
2983-
# endif
2984-
}
2975+
out_flush_cursor(FALSE, FALSE);
2976+
#if defined(FEAT_GUI) && defined(FEAT_MOUSESHAPE)
2977+
if (gui.in_use && postponed_mouseshape)
2978+
update_mouseshape(-1);
29852979
#endif
29862980
}
29872981

0 commit comments

Comments
 (0)