mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
88 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6127f5c9eb | |||
| 921d522f70 | |||
| a1a2788ffa | |||
| 0cdb72aa38 | |||
| bc2eada542 | |||
| c6e15ba8e7 | |||
| 269aec7e61 | |||
| f8eb9c51e5 | |||
| 5e1e6d265d | |||
| b094ff4b2b | |||
| 777b30f827 | |||
| 54b2bfa399 | |||
| ded2782783 | |||
| 4bf9153e6d | |||
| c4bfedabe0 | |||
| 7c0d06c170 | |||
| fe38b494ff | |||
| 4c8980b717 | |||
| 73b484c4da | |||
| f5464c4b19 | |||
| 63de19e805 | |||
| 0df3c7f2a0 | |||
| 7089237885 | |||
| 73fd498886 | |||
| 6270660611 | |||
| eaaa9bbda6 | |||
| e61a091ac1 | |||
| 7c7e807cb3 | |||
| 1d88ecc753 | |||
| 5ff38b0d07 | |||
| e3f9841f59 | |||
| 1de4548643 | |||
| fd114bd289 | |||
| b115d75a66 | |||
| 4f653a19c5 | |||
| 2fb08d3456 | |||
| 675446da32 | |||
| 3421566376 | |||
| 079c0c9d4a | |||
| a899e6ecc4 | |||
| 3fad98e8af | |||
| a2477fd349 | |||
| 5643db84c6 | |||
| 21efc3633e | |||
| d96d409df8 | |||
| 99c5eb4fd7 | |||
| 5162822914 | |||
| cf49790443 | |||
| 327054df45 | |||
| 6dbf66aa3e | |||
| e3af763d5e | |||
| b04a98f6c3 | |||
| 87f3d202a9 | |||
| eca626fcdb | |||
| eebd84eb94 | |||
| 5a030a540f | |||
| b129a447f3 | |||
| 65e08ee1d2 | |||
| 958dc6923d | |||
| 5cc2a2b8f8 | |||
| 34d4c9f566 | |||
| d05258ea2a | |||
| 0945eaface | |||
| 4b785f69c0 | |||
| 1b15a7159b | |||
| e3e3a15159 | |||
| 16974f80f9 | |||
| f9248a4311 | |||
| f422bcc7f9 | |||
| 8a8199e4a1 | |||
| 7554da4033 | |||
| 031cb743ae | |||
| 319afe3804 | |||
| 73095288da | |||
| 58c358753e | |||
| 833eb1d752 | |||
| 2cab0e1910 | |||
| f7c4ef23fa | |||
| 182707ac10 | |||
| c8b6fd59f0 | |||
| 235364e825 | |||
| 362a5c0b39 | |||
| ca82514bff | |||
| 414abe65f1 | |||
| 6cfc463126 | |||
| 031dd64ad7 | |||
| c85f864c35 | |||
| 75c997049e |
@@ -5,6 +5,7 @@ src/xxd/xxd
|
||||
src/auto/if_perl.c
|
||||
src/auto/gui_gtk_gresources.c
|
||||
src/auto/gui_gtk_gresources.h
|
||||
src/objects/.dirstamp
|
||||
src/tags
|
||||
|
||||
# We do need src/auto/configure.
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ env:
|
||||
vi_cv_path_plain_lua=/usr/local/bin/lua
|
||||
vi_cv_dll_name_perl=/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE/libperl.dylib
|
||||
vi_cv_dll_name_python=/System/Library/Frameworks/Python.framework/Versions/2.7/Python
|
||||
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.5/Python
|
||||
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.6/Python
|
||||
VIMCMD=src/MacVim/build/Release/MacVim.app/Contents/MacOS/Vim
|
||||
"CONFOPT='--with-features=huge --enable-multibyte --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --enable-luainterp=dynamic --with-lua-prefix=/usr/local --enable-gui=macvim'"
|
||||
|
||||
|
||||
@@ -1,38 +1,13 @@
|
||||
README_mac.txt for version 8.0 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of MacVim.
|
||||
See "README.txt" for general information about Vim.
|
||||
See "src/MacVim/README" for an overview of the MacVim specific source code.
|
||||
|
||||
MacVim uses the usual configure/make steps to build the binary but instead of
|
||||
"make install" you just drag the app bundle into the directory you wish to
|
||||
install in (usually `/Applications').
|
||||
|
||||
|
||||
How to build and install
|
||||
How to install MacVim?
|
||||
========================
|
||||
|
||||
Run `./configure` in the `src/` directory with the flags you want (call
|
||||
`./configure --help` to see a list of flags) e.g.:
|
||||
Download MacVim.dmg from latest binary release page https://github.com/macvim-dev/macvim/releases/latest , open the dmg file, and copy MacVim.app to /Applications.
|
||||
|
||||
$ cd src
|
||||
$ ./configure --with-features=huge \
|
||||
--enable-rubyinterp \
|
||||
--enable-pythoninterp \
|
||||
--enable-perlinterp \
|
||||
--enable-cscope
|
||||
|
||||
Now build the project using `make`:
|
||||
Questions?
|
||||
========================
|
||||
|
||||
$ make
|
||||
Please take a look at the home page http://macvim-dev.github.io/macvim/
|
||||
|
||||
The resulting app bundle will reside under `MacVim/build/Release`. To try it
|
||||
out quickly, type:
|
||||
|
||||
$ open MacVim/build/Release/MacVim.app
|
||||
|
||||
To install MacVim, type
|
||||
|
||||
$ open MacVim/build/Release
|
||||
|
||||
and drag the MacVim icon into your `Applications` folder.
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
" Vim compiler file
|
||||
" Compiler: GHC Haskell Compiler
|
||||
" Maintainer: Daniel Campoverde <alx@sillybytes.net>
|
||||
" Latest Revision: 2016-11-29
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "ghc"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%-G%.%#:\ build,
|
||||
\%-G%.%#preprocessing\ library\ %.%#,
|
||||
\%-G[%.%#]%.%#,
|
||||
\%E%f:%l:%c:\ %m,
|
||||
\%-G--%.%#
|
||||
|
||||
if exists('g:compiler_ghc_ignore_unmatched_lines')
|
||||
CompilerSet errorformat+=%-G%.%#
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.0. Last change: 2016 Oct 02
|
||||
*change.txt* For Vim version 8.0. Last change: 2016 Nov 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -684,6 +684,7 @@ g& Synonym for `:%s//~/&` (repeat last substitute with
|
||||
*:s_flags*
|
||||
The flags that you can use for the substitute commands:
|
||||
|
||||
*:&&*
|
||||
[&] Must be the first one: Keep the flags from the previous substitute
|
||||
command. Examples: >
|
||||
:&&
|
||||
|
||||
+21
-7
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Nov 07
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Dec 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -155,7 +155,13 @@ Use |ch_status()| to see if the channel could be opened.
|
||||
func MyCloseHandler(channel)
|
||||
< Vim will invoke callbacks that handle data before invoking
|
||||
close_cb, thus when this function is called no more data will
|
||||
be received.
|
||||
be passed to the callbacks.
|
||||
*channel-drop*
|
||||
"drop" Specifies when to drop messages:
|
||||
"auto" When there is no callback to handle a message.
|
||||
The "close_cb" is also considered for this.
|
||||
"never" All messages will be kept.
|
||||
|
||||
*waittime*
|
||||
"waittime" The time to wait for the connection to be made in
|
||||
milliseconds. A negative number waits forever.
|
||||
@@ -418,7 +424,11 @@ This uses the channel timeout. To read without a timeout, just get any
|
||||
message that is available: >
|
||||
let output = ch_read(channel, {'timeout': 0})
|
||||
When no message was available then the result is v:none for a JSON or JS mode
|
||||
channels, an empty string for a RAW or NL channel.
|
||||
channels, an empty string for a RAW or NL channel. You can use |ch_canread()|
|
||||
to check if there is something to read.
|
||||
|
||||
Note that when there is no callback message are dropped. To avoid that add a
|
||||
close callback to the channel.
|
||||
|
||||
To read all output from a RAW channel that is available: >
|
||||
let output = ch_readraw(channel)
|
||||
@@ -534,7 +544,7 @@ You will want to do something more useful than "echomsg".
|
||||
|
||||
To start another process without creating a channel: >
|
||||
let job = job_start(command,
|
||||
\ {"in_io": "null", "out_io": "null", "err_io": "null"})
|
||||
\ {"in_io": "null", "out_io": "null", "err_io": "null"})
|
||||
|
||||
This starts {command} in the background, Vim does not wait for it to finish.
|
||||
|
||||
@@ -595,6 +605,10 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
*job-close_cb*
|
||||
"close_cb": handler Callback for when the channel is closed. Same as
|
||||
"close_cb" on |ch_open()|, see |close_cb|.
|
||||
*job-drop*
|
||||
"drop" Specifies when to drop messages. Same as "drop" on
|
||||
|ch_open()|, see |channel-drop|. For "auto" the
|
||||
exit_cb is not considered.
|
||||
*job-exit_cb*
|
||||
"exit_cb": handler Callback for when the job ends. The arguments are the
|
||||
job and the exit status.
|
||||
@@ -629,7 +643,7 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"channel": {channel} Use an existing channel instead of creating a new one.
|
||||
The parts of the channel that get used for the new job
|
||||
will be disconnected from what they were used before.
|
||||
If the channel was still use by another job this may
|
||||
If the channel was still used by another job this may
|
||||
cause I/O errors.
|
||||
Existing callbacks and other settings remain.
|
||||
|
||||
@@ -647,7 +661,7 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"out_io": "null" disconnect stdout (goes to /dev/null)
|
||||
"out_io": "pipe" stdout is connected to the channel (default)
|
||||
"out_io": "file" stdout writes to a file
|
||||
"out_io": "buffer" stdout appends to a buffer (see below)
|
||||
"out_io": "buffer" stdout appends to a buffer (see below)
|
||||
"out_name": "/path/file" the name of the file or buffer to write to
|
||||
"out_buf": number the number of the buffer to write to
|
||||
"out_modifiable": 0 when writing to a buffer, 'modifiable' will be off
|
||||
@@ -660,7 +674,7 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"err_io": "null" disconnect stderr (goes to /dev/null)
|
||||
"err_io": "pipe" stderr is connected to the channel (default)
|
||||
"err_io": "file" stderr writes to a file
|
||||
"err_io": "buffer" stderr appends to a buffer (see below)
|
||||
"err_io": "buffer" stderr appends to a buffer (see below)
|
||||
"err_name": "/path/file" the name of the file or buffer to write to
|
||||
"err_buf": number the number of the buffer to write to
|
||||
"err_modifiable": 0 when writing to a buffer, 'modifiable' will be off
|
||||
|
||||
@@ -359,8 +359,11 @@ terminals)
|
||||
List entries 6 to 12 from the search history: >
|
||||
:history / 6,12
|
||||
<
|
||||
List the recent five entries from all histories: >
|
||||
:history all -5,
|
||||
List the penultimate entry from all histories: >
|
||||
:history all -2
|
||||
<
|
||||
List the most recent two entries from all histories: >
|
||||
:history all -2,
|
||||
|
||||
:keepp[atterns] {command} *:keepp* *:keeppatterns*
|
||||
Execute {command}, without adding anything to the search
|
||||
@@ -1057,10 +1060,10 @@ There are several ways to leave the command-line window:
|
||||
Insert and in Normal mode.
|
||||
CTRL-C Continue in Command-line mode. The command-line under the
|
||||
cursor is used as the command-line. Works both in Insert and
|
||||
in Normal mode. ":close" also works. There is no redraw,
|
||||
thus the window will remain visible.
|
||||
in Normal mode. There is no redraw, thus the window will
|
||||
remain visible.
|
||||
:quit Discard the command line and go back to Normal mode.
|
||||
":exit", ":xit" and CTRL-\ CTRL-N also work.
|
||||
":close", ":exit", ":xit" and CTRL-\ CTRL-N also work.
|
||||
:qall Quit Vim, unless there are changes in some buffer.
|
||||
:qall! Quit Vim, discarding changes to any buffer.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
*editing.txt* For Vim version 8.0. Last change: 2016 Nov 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -977,12 +977,12 @@ WRITING WITH MULTIPLE BUFFERS *buffer-write*
|
||||
|
||||
*:wa* *:wall*
|
||||
:wa[ll] Write all changed buffers. Buffers without a file
|
||||
name or which are readonly are not written. {not in
|
||||
Vi}
|
||||
name cause an error message. Buffers which are
|
||||
readonly are not written. {not in Vi}
|
||||
|
||||
:wa[ll]! Write all changed buffers, even the ones that are
|
||||
readonly. Buffers without a file name are not
|
||||
written. {not in Vi}
|
||||
written and cause an error message. {not in Vi}
|
||||
|
||||
|
||||
Vim will warn you if you try to overwrite a file that has been changed
|
||||
|
||||
+26
-11
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Nov 04
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Nov 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2009,6 +2009,7 @@ byteidxcomp({expr}, {nr}) Number byte index of {nr}'th char in {expr}
|
||||
call({func}, {arglist} [, {dict}])
|
||||
any call {func} with arguments {arglist}
|
||||
ceil({expr}) Float round {expr} up
|
||||
ch_canread({handle}) Number check if there is something to read
|
||||
ch_close({handle}) none close {handle}
|
||||
ch_close_in({handle}) none close in part of {handle}
|
||||
ch_evalexpr({handle}, {expr} [, {options}])
|
||||
@@ -2980,16 +2981,28 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
|
||||
don't fit, a vertical layout is used anyway. For some systems
|
||||
the horizontal layout is always used.
|
||||
|
||||
ch_canread({handle}) *ch_canread()*
|
||||
Return non-zero when there is something to read from {handle}.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
|
||||
This is useful to read from a channel at a convenient time,
|
||||
e.g. from a timer.
|
||||
|
||||
Note that messages are dropped when the channel does not have
|
||||
a callback. Add a close callback to avoid that.
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
ch_close({handle}) *ch_close()*
|
||||
Close {handle}. See |channel-close|.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
A close callback is not invoked.
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
ch_close_in({handle}) *ch_close_in()*
|
||||
Close the "in" part of {handle}. See |channel-close-in|.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
A close callback is not invoked.
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
@@ -2998,7 +3011,7 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
|
||||
Send {expr} over {handle}. The {expr} is encoded
|
||||
according to the type of channel. The function cannot be used
|
||||
with a raw channel. See |channel-use|.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
*E917*
|
||||
{options} must be a Dictionary. It must not have a "callback"
|
||||
entry. It can have a "timeout" entry to specify the timeout
|
||||
@@ -3012,7 +3025,7 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
|
||||
|
||||
ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()*
|
||||
Send {string} over {handle}.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
|
||||
Works like |ch_evalexpr()|, but does not encode the request or
|
||||
decode the response. The caller is responsible for the
|
||||
@@ -3025,7 +3038,7 @@ ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()*
|
||||
|
||||
ch_getbufnr({handle}, {what}) *ch_getbufnr()*
|
||||
Get the buffer number that {handle} is using for {what}.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
{what} can be "err" for stderr, "out" for stdout or empty for
|
||||
socket output.
|
||||
Returns -1 when there is no buffer.
|
||||
@@ -3071,7 +3084,7 @@ ch_log({msg} [, {handle}]) *ch_log()*
|
||||
|ch_logfile()|.
|
||||
When {handle} is passed the channel number is used for the
|
||||
message.
|
||||
{handle} can be Channel or a Job that has a Channel. The
|
||||
{handle} can be a Channel or a Job that has a Channel. The
|
||||
Channel must be open for the channel number to be used.
|
||||
|
||||
ch_logfile({fname} [, {mode}]) *ch_logfile()*
|
||||
@@ -3099,7 +3112,7 @@ ch_open({address} [, {options}]) *ch_open()*
|
||||
|
||||
ch_read({handle} [, {options}]) *ch_read()*
|
||||
Read from {handle} and return the received message.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
See |channel-more|.
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
@@ -3113,7 +3126,7 @@ ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
|
||||
according to the type of channel. The function cannot be used
|
||||
with a raw channel.
|
||||
See |channel-use|. *E912*
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
@@ -3134,7 +3147,7 @@ ch_setoptions({handle}, {options}) *ch_setoptions()*
|
||||
"timeout" default read timeout in msec
|
||||
"mode" mode for the whole channel
|
||||
See |ch_open()| for more explanation.
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
|
||||
Note that changing the mode may cause queued messages to be
|
||||
lost.
|
||||
@@ -3148,7 +3161,7 @@ ch_status({handle} [, {options}]) *ch_status()*
|
||||
"open" channel can be used
|
||||
"buffered" channel can be read, not written to
|
||||
"closed" channel can not be used
|
||||
{handle} can be Channel or a Job that has a Channel.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
"buffered" is used when the channel was closed but there is
|
||||
still data that can be obtained with |ch_read()|.
|
||||
|
||||
@@ -8420,6 +8433,8 @@ timers Compiled with |timer_start()| support.
|
||||
title Compiled with window title support |'title'|.
|
||||
toolbar Compiled with support for |gui-toolbar|.
|
||||
transparency Compiled with 'transparency' support.
|
||||
ttyin input is a terminal (tty)
|
||||
ttyout output is a terminal (tty)
|
||||
unix Unix version of Vim.
|
||||
user_commands User-defined commands.
|
||||
vertsplit Compiled with vertically split windows |:vsplit|.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 8.0. Last change: 2016 Sep 01
|
||||
*message.txt* For Vim version 8.0. Last change: 2017 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -129,8 +129,9 @@ closed properly. Mostly harmless.
|
||||
Command too recursive
|
||||
|
||||
This happens when an Ex command executes an Ex command that executes an Ex
|
||||
command, etc. This is only allowed 200 times. When it's more there probably
|
||||
is an endless loop. Probably a |:execute| or |:source| command is involved.
|
||||
command, etc. The limit is 200 or the value of 'maxfuncdepth', whatever is
|
||||
larger. When it's more there probably is an endless loop. Probably a
|
||||
|:execute| or |:source| command is involved.
|
||||
|
||||
*E254* >
|
||||
Cannot allocate color {name}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 8.0. Last change: 2016 Jul 12
|
||||
*motion.txt* For Vim version 8.0. Last change: 2016 Nov 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -915,6 +915,7 @@ was made yet in the current file.
|
||||
then the position can be near the end of what the
|
||||
command changed. For example when inserting a word,
|
||||
the position will be on the last character.
|
||||
To jump to older changes use |g;|.
|
||||
{not in Vi}
|
||||
|
||||
*'(* *`(*
|
||||
|
||||
+39
-3
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2016 Oct 12
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -242,7 +242,7 @@ opt+=val" the expansion is done before the adding or removing.
|
||||
Handling of local options *local-options*
|
||||
|
||||
Some of the options only apply to a window or buffer. Each window or buffer
|
||||
has its own copy of this option, thus can each have their own value. This
|
||||
has its own copy of this option, thus each can have its own value. This
|
||||
allows you to set 'list' in one window but not in another. And set
|
||||
'shiftwidth' to 3 in one buffer and 4 in another.
|
||||
|
||||
@@ -3984,6 +3984,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
The format of this option is like that of 'statusline'.
|
||||
'guitabtooltip' is used for the tooltip, see below.
|
||||
The expression will be evaluated in the |sandbox| when set from a
|
||||
modeline, see |sandbox-option|.
|
||||
|
||||
Only used when the GUI tab pages line is displayed. 'e' must be
|
||||
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
|
||||
@@ -5171,6 +5173,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
catches endless recursion. When using a recursive function with
|
||||
more depth, set 'maxfuncdepth' to a bigger number. But this will use
|
||||
more memory, there is the danger of failing when memory is exhausted.
|
||||
Increasing this limit above 200 also changes the maximum for Ex
|
||||
command resursion, see |E169|.
|
||||
See also |:function|.
|
||||
|
||||
*'maxmapdepth'* *'mmd'* *E223*
|
||||
@@ -5851,6 +5855,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
and |+postscript| features}
|
||||
Expression used to print the PostScript produced with |:hardcopy|.
|
||||
See |pexpr-option|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'printfont'* *'pfn'*
|
||||
'printfont' 'pfn' string (default "courier")
|
||||
@@ -5921,6 +5927,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
DYNAMIC_PYTHON_DLL, which was specified at compile time.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonhome'*
|
||||
'pythonhome' string (default "")
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+python/dyn|
|
||||
feature}
|
||||
Note: EXPERIMENTAL. It may be changed or removed in the future.
|
||||
Specifies the name of the Python 2.x home directory. When 'pythonhome'
|
||||
and the PYTHONHOME environment variable are not set, PYTHON_HOME,
|
||||
which was specified at compile time, will be used for the Python 2.x
|
||||
home directory.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonthreedll'*
|
||||
@@ -5933,6 +5954,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
DYNAMIC_PYTHON3_DLL, which was specified at compile time.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonthreehome'*
|
||||
'pythonthreehome' string (default "")
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+python3/dyn|
|
||||
feature}
|
||||
Note: EXPERIMENTAL. It may be changed or removed in the future.
|
||||
Specifies the name of the Python 3 home directory. When
|
||||
'pythonthreehome' and the PYTHONHOME environment variable are not set,
|
||||
PYTHON3_HOME, which was specified at compile time, will be used for
|
||||
the Python 3 home directory.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'quoteescape'* *'qe'*
|
||||
@@ -7973,7 +8009,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Amiga console, Win32 console, all GUI versions and terminals with a
|
||||
non-empty 't_ts' option).
|
||||
When Vim was compiled with HAVE_X11 defined, the original title will
|
||||
be restored if possible |X11|.
|
||||
be restored if possible, see |X11|.
|
||||
When this option contains printf-style '%' items, they will be
|
||||
expanded according to the rules used for 'statusline'.
|
||||
Example: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*logiPat.txt* Logical Patterns Jun 22, 2015
|
||||
*pi_logipat.txt* Logical Patterns Jun 22, 2015
|
||||
|
||||
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
|
||||
Copyright: (c) 2004-2015 by Charles E. Campbell *logiPat-copyright*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 8.0. Last change: 2016 Aug 21
|
||||
*quickref.txt* For Vim version 8.0. Last change: 2016 Dec 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -840,7 +840,9 @@ Short explanation of each option: *option-list*
|
||||
'prompt' 'prompt' enable prompt in Ex mode
|
||||
'pumheight' 'ph' maximum height of the popup menu
|
||||
'pythondll' name of the Python 2 dynamic library
|
||||
'pythonhome' name of the Python 2 home directory
|
||||
'pythonthreedll' name of the Python 3 dynamic library
|
||||
'pythonthreehome' name of the Python 3 home directory
|
||||
'quoteescape' 'qe' escape characters used in a string
|
||||
'readonly' 'ro' disallow writing the buffer
|
||||
'redrawtime' 'rdt' timeout for 'hlsearch' and |:match| highlighting
|
||||
@@ -1074,6 +1076,8 @@ Short explanation of each option: *option-list*
|
||||
|c_<Up>| <Up>/<Down> recall older/newer command-line that starts
|
||||
with current command
|
||||
|c_<S-Up>| <S-Up>/<S-Down> recall older/newer command-line from history
|
||||
|c_CTRL-G| CTRL-G next match when 'incsearch' is active
|
||||
|c_CTRL-T| CTRL-T previous match when 'incsearch' is active
|
||||
|:history| :his[tory] show older command-lines
|
||||
|
||||
Context-sensitive completion on the command-line:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.0. Last change: 2016 Sep 09
|
||||
*starting.txt* For Vim version 8.0. Last change: 2016 Nov 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -421,6 +421,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
not connected to a terminal. This will avoid the warning and
|
||||
the two second delay that would happen. {not in Vi}
|
||||
|
||||
*--ttyfail*
|
||||
--ttyfail When the stdin or stdout is not a terminal (tty) then exit
|
||||
right away.
|
||||
|
||||
*-d*
|
||||
-d Start in diff mode, like |vimdiff|.
|
||||
{not in Vi} {not available when compiled without the |+diff|
|
||||
|
||||
+6
-1
@@ -1378,6 +1378,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
--servername remote.txt /*--servername*
|
||||
--socketid starting.txt /*--socketid*
|
||||
--startuptime starting.txt /*--startuptime*
|
||||
--ttyfail starting.txt /*--ttyfail*
|
||||
--version starting.txt /*--version*
|
||||
--windowid starting.txt /*--windowid*
|
||||
-A starting.txt /*-A*
|
||||
@@ -1865,6 +1866,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:$ cmdline.txt /*:$*
|
||||
:% cmdline.txt /*:%*
|
||||
:& change.txt /*:&*
|
||||
:&& change.txt /*:&&*
|
||||
:' cmdline.txt /*:'*
|
||||
:, cmdline.txt /*:,*
|
||||
:. cmdline.txt /*:.*
|
||||
@@ -5302,6 +5304,7 @@ catch-text eval.txt /*catch-text*
|
||||
cc change.txt /*cc*
|
||||
ceil() eval.txt /*ceil()*
|
||||
ch.vim syntax.txt /*ch.vim*
|
||||
ch_canread() eval.txt /*ch_canread()*
|
||||
ch_close() eval.txt /*ch_close()*
|
||||
ch_close_in() eval.txt /*ch_close_in()*
|
||||
ch_evalexpr() eval.txt /*ch_evalexpr()*
|
||||
@@ -5349,6 +5352,7 @@ channel-close channel.txt /*channel-close*
|
||||
channel-close-in channel.txt /*channel-close-in*
|
||||
channel-commands channel.txt /*channel-commands*
|
||||
channel-demo channel.txt /*channel-demo*
|
||||
channel-drop channel.txt /*channel-drop*
|
||||
channel-functions usr_41.txt /*channel-functions*
|
||||
channel-mode channel.txt /*channel-mode*
|
||||
channel-more channel.txt /*channel-more*
|
||||
@@ -7021,6 +7025,7 @@ job-callback channel.txt /*job-callback*
|
||||
job-channel-overview channel.txt /*job-channel-overview*
|
||||
job-close_cb channel.txt /*job-close_cb*
|
||||
job-control channel.txt /*job-control*
|
||||
job-drop channel.txt /*job-drop*
|
||||
job-err_cb channel.txt /*job-err_cb*
|
||||
job-err_io channel.txt /*job-err_io*
|
||||
job-exit_cb channel.txt /*job-exit_cb*
|
||||
@@ -7156,7 +7161,6 @@ logiPat-man pi_logipat.txt /*logiPat-man*
|
||||
logiPat-manual pi_logipat.txt /*logiPat-manual*
|
||||
logiPat-operators pi_logipat.txt /*logiPat-operators*
|
||||
logiPat-pattern pi_logipat.txt /*logiPat-pattern*
|
||||
logiPat.txt pi_logipat.txt /*logiPat.txt*
|
||||
long-lines version5.txt /*long-lines*
|
||||
love intro.txt /*love*
|
||||
lowercase change.txt /*lowercase*
|
||||
@@ -7873,6 +7877,7 @@ php3.vim syntax.txt /*php3.vim*
|
||||
phtml.vim syntax.txt /*phtml.vim*
|
||||
pi_getscript.txt pi_getscript.txt /*pi_getscript.txt*
|
||||
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
|
||||
pi_logipat.txt pi_logipat.txt /*pi_logipat.txt*
|
||||
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
|
||||
pi_paren.txt pi_paren.txt /*pi_paren.txt*
|
||||
pi_spec.txt pi_spec.txt /*pi_spec.txt*
|
||||
|
||||
+104
-31
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Nov 17
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -35,26 +35,15 @@ there will not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Test_help_complete sometimes fails on MS-Windows:
|
||||
function RunTheTest[9]..Test_help_complete line 22: Expected ['h test-char@ab',
|
||||
'h test-char@en', 'h test-col@ab', 'h test-col@en'] but got ['h test-char@en', '
|
||||
h test-char@en\t', 'h test-col@ab', 'h test-col@en']
|
||||
Appears to be related to calling feedkeys() with exactly 8 characters.
|
||||
|
||||
Patch for GTK3: Kazunobu Kuriyama, 14 Nov.
|
||||
|
||||
Patch for fix breakindent bug (Christian, Nov 15)
|
||||
|
||||
+channel:
|
||||
- Skip checking if job ended if there aren't any. (ichizok, 2016 Nov 7, #1196)
|
||||
- problem with channel callback getting job, while the job was already
|
||||
deleted. #1242. Fix in #1245 (ichizok), but is that correct?
|
||||
Perhaps just replace job_still_alive() with job_still_useful()?
|
||||
That's not sufficient.
|
||||
- Try out background make plugin:
|
||||
https://github.com/AndrewVos/vim-make-background
|
||||
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
|
||||
- Add 'cwd' argument to start_job(): directory to change to in the child.
|
||||
check for valid directory before forking.
|
||||
Part of patch for environment, Yasuhiro Matsumoto, #1160
|
||||
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
|
||||
2016 Dec 11, #1320)
|
||||
- Implement |job-term| ?
|
||||
- Channel test fails with Motif. Sometimes kills the X11 server.
|
||||
- When a message in the queue but there is no callback, drop it after a while?
|
||||
@@ -85,8 +74,8 @@ Regexp problems:
|
||||
- Issue 164: freeze on regexp search.
|
||||
- Ignorecase not handled properly for multi-byte characters. (Axel Bender,
|
||||
2013 Dec 11)
|
||||
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski
|
||||
Remark from Brett 2014 Jan 6 and 7.
|
||||
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin
|
||||
Szamotulski; Remark from Brett 2014 Jan 6 and 7.
|
||||
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
|
||||
- Does not work with NFA regexp engine:
|
||||
\%u, \%x, \%o, \%d followed by a composing character
|
||||
@@ -115,32 +104,58 @@ Regexp problems:
|
||||
- Difference between two engines: ".*\zs\/\@>\/" on text "///"
|
||||
(Chris Paul, 2016 Nov 13) New engine not greedy enough?
|
||||
|
||||
Patch to support nested namespace syntax. (Pauli, 2016 Oct 30, #1214)
|
||||
|
||||
Patch to fix popup menu positioning. (Hirohito Higashi, 2016 Nov 7, #1241)
|
||||
|
||||
Patch to make help tag jumps keep language. (Tatsuki, #1249)
|
||||
Test by Hirohito Higashi.
|
||||
'] mark invalid after undoing insert "hello".
|
||||
|
||||
Make html indent file use javascript indent, now that it's not just cindent.
|
||||
#1220
|
||||
|
||||
Patch to fix completion of :filter command. (Ichizok, 2016 Dec 3, #1299)
|
||||
|
||||
Patch to use buffer id for system() and systemlist() (LemonBoy, 2016 Nov 7,
|
||||
#1240)
|
||||
|
||||
Concatenation with null string causes an error: 'a'[1:0] .. 'b'
|
||||
Might as well handle it like an empty string.
|
||||
|
||||
When using symbolic links, a package path will not be inserted at the right
|
||||
position in 'runtimepath'. (Dugan Chen, 2016 Nov 18)
|
||||
|
||||
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
|
||||
What if there is an invalid character?
|
||||
|
||||
Putting "k" early in 'complete' does not use dictionary first?
|
||||
(RubenGZ, 2016 Dec 10, #1316)
|
||||
patch proposed by Hirohito Higashi, 2016 Dec 11.
|
||||
|
||||
Patch to fix NULL pointer when sorting zero elements. (Dominique, 2016 Dec 15)
|
||||
|
||||
Patch to test float functions. (Dominique, 2016 Dec 16)
|
||||
|
||||
Patch to improve completion of :syntax command. (Dominique, 2016 Dec 12)
|
||||
|
||||
Patch to use IEMSG() in more places. (Dominique, 2016 Dec 27)
|
||||
|
||||
Patch to avoid ubsan warning for integer overflow. (Dominique, 2016 Dec 26)
|
||||
|
||||
Bug: ":earlier 100d" doesn't work after using undo file.
|
||||
(Pavol Juhas, 2016 Nov 15, #1254)
|
||||
Fix by Christian, but lacks a test.
|
||||
Test in testdir/test_undo.vim doesn't catch the problem.
|
||||
Test by Pavol Juhas, Nov 22.
|
||||
Patch with test (Pavol Juhas,, 2016 Dec 3, #1300)
|
||||
|
||||
Bug: Json with same key should not give internal error. (Lcd, 2016 Oct 26)
|
||||
Make dict_add give a duplicate key error.
|
||||
|
||||
Patch to make str2nr and str2float work with signed values.
|
||||
(Lemonbody, 2016 Dec 18, #1332)
|
||||
|
||||
Should json_encode()/json_decode() restrict recursiveness?
|
||||
Or avoid recursiveness.
|
||||
|
||||
Patch to fix UBSan error. Is this actually needed?
|
||||
(Yegappan, 2016 Dec 18)
|
||||
|
||||
Allow using json with empty key? Dict already has it.
|
||||
|
||||
Json string with trailing \u should be an error. (Lcd)
|
||||
@@ -151,17 +166,58 @@ Patch to deal with changed configure events in GTK 3. (Jan Alexander Steffens,
|
||||
2016 Oct 23 #1193)
|
||||
Remarks from nuko8, 2016 Nov 2.
|
||||
|
||||
Patch to change order of compiler flags. (Yousong Zhou, 2016 Sep 19, #1100)
|
||||
|
||||
Patch to add command line completion for :cexpr commands. (Yegappan
|
||||
Lakshmanan, 2016 Dec 13)
|
||||
|
||||
Patch to avoid warnings for overflow. (Mike Williams, 2016 Dec 16)
|
||||
Update Dec 19.
|
||||
|
||||
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
|
||||
Also get E749 on exit.
|
||||
Another example in #1309
|
||||
|
||||
Patch to fix vim_iswordp() works differently on chars <256 that are two bytes.
|
||||
Ozaki Kiichi, 2016 Dec 11.
|
||||
|
||||
When deleting a mark or register, leave a tombstone, so that it's also deleted
|
||||
when writing viminfo (and the delete was the most recent action). #1339
|
||||
|
||||
Relevant neovim patch:
|
||||
https://github.com/neovim/neovim/pull/5717
|
||||
test case:
|
||||
https://github.com/neovim/neovim/pull/5717#issuecomment-264845481
|
||||
Others:
|
||||
https://github.com/neovim/neovim/issues/5713#issuecomment-265136186
|
||||
https://github.com/neovim/neovim/pull/5737#issuecomment-266055165
|
||||
|
||||
Patch for better explanation of 'compatible' side effects.
|
||||
https://github.com/vim/vim/pull/1161/files
|
||||
|
||||
Patch to adjust marks when adding a new line to the end of buffer in diff
|
||||
mode. (James McCoy, 2016 Dec 14, #1329)
|
||||
|
||||
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
|
||||
#1330)
|
||||
|
||||
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
|
||||
Rule to use "^" for statusline does not work if a space is defined with
|
||||
highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11)
|
||||
|
||||
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
|
||||
Patch by Christian Wellenbrock, 2013 Jul 5.
|
||||
|
||||
Screen updated delayed when using CTRL-O u in Insert mode.
|
||||
(Barlik, #1191) Perhaps because status message?
|
||||
|
||||
Patch to add buffer name argument to taglist().
|
||||
Ordering of tags in result of taglist call. (Duncan McDougall, #1194)
|
||||
|
||||
Patch to fix that empty first tab is not in session.
|
||||
(Hirohito Higashi, 2016 Nov 25, #1282)
|
||||
|
||||
Patch for restoring wide characters in the console buffer.
|
||||
(Ken Takata, 2016 Jun 7)
|
||||
|
||||
@@ -182,11 +238,16 @@ Use ADDR_OTHER instead of ADDR_LINES for many more commands.
|
||||
Add tests for using number larger than number of lines in buffer.
|
||||
|
||||
Patch to make v:shell_error writable. (Christian Brabandt, 2016 Sep 27)
|
||||
Is there another solution?
|
||||
Useful to restore it. Is there another solution?
|
||||
|
||||
On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
|
||||
lines: :g/^/normal yyp On Unix it works OK. (Bryce Orgill, 2016 Nov 5)
|
||||
|
||||
Patch for wrong cursor position on wrapped line, involving breakindent.
|
||||
(Ozaki Kiichi, 2016 Nov 25)
|
||||
|
||||
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
|
||||
|
||||
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
|
||||
E.g. deepcopy(test_null_list())
|
||||
|
||||
@@ -195,6 +256,13 @@ Patch to make it possible to extend a list with itself.
|
||||
|
||||
Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
|
||||
|
||||
Patch to add trim() function. (Bukn, 2016 Nov 25, #1280)
|
||||
|
||||
Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275)
|
||||
|
||||
On Windows buffer completion sees backslash as escape char instead of path
|
||||
separator. (Toffanim, 2016 Nov 24, #1274)
|
||||
|
||||
min() and max() spawn lots of error messages if sorted list/dictionary
|
||||
contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039)
|
||||
|
||||
@@ -234,10 +302,11 @@ execute() cannot be used with command completeion. (Daniel Hahler, 2016 Oct 1,
|
||||
|
||||
cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983)
|
||||
|
||||
Patch to change order of compiler flags. (Yousong Zhou, 2016 Sep 19, #1100)
|
||||
|
||||
Patch to order results from taglist(). (Duncan McDougall, 2016 Oct 25)
|
||||
|
||||
patch for 'spellcamelcase' option: spellcheck each CamelCased word.
|
||||
(Ben Tucker, 2016 Dec 2)
|
||||
|
||||
Patch for :pyx, run python commands depending on the supported version.
|
||||
(Marc Weber, update from Ken Takata, 2016 Sep 19)
|
||||
|
||||
@@ -267,11 +336,14 @@ Patch to fix wrong encoding of error message on Cygwin/MSYS terminal.
|
||||
'hlsearch' interferes with a Conceal match. (Rom Grk, 2016 Aug 9)
|
||||
|
||||
Patch to add context information to quickfix/location list. (Yegappan
|
||||
Lakshmanan, 2016 Aug 25)
|
||||
Lakshmanan, 2016 Aug 25, #1012)
|
||||
|
||||
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
|
||||
Otherwise task flickers in taskbar.
|
||||
|
||||
Bogus characters inserted when triggering indent while changing test.
|
||||
(Vitor Antunes, 2016 Nov 22, #1269)
|
||||
|
||||
Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26)
|
||||
Also for ":@.".
|
||||
|
||||
@@ -280,6 +352,9 @@ Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
|
||||
Have a way to get the call stack, in a function and from an exception.
|
||||
#1125
|
||||
|
||||
Patch to add 'pythonhome' and 'pythonthreehome' options. (Kazuki Sakamoto,
|
||||
2016 Nov 21, #1266)
|
||||
|
||||
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
|
||||
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
|
||||
|
||||
@@ -974,9 +1049,6 @@ Szamotulski, 2012 Nov 8)
|
||||
Session file creation: 'autochdir' causes trouble. Keep it off until after
|
||||
loading all files.
|
||||
|
||||
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
|
||||
Patch by Christian Wellenbrock, 2013 Jul 5.
|
||||
|
||||
MS-Windows resizing problems:
|
||||
- Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun
|
||||
20. Uses getWindowRect() instead of GetWindowPlacement()
|
||||
@@ -1306,6 +1378,7 @@ With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
|
||||
|
||||
Patch to add random number generator. (Hong Xu, 2010 Nov 8, update Nov 10)
|
||||
Alternative from Christian Brabandt. (2010 Sep 19)
|
||||
New one from Yasuhiro Matsumoto, #1277.
|
||||
|
||||
Messages in message.txt are highlighted as examples.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_22.txt* For Vim version 8.0. Last change: 2012 Nov 15
|
||||
*usr_22.txt* For Vim version 8.0. Last change: 2016 Dec 13
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -93,7 +93,7 @@ browser. This is what you get: >
|
||||
o................Browsing with a Horizontal Split...........|netrw-o|
|
||||
p................Use Preview Window.........................|netrw-p|
|
||||
P................Edit in Previous Window....................|netrw-p|
|
||||
q................Listing Bookmarks and History..............|netrw-q|
|
||||
q................Listing Bookmarks and History..............|netrw-qb|
|
||||
r................Reversing Sorting Order....................|netrw-r|
|
||||
< (etc)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2016 Sep 01
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2016 Nov 29
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -930,6 +930,7 @@ Testing: *test-functions*
|
||||
test_null_string() return a null String
|
||||
|
||||
Inter-process communication: *channel-functions*
|
||||
ch_canread() check if there is something to read
|
||||
ch_open() open a channel
|
||||
ch_close() close a channel
|
||||
ch_close_in() close the in part of a channel
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Nov 06
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Dec 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -181,6 +181,12 @@ Insert mode commands: ~
|
||||
|i_CTRL-G_U| CTRL-G U don't break undo with next cursor movement
|
||||
|
||||
|
||||
Cmdline mode commands: ~
|
||||
|
||||
|/_CTRL-G| CTRL-G move to the next match in 'incsearch' mode
|
||||
|/_CTRL-T| CTRL-T move to the previous match in 'incsearch' mode
|
||||
|
||||
|
||||
Options: ~
|
||||
|
||||
'belloff' do not ring the bell for these reasons
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.0. Last change: 2016 Oct 21
|
||||
*windows.txt* For Vim version 8.0. Last change: 2016 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -696,6 +696,8 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
- If the file is not open in a window edit the file in the
|
||||
current window. If the current buffer can't be |abandon|ed,
|
||||
the window is split first.
|
||||
- Windows that are not in the argument list or are not full
|
||||
width will be closed if possible.
|
||||
The |argument-list| is set, like with the |:next| command.
|
||||
The purpose of this command is that it can be used from a
|
||||
program that wants Vim to edit another file, e.g., a debugger.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
|
||||
" Last Changed: 2016 July 20
|
||||
" Last Changed: 2016 December 5
|
||||
" URL: https://github.com/blinskey/vim-armenian-keymaps
|
||||
|
||||
let b:keymap_name = "hy"
|
||||
@@ -98,6 +98,8 @@ f ֆ
|
||||
7 .
|
||||
8 «
|
||||
9 »
|
||||
* (
|
||||
( )
|
||||
\\ '
|
||||
| ՞
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
|
||||
" Last Changed: 2016 July 20
|
||||
" Last Changed: 2016 December 5
|
||||
" URL: https://github.com/blinskey/vim-armenian-keymaps
|
||||
|
||||
let b:keymap_name = "hy"
|
||||
@@ -98,6 +98,8 @@ f ֆ
|
||||
7 .
|
||||
8 «
|
||||
9 »
|
||||
* (
|
||||
( )
|
||||
\\ '
|
||||
| ՞
|
||||
|
||||
|
||||
@@ -1345,10 +1345,18 @@ if exists("&pythondll")
|
||||
call append("$", "pythondll\tname of the Python 2 dynamic library")
|
||||
call <SID>OptionG("pythondll", &pythondll)
|
||||
endif
|
||||
if exists("&pythonhome")
|
||||
call append("$", "pythonhome\tname of the Python 2 home directory")
|
||||
call <SID>OptionG("pythonhome", &pythonhome)
|
||||
endif
|
||||
if exists("&pythonthreedll")
|
||||
call append("$", "pythonthreedll\tname of the Python 3 dynamic library")
|
||||
call <SID>OptionG("pythonthreedll", &pythonthreedll)
|
||||
endif
|
||||
if exists("&pythonthreehome")
|
||||
call append("$", "pythonthreehome\tname of the Python 3 home directory")
|
||||
call <SID>OptionG("pythonthreehome", &pythonthreehome)
|
||||
endif
|
||||
if exists("&rubydll")
|
||||
call append("$", "rubydll\tname of the Ruby dynamic library")
|
||||
call <SID>OptionG("rubydll", &rubydll)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Nov 17
|
||||
" Last Change: 2016 Nov 18
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -363,23 +363,23 @@ syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
|
||||
if !exists("c_no_if0")
|
||||
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
|
||||
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
|
||||
else
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
endif
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
else
|
||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||
endif
|
||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||
endif
|
||||
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn match cIncluded display contained "<[^>]*>"
|
||||
|
||||
+13
-5
@@ -1,9 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: HTML
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/html.vim
|
||||
" Last Change: 2015 Jan 07
|
||||
" included patch from David Felix
|
||||
" Language: HTML
|
||||
" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" Last Change: 2016 Dec 29
|
||||
" included patch from Jorge Maldonado Ventura
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
|
||||
@@ -53,6 +53,14 @@ syn keyword htmlTagName contained abbr acronym bdo button col label
|
||||
syn keyword htmlTagName contained colgroup del fieldset iframe ins legend
|
||||
syn keyword htmlTagName contained object optgroup q s tbody tfoot thead
|
||||
|
||||
" new html 5 tags
|
||||
syn keyword htmlTagName contained article aside audio bdi canvas datalist
|
||||
syn keyword htmlTagName contained details embed figcaption figure
|
||||
syn keyword htmlTagName contained footer header hgroup main mark
|
||||
syn keyword htmlTagName contained menuitem meter nav output picture
|
||||
syn keyword htmlTagName contained progress rb rp rt rtc ruby section
|
||||
syn keyword htmlTagName contained slot source template time track video wbr
|
||||
|
||||
" legal arg names
|
||||
syn keyword htmlArg contained action
|
||||
syn keyword htmlArg contained align alink alt archive background bgcolor
|
||||
|
||||
+20
-20
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: php PHP 3/4/5/7
|
||||
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
|
||||
" Last Change: Jul 27, 2016
|
||||
" Last Change: Dec 11, 2016
|
||||
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
|
||||
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
|
||||
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
@@ -495,7 +495,7 @@ syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,
|
||||
" Highlighting for __autoload slightly different from line above
|
||||
syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
|
||||
\ __autoload
|
||||
highlight link phpSpecialFunction phpOperator
|
||||
hi def link phpSpecialFunction phpOperator
|
||||
|
||||
" Highlighting for PHP5's built-in classes
|
||||
" - built-in classes harvested from get_declared_classes() in 5.1.4
|
||||
@@ -518,14 +518,14 @@ syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStrin
|
||||
\ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler
|
||||
\ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity
|
||||
\ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath
|
||||
highlight link phpClasses phpFunctions
|
||||
hi def link phpClasses phpFunctions
|
||||
|
||||
" Highlighting for PHP5's built-in interfaces
|
||||
" - built-in classes harvested from get_declared_interfaces() in 5.1.4
|
||||
syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
|
||||
\ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator
|
||||
\ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector
|
||||
highlight link phpInterfaces phpConstant
|
||||
hi def link phpInterfaces phpConstant
|
||||
|
||||
" option defaults:
|
||||
if ! exists('php_special_functions')
|
||||
@@ -553,7 +553,7 @@ endif
|
||||
if php_alt_assignByReference
|
||||
" special highlighting for '=&' operator
|
||||
syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle
|
||||
highlight link phpAssignByRef Type
|
||||
hi def link phpAssignByRef Type
|
||||
endif
|
||||
|
||||
if php_alt_comparisons
|
||||
@@ -565,7 +565,7 @@ if php_alt_comparisons
|
||||
syntax case ignore
|
||||
syntax keyword phpComparison instanceof contained containedin=phpRegion
|
||||
|
||||
hi link phpComparison Statement
|
||||
hi def link phpComparison Statement
|
||||
endif
|
||||
|
||||
" ================================================================
|
||||
@@ -645,21 +645,21 @@ hi def link phpTodo Todo
|
||||
hi def link phpDocTodo Todo
|
||||
hi def link phpMemberSelector Structure
|
||||
if exists("php_oldStyle")
|
||||
hi phpIntVar guifg=Red ctermfg=DarkRed
|
||||
hi phpEnvVar guifg=Red ctermfg=DarkRed
|
||||
hi phpOperator guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi phpRelation guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi phpIdentifier guifg=DarkGray ctermfg=Brown
|
||||
hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown
|
||||
hi def phpIntVar guifg=Red ctermfg=DarkRed
|
||||
hi def phpEnvVar guifg=Red ctermfg=DarkRed
|
||||
hi def phpOperator guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi def phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi def phpRelation guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi def phpIdentifier guifg=DarkGray ctermfg=Brown
|
||||
hi def phpIdentifierSimply guifg=DarkGray ctermfg=Brown
|
||||
else
|
||||
hi def link phpIntVar Identifier
|
||||
hi def link phpEnvVar Identifier
|
||||
hi def link phpOperator Operator
|
||||
hi def link phpVarSelector Operator
|
||||
hi def link phpRelation Operator
|
||||
hi def link phpIdentifier Identifier
|
||||
hi def link phpIdentifierSimply Identifier
|
||||
hi def link phpIntVar Identifier
|
||||
hi def link phpEnvVar Identifier
|
||||
hi def link phpOperator Operator
|
||||
hi def link phpVarSelector Operator
|
||||
hi def link phpRelation Operator
|
||||
hi def link phpIdentifier Identifier
|
||||
hi def link phpIdentifierSimply Identifier
|
||||
endif
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
||||
" Contributor: Karsten Hopp <karsten@redhat.com>
|
||||
" Contributor: Dean, Adam Kenneth <adam.ken.dean@hpe.com>
|
||||
" Last Change: 2016 Aug 11
|
||||
" SSH Version: 7.3p1
|
||||
" Last Change: 2016 Dec 28
|
||||
" SSH Version: 7.4p1
|
||||
"
|
||||
|
||||
" Setup
|
||||
@@ -181,6 +181,7 @@ syn keyword sshconfigKeyword IPQoS
|
||||
syn keyword sshconfigKeyword IdentitiesOnly
|
||||
syn keyword sshconfigKeyword IdentityFile
|
||||
syn keyword sshconfigKeyword IgnoreUnknown
|
||||
syn keyword sshconfigKeyword Include
|
||||
syn keyword sshconfigKeyword IPQoS
|
||||
syn keyword sshconfigKeyword KbdInteractiveAuthentication
|
||||
syn keyword sshconfigKeyword KbdInteractiveDevices
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
||||
" Contributor: Karsten Hopp <karsten@redhat.com>
|
||||
" Originally: 2009-07-09
|
||||
" Last Change: 2016 Mar 1
|
||||
" SSH Version: 7.2
|
||||
" Last Change: 2016 Dec 28
|
||||
" SSH Version: 7.4p1
|
||||
"
|
||||
|
||||
" Setup
|
||||
@@ -161,6 +161,7 @@ syn keyword sshdconfigKeyword Compression
|
||||
syn keyword sshdconfigKeyword DebianBanner
|
||||
syn keyword sshdconfigKeyword DenyGroups
|
||||
syn keyword sshdconfigKeyword DenyUsers
|
||||
syn keyword sshdconfigKeyword DisableForwarding
|
||||
syn keyword sshdconfigKeyword ForceCommand
|
||||
syn keyword sshdconfigKeyword GSSAPIAuthentication
|
||||
syn keyword sshdconfigKeyword GSSAPICleanupCredentials
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>116</string>
|
||||
<string>120</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -233,6 +233,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
[NSNumber numberWithBool:NO], MMSuppressTerminationAlertKey,
|
||||
[NSNumber numberWithBool:YES], MMNativeFullScreenKey,
|
||||
[NSNumber numberWithDouble:0.25], MMFullScreenFadeTimeKey,
|
||||
[NSNumber numberWithBool:NO], MMUseCGLayerAlwaysKey,
|
||||
nil];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:dict];
|
||||
|
||||
+40
-1
@@ -198,6 +198,9 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
#ifdef FEAT_BEVAL
|
||||
- (void)bevalCallback:(id)sender;
|
||||
#endif
|
||||
#ifdef MESSAGE_QUEUE
|
||||
- (void)checkForProcessEvents:(NSTimer *)timer;
|
||||
#endif
|
||||
@end
|
||||
|
||||
|
||||
@@ -679,13 +682,26 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
|
||||
// Only start the run loop if the input queue is empty, otherwise process
|
||||
// the input first so that the input on queue isn't delayed.
|
||||
if ([inputQueue count]) {
|
||||
if ([inputQueue count] || input_available()) {
|
||||
inputReceived = YES;
|
||||
} else {
|
||||
// Wait for the specified amount of time, unless 'milliseconds' is
|
||||
// negative in which case we wait "forever" (1e6 seconds translates to
|
||||
// approximately 11 days).
|
||||
CFTimeInterval dt = (milliseconds >= 0 ? .001*milliseconds : 1e6);
|
||||
NSTimer *timer = nil;
|
||||
|
||||
// Set interval timer which checks for the events of job and channel
|
||||
// when there is any pending job or channel.
|
||||
if (dt > 0.1 && (has_any_channel() || has_pending_job())) {
|
||||
timer = [NSTimer scheduledTimerWithTimeInterval:0.1
|
||||
target:self
|
||||
selector:@selector(checkForProcessEvents:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
[[NSRunLoop currentRunLoop] addTimer:timer
|
||||
forMode:NSDefaultRunLoopMode];
|
||||
}
|
||||
|
||||
while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, dt, true)
|
||||
== kCFRunLoopRunHandledSource) {
|
||||
@@ -695,6 +711,11 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
dt = 0.0;
|
||||
inputReceived = YES;
|
||||
}
|
||||
|
||||
if (input_available())
|
||||
inputReceived = YES;
|
||||
|
||||
[timer invalidate];
|
||||
}
|
||||
|
||||
// The above calls may have placed messages on the input queue so process
|
||||
@@ -3004,6 +3025,24 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MESSAGE_QUEUE
|
||||
- (void)checkForProcessEvents:(NSTimer *)timer
|
||||
{
|
||||
# ifdef FEAT_TIMERS
|
||||
did_add_timer = FALSE;
|
||||
# endif
|
||||
|
||||
parse_queued_messages();
|
||||
|
||||
if (input_available()
|
||||
# ifdef FEAT_TIMERS
|
||||
|| did_add_timer
|
||||
# endif
|
||||
)
|
||||
CFRunLoopStop(CFRunLoopGetCurrent());
|
||||
}
|
||||
#endif
|
||||
|
||||
@end // MMBackend (Private)
|
||||
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
BOOL cgLayerEnabled;
|
||||
CGLayerRef cgLayer;
|
||||
CGContextRef cgLayerContext;
|
||||
NSLock *cgLayerLock;
|
||||
|
||||
// These are used in MMCoreTextView+ToolTip.m
|
||||
id trackingRectOwner_; // (not retained)
|
||||
|
||||
+64
-16
@@ -132,6 +132,10 @@ defaultAdvanceForFont(NSFont *font)
|
||||
if (!(self = [super initWithFrame:frame]))
|
||||
return nil;
|
||||
|
||||
cgLayerEnabled = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:MMUseCGLayerAlwaysKey];
|
||||
cgLayerLock = [NSLock new];
|
||||
|
||||
// NOTE! It does not matter which font is set here, Vim will set its
|
||||
// own font on startup anyway. Just set some bogus values.
|
||||
font = [[NSFont userFixedPitchFontOfSize:0] retain];
|
||||
@@ -586,18 +590,12 @@ defaultAdvanceForFont(NSFont *font)
|
||||
NSGraphicsContext *context = [NSGraphicsContext currentContext];
|
||||
[context setShouldAntialias:antialias];
|
||||
|
||||
id data;
|
||||
NSEnumerator *e = [drawData objectEnumerator];
|
||||
while ((data = [e nextObject]))
|
||||
[self batchDrawData:data];
|
||||
|
||||
[drawData removeAllObjects];
|
||||
|
||||
if (cgLayerEnabled) {
|
||||
if (cgLayerEnabled && drawData.count == 0) {
|
||||
// during a live resize, we will have around a stale layer until the
|
||||
// refresh messages travel back from the vim process. We push the old
|
||||
// layer in at an offset to get rid of jitter due to lines changing
|
||||
// position.
|
||||
[cgLayerLock lock];
|
||||
CGLayerRef l = [self getCGLayer];
|
||||
CGSize cgLayerSize = CGLayerGetSize(l);
|
||||
CGSize frameSize = [self frame].size;
|
||||
@@ -607,19 +605,46 @@ defaultAdvanceForFont(NSFont *font)
|
||||
cgLayerSize.width,
|
||||
cgLayerSize.height);
|
||||
|
||||
CGContextDrawLayerInRect([context graphicsPort], drawRect, l);
|
||||
CGContextRef cgContext = [context graphicsPort];
|
||||
|
||||
const NSRect *rects;
|
||||
long count;
|
||||
[self getRectsBeingDrawn:&rects count:&count];
|
||||
|
||||
int i;
|
||||
for (i = 0; i < count; i++) {
|
||||
CGContextSaveGState(cgContext);
|
||||
CGContextClipToRect(cgContext, rects[i]);
|
||||
CGContextSetBlendMode(cgContext, kCGBlendModeCopy);
|
||||
CGContextDrawLayerInRect(cgContext, drawRect, l);
|
||||
CGContextRestoreGState(cgContext);
|
||||
}
|
||||
[cgLayerLock unlock];
|
||||
} else {
|
||||
id data;
|
||||
NSEnumerator *e = [drawData objectEnumerator];
|
||||
while ((data = [e nextObject]))
|
||||
[self batchDrawData:data];
|
||||
|
||||
[drawData removeAllObjects];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)performBatchDrawWithData:(NSData *)data
|
||||
{
|
||||
[drawData addObject:data];
|
||||
[self setNeedsDisplay:YES];
|
||||
if (cgLayerEnabled && drawData.count == 0 && [self getCGContext]) {
|
||||
[cgLayerLock lock];
|
||||
[self batchDrawData:data];
|
||||
[cgLayerLock unlock];
|
||||
} else {
|
||||
[drawData addObject:data];
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
// NOTE: During resizing, Cocoa only sends draw messages before Vim's rows
|
||||
// and columns are changed (due to ipc delays). Force a redraw here.
|
||||
if ([self inLiveResize])
|
||||
[self display];
|
||||
// NOTE: During resizing, Cocoa only sends draw messages before Vim's rows
|
||||
// and columns are changed (due to ipc delays). Force a redraw here.
|
||||
if ([self inLiveResize])
|
||||
[self display];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled
|
||||
@@ -642,11 +667,12 @@ defaultAdvanceForFont(NSFont *font)
|
||||
- (CGLayerRef)getCGLayer
|
||||
{
|
||||
NSParameterAssert(cgLayerEnabled);
|
||||
if (!cgLayer) {
|
||||
if (!cgLayer && [self lockFocusIfCanDraw]) {
|
||||
NSGraphicsContext *context = [NSGraphicsContext currentContext];
|
||||
NSRect frame = [self frame];
|
||||
cgLayer = CGLayerCreateWithContext(
|
||||
[context graphicsPort], frame.size, NULL);
|
||||
[self unlockFocus];
|
||||
}
|
||||
return cgLayer;
|
||||
}
|
||||
@@ -662,6 +688,18 @@ defaultAdvanceForFont(NSFont *font)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setNeedsDisplayCGLayerInRect:(CGRect)rect
|
||||
{
|
||||
if (cgLayerEnabled)
|
||||
[self setNeedsDisplayInRect:rect];
|
||||
}
|
||||
|
||||
- (void)setNeedsDisplayCGLayer:(BOOL)flag
|
||||
{
|
||||
if (cgLayerEnabled)
|
||||
[self setNeedsDisplay:flag];
|
||||
}
|
||||
|
||||
|
||||
- (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size
|
||||
{
|
||||
@@ -978,6 +1016,7 @@ defaultAdvanceForFont(NSFont *font)
|
||||
operation:NSCompositingOperationSourceOver
|
||||
fraction:1.0];
|
||||
}
|
||||
[self setNeedsDisplayCGLayerInRect:r];
|
||||
} else if (DrawStringDrawType == type) {
|
||||
int bg = *((int*)bytes); bytes += sizeof(int);
|
||||
int fg = *((int*)bytes); bytes += sizeof(int);
|
||||
@@ -1474,6 +1513,8 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
if (thinStrokes)
|
||||
CGContextSetFontSmoothingStyle(context, originalFontSmoothingStyle);
|
||||
CGContextRestoreGState(context);
|
||||
|
||||
[self setNeedsDisplayCGLayerInRect:clipRect];
|
||||
}
|
||||
|
||||
- (void)scrollRect:(NSRect)rect lineCount:(int)count
|
||||
@@ -1487,9 +1528,11 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
// draw self on top of self, offset so as to "scroll" lines vertically
|
||||
CGContextSaveGState(context);
|
||||
CGContextClipToRect(context, clipRect);
|
||||
CGContextSetBlendMode(context, kCGBlendModeCopy);
|
||||
CGContextDrawLayerAtPoint(
|
||||
context, CGPointMake(0, -yOffset), [self getCGLayer]);
|
||||
CGContextRestoreGState(context);
|
||||
[self setNeedsDisplayCGLayerInRect:clipRect];
|
||||
} else {
|
||||
NSSize delta={0, -count * cellSize.height};
|
||||
[self scrollRect:rect by:delta];
|
||||
@@ -1544,6 +1587,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
CGContextSetBlendMode(context, kCGBlendModeCopy);
|
||||
CGContextFillRect(context, *(CGRect*)&rect);
|
||||
CGContextSetBlendMode(context, kCGBlendModeNormal);
|
||||
[self setNeedsDisplayCGLayerInRect:rect];
|
||||
}
|
||||
|
||||
- (void)clearAll
|
||||
@@ -1560,6 +1604,8 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
CGContextSetRGBFillColor(context, r, g, b, a);
|
||||
CGContextFillRect(context, *(CGRect*)&rect);
|
||||
CGContextSetBlendMode(context, kCGBlendModeNormal);
|
||||
|
||||
[self setNeedsDisplayCGLayer:YES];
|
||||
}
|
||||
|
||||
- (void)drawInsertionPointAtRow:(int)row column:(int)col shape:(int)shape
|
||||
@@ -1607,6 +1653,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
CGContextFillRect(context, *(CGRect*)&rect);
|
||||
}
|
||||
|
||||
[self setNeedsDisplayCGLayerInRect:rect];
|
||||
CGContextRestoreGState(context);
|
||||
}
|
||||
|
||||
@@ -1623,6 +1670,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
numColumns:ncols];
|
||||
CGContextFillRect(cgctx, *(CGRect*)&rect);
|
||||
|
||||
[self setNeedsDisplayCGLayerInRect:rect];
|
||||
CGContextRestoreGState(cgctx);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ extern NSString *MMSuppressTerminationAlertKey;
|
||||
extern NSString *MMNativeFullScreenKey;
|
||||
extern NSString *MMUseMouseTimeKey;
|
||||
extern NSString *MMFullScreenFadeTimeKey;
|
||||
extern NSString *MMUseCGLayerAlwaysKey;
|
||||
|
||||
|
||||
// Enum for MMUntitledWindowKey
|
||||
|
||||
@@ -48,6 +48,7 @@ NSString *MMSuppressTerminationAlertKey = @"MMSuppressTerminationAlert";
|
||||
NSString *MMNativeFullScreenKey = @"MMNativeFullScreen";
|
||||
NSString *MMUseMouseTimeKey = @"MMUseMouseTime";
|
||||
NSString *MMFullScreenFadeTimeKey = @"MMFullScreenFadeTime";
|
||||
NSString *MMUseCGLayerAlwaysKey = @"MMUseCGLayerAlways";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,3 +13,25 @@ set backspace+=indent,eol,start
|
||||
" the entire MacVim menu is set up in a nib file which currently only is
|
||||
" translated to English).
|
||||
set langmenu=none
|
||||
|
||||
" Python2
|
||||
" MacVim uses Homebrew python2 if installed, otherwise configured one
|
||||
if exists("&pythondll") && exists("&pythonhome")
|
||||
if filereadable("/usr/local/Frameworks/Python.framework/Versions/2.7/Python")
|
||||
" Homebrew python 2.7
|
||||
set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
|
||||
set pythonhome=/usr/local/Frameworks/Python.framework/Versions/2.7
|
||||
endif
|
||||
endif
|
||||
|
||||
" Python3
|
||||
" MacVim uses Homebrew python3 if installed, next try to use python.org binary
|
||||
if exists("&pythonthreedll") && exists("&pythonthreehome") &&
|
||||
\ !filereadable(&pythonthreedll)
|
||||
if filereadable("/Library/Frameworks/Python.framework/Versions/3.5/Python")
|
||||
" https://www.python.org/downloads/mac-osx/
|
||||
set pythonthreedll=/Library/Frameworks/Python.framework/Versions/3.5/Python
|
||||
set pythonthreehome=/Library/Frameworks/Python.framework/Versions/3.5
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -81,6 +81,13 @@ ifndef STATIC_STDCPLUS
|
||||
STATIC_STDCPLUS=no
|
||||
endif
|
||||
|
||||
|
||||
# Link against the shared version of libwinpthread by default. Set
|
||||
# STATIC_WINPTHREAD to "yes" to link against static version instead.
|
||||
ifndef STATIC_WINPTHREAD
|
||||
STATIC_WINPTHREAD=$(STATIC_STDCPLUS)
|
||||
endif
|
||||
|
||||
# If the user doesn't want gettext, undefine it.
|
||||
ifeq (no, $(GETTEXT))
|
||||
GETTEXT=
|
||||
@@ -817,6 +824,10 @@ LIB += -lstdc++
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (yes, $(STATIC_WINPTHREAD))
|
||||
LIB += -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic
|
||||
endif
|
||||
|
||||
all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
|
||||
|
||||
vimrun.exe: vimrun.c
|
||||
|
||||
+34
-7
@@ -1695,27 +1695,42 @@ OBJ_COMMON = \
|
||||
$(WSDEBUG_OBJ)
|
||||
|
||||
# The files included by tests are not in OBJ_COMMON.
|
||||
OBJ = $(OBJ_COMMON) \
|
||||
OBJ_MAIN = \
|
||||
objects/json.o \
|
||||
objects/main.o \
|
||||
objects/memfile.o \
|
||||
objects/message.o
|
||||
|
||||
JSON_TEST_OBJ = $(OBJ_COMMON) \
|
||||
OBJ = $(OBJ_COMMON) $(OBJ_MAIN)
|
||||
|
||||
OBJ_JSON_TEST = \
|
||||
objects/memfile.o \
|
||||
objects/message.o \
|
||||
objects/json_test.o
|
||||
|
||||
MEMFILE_TEST_OBJ = $(OBJ_COMMON) \
|
||||
JSON_TEST_OBJ = $(OBJ_COMMON) $(OBJ_JSON_TEST)
|
||||
|
||||
OBJ_MEMFILE_TEST = \
|
||||
objects/json.o \
|
||||
objects/message.o \
|
||||
objects/memfile_test.o
|
||||
|
||||
MESSAGE_TEST_OBJ = $(OBJ_COMMON) \
|
||||
MEMFILE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MEMFILE_TEST)
|
||||
|
||||
OBJ_MESSAGE_TEST = \
|
||||
objects/json.o \
|
||||
objects/memfile.o \
|
||||
objects/message_test.o
|
||||
|
||||
MESSAGE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MESSAGE_TEST)
|
||||
|
||||
ALL_OBJ = $(OBJ_COMMON) \
|
||||
$(OBJ_MAIN) \
|
||||
$(OBJ_JSON_TEST) \
|
||||
$(OBJ_MEMFILE_TEST) \
|
||||
$(OBJ_MESSAGE_TEST)
|
||||
|
||||
|
||||
PRO_AUTO = \
|
||||
arabic.pro \
|
||||
blowfish.pro \
|
||||
@@ -2069,7 +2084,7 @@ test1 \
|
||||
test60 test64 test65 test66 test67 test68 test69 \
|
||||
test70 test72 test73 test74 test75 test77 test78 test79 \
|
||||
test80 test82 test83 test84 test85 test86 test87 test88 test89 \
|
||||
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
|
||||
test90 test91 test94 test95 test97 test98 test99 \
|
||||
test100 test101 test103 test104 test107 test108:
|
||||
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
|
||||
@@ -2093,6 +2108,7 @@ test_arglist \
|
||||
test_delete \
|
||||
test_diffmode \
|
||||
test_digraph \
|
||||
test_display \
|
||||
test_ex_undo \
|
||||
test_execute_func \
|
||||
test_expand \
|
||||
@@ -2107,6 +2123,7 @@ test_arglist \
|
||||
test_filter_map \
|
||||
test_fnameescape \
|
||||
test_fnamemodify \
|
||||
test_fold \
|
||||
test_glob2regpat \
|
||||
test_gf \
|
||||
test_gn \
|
||||
@@ -2135,6 +2152,8 @@ test_arglist \
|
||||
test_matchadd_conceal_utf8 \
|
||||
test_menu \
|
||||
test_messages \
|
||||
test_mksession \
|
||||
test_mksession_utf8 \
|
||||
test_nested_function \
|
||||
test_netbeans \
|
||||
test_normal \
|
||||
@@ -2868,8 +2887,16 @@ auto/gui_gtk_gresources.h: gui_gtk_res.xml $(GUI_GTK_RES_INPUTS)
|
||||
# commands understand putting object files in another directory, it must be
|
||||
# specified for each file separately.
|
||||
|
||||
objects:
|
||||
mkdir objects
|
||||
objects: objects/.dirstamp
|
||||
|
||||
objects/.dirstamp:
|
||||
mkdir -p objects
|
||||
touch objects/.dirstamp
|
||||
|
||||
# All object files depend on the objects directory, so that parallel make
|
||||
# works. Can't depend on the directory itself, its timestamp changes all the
|
||||
# time.
|
||||
$(ALL_OBJ): objects/.dirstamp
|
||||
|
||||
objects/MMBackend.o: MacVim/MMBackend.m
|
||||
$(CCC) -fobjc-exceptions -o $@ MacVim/MMBackend.m
|
||||
|
||||
Vendored
+3
-3
@@ -7502,7 +7502,7 @@ $as_echo_n "checking whether compiling with process communication is possible...
|
||||
/* Check bitfields */
|
||||
struct nbbuf {
|
||||
unsigned int initDone:1;
|
||||
ushort signmaplen;
|
||||
unsigned short signmaplen;
|
||||
};
|
||||
|
||||
int
|
||||
@@ -12118,8 +12118,8 @@ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
|
||||
|
||||
fi
|
||||
|
||||
for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
for ac_func in fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
|
||||
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
|
||||
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
|
||||
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
|
||||
+2
-2
@@ -4868,8 +4868,8 @@ do_arg_all(
|
||||
wpnext = wp->w_next;
|
||||
buf = wp->w_buffer;
|
||||
if (buf->b_ffname == NULL
|
||||
|| (!keep_tabs && buf->b_nwindows > 1)
|
||||
|| wp->w_width != Columns)
|
||||
|| (!keep_tabs && (buf->b_nwindows > 1
|
||||
|| wp->w_width != Columns)))
|
||||
i = opened_len;
|
||||
else
|
||||
{
|
||||
|
||||
+147
-17
@@ -1216,6 +1216,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
if (opt->jo_set & JO_CLOSE_CALLBACK)
|
||||
set_callback(&channel->ch_close_cb, &channel->ch_close_partial,
|
||||
opt->jo_close_cb, opt->jo_close_partial);
|
||||
channel->ch_drop_never = opt->jo_drop_never;
|
||||
|
||||
if ((opt->jo_set & JO_OUT_IO) && opt->jo_io[PART_OUT] == JIO_BUFFER)
|
||||
{
|
||||
@@ -1939,6 +1940,7 @@ channel_parse_json(channel_T *channel, ch_part_T part)
|
||||
clear_tv(&listtv);
|
||||
else
|
||||
{
|
||||
item->jq_no_callback = FALSE;
|
||||
item->jq_value = alloc_tv();
|
||||
if (item->jq_value == NULL)
|
||||
{
|
||||
@@ -2071,11 +2073,17 @@ remove_json_node(jsonq_T *head, jsonq_T *node)
|
||||
* When "id" is positive it must match the first number in the list.
|
||||
* When "id" is zero or negative jut get the first message. But not the one
|
||||
* with id ch_block_id.
|
||||
* When "without_callback" is TRUE also get messages that were pushed back.
|
||||
* Return OK when found and return the value in "rettv".
|
||||
* Return FAIL otherwise.
|
||||
*/
|
||||
static int
|
||||
channel_get_json(channel_T *channel, ch_part_T part, int id, typval_T **rettv)
|
||||
channel_get_json(
|
||||
channel_T *channel,
|
||||
ch_part_T part,
|
||||
int id,
|
||||
int without_callback,
|
||||
typval_T **rettv)
|
||||
{
|
||||
jsonq_T *head = &channel->ch_part[part].ch_json_head;
|
||||
jsonq_T *item = head->jq_next;
|
||||
@@ -2085,10 +2093,11 @@ channel_get_json(channel_T *channel, ch_part_T part, int id, typval_T **rettv)
|
||||
list_T *l = item->jq_value->vval.v_list;
|
||||
typval_T *tv = &l->lv_first->li_tv;
|
||||
|
||||
if ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id)
|
||||
if ((without_callback || !item->jq_no_callback)
|
||||
&& ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id)
|
||||
|| (id <= 0 && (tv->v_type != VAR_NUMBER
|
||||
|| tv->vval.v_number == 0
|
||||
|| tv->vval.v_number != channel->ch_part[part].ch_block_id)))
|
||||
|| tv->vval.v_number != channel->ch_part[part].ch_block_id))))
|
||||
{
|
||||
*rettv = item->jq_value;
|
||||
if (tv->v_type == VAR_NUMBER)
|
||||
@@ -2101,6 +2110,65 @@ channel_get_json(channel_T *channel, ch_part_T part, int id, typval_T **rettv)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Put back "rettv" into the JSON queue, there was no callback for it.
|
||||
* Takes over the values in "rettv".
|
||||
*/
|
||||
static void
|
||||
channel_push_json(channel_T *channel, ch_part_T part, typval_T *rettv)
|
||||
{
|
||||
jsonq_T *head = &channel->ch_part[part].ch_json_head;
|
||||
jsonq_T *item = head->jq_next;
|
||||
jsonq_T *newitem;
|
||||
|
||||
if (head->jq_prev != NULL && head->jq_prev->jq_no_callback)
|
||||
/* last item was pushed back, append to the end */
|
||||
item = NULL;
|
||||
else while (item != NULL && item->jq_no_callback)
|
||||
/* append after the last item that was pushed back */
|
||||
item = item->jq_next;
|
||||
|
||||
newitem = (jsonq_T *)alloc((unsigned)sizeof(jsonq_T));
|
||||
if (newitem == NULL)
|
||||
clear_tv(rettv);
|
||||
else
|
||||
{
|
||||
newitem->jq_value = alloc_tv();
|
||||
if (newitem->jq_value == NULL)
|
||||
{
|
||||
vim_free(newitem);
|
||||
clear_tv(rettv);
|
||||
}
|
||||
else
|
||||
{
|
||||
newitem->jq_no_callback = FALSE;
|
||||
*newitem->jq_value = *rettv;
|
||||
if (item == NULL)
|
||||
{
|
||||
/* append to the end */
|
||||
newitem->jq_prev = head->jq_prev;
|
||||
head->jq_prev = newitem;
|
||||
newitem->jq_next = NULL;
|
||||
if (newitem->jq_prev == NULL)
|
||||
head->jq_next = newitem;
|
||||
else
|
||||
newitem->jq_prev->jq_next = newitem;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* append after "item" */
|
||||
newitem->jq_prev = item;
|
||||
newitem->jq_next = item->jq_next;
|
||||
item->jq_next = newitem;
|
||||
if (newitem->jq_next == NULL)
|
||||
head->jq_prev = newitem;
|
||||
else
|
||||
newitem->jq_next->jq_prev = newitem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define CH_JSON_MAX_ARGS 4
|
||||
|
||||
/*
|
||||
@@ -2431,11 +2499,11 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
int argc = 0;
|
||||
|
||||
/* Get any json message in the queue. */
|
||||
if (channel_get_json(channel, part, -1, &listtv) == FAIL)
|
||||
if (channel_get_json(channel, part, -1, FALSE, &listtv) == FAIL)
|
||||
{
|
||||
/* Parse readahead, return when there is still no message. */
|
||||
channel_parse_json(channel, part);
|
||||
if (channel_get_json(channel, part, -1, &listtv) == FAIL)
|
||||
if (channel_get_json(channel, part, -1, FALSE, &listtv) == FAIL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2475,7 +2543,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
/* If there is a close callback it may use ch_read() to get the
|
||||
* messages. */
|
||||
if (channel->ch_close_cb == NULL)
|
||||
if (channel->ch_close_cb == NULL && !channel->ch_drop_never)
|
||||
drop_messages(channel, part);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -2552,7 +2620,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
int done = FALSE;
|
||||
|
||||
/* invoke the one-time callback with the matching nr */
|
||||
/* JSON or JS mode: invoke the one-time callback with the matching nr */
|
||||
for (cbitem = cbhead->cq_next; cbitem != NULL; cbitem = cbitem->cq_next)
|
||||
if (cbitem->cq_seq_nr == seq_nr)
|
||||
{
|
||||
@@ -2561,7 +2629,17 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
break;
|
||||
}
|
||||
if (!done)
|
||||
ch_logn(channel, "Dropping message %d without callback", seq_nr);
|
||||
{
|
||||
if (channel->ch_drop_never)
|
||||
{
|
||||
/* message must be read with ch_read() */
|
||||
channel_push_json(channel, part, listtv);
|
||||
listtv = NULL;
|
||||
}
|
||||
else
|
||||
ch_logn(channel, "Dropping message %d without callback",
|
||||
seq_nr);
|
||||
}
|
||||
}
|
||||
else if (callback != NULL || buffer != NULL)
|
||||
{
|
||||
@@ -2588,7 +2666,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
}
|
||||
}
|
||||
else
|
||||
ch_log(channel, "Dropping message");
|
||||
ch_logn(channel, "Dropping message %d", seq_nr);
|
||||
|
||||
if (listtv != NULL)
|
||||
free_tv(listtv);
|
||||
@@ -2624,7 +2702,7 @@ channel_is_open(channel_T *channel)
|
||||
/*
|
||||
* Return TRUE if "channel" has JSON or other typeahead.
|
||||
*/
|
||||
static int
|
||||
int
|
||||
channel_has_readahead(channel_T *channel, ch_part_T part)
|
||||
{
|
||||
ch_mode_T ch_mode = channel->ch_part[part].ch_mode;
|
||||
@@ -2813,9 +2891,10 @@ channel_close(channel_T *channel, int invoke_close_cb)
|
||||
redraw_after_callback();
|
||||
}
|
||||
|
||||
/* any remaining messages are useless now */
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
drop_messages(channel, part);
|
||||
if (!channel->ch_drop_never)
|
||||
/* any remaining messages are useless now */
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
drop_messages(channel, part);
|
||||
}
|
||||
|
||||
channel->ch_nb_close_cb = NULL;
|
||||
@@ -3112,9 +3191,9 @@ ch_close_part_on_error(
|
||||
channel_close_now(channel_T *channel)
|
||||
{
|
||||
ch_log(channel, "Closing channel because all readable fds are closed");
|
||||
channel_close(channel, TRUE);
|
||||
if (channel->ch_nb_close_cb != NULL)
|
||||
(*channel->ch_nb_close_cb)();
|
||||
channel_close(channel, TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3268,7 +3347,7 @@ channel_read_block(channel_T *channel, ch_part_T part, int timeout)
|
||||
* When "id" is -1 accept any message;
|
||||
* Blocks until the message is received or the timeout is reached.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
channel_read_json_block(
|
||||
channel_T *channel,
|
||||
ch_part_T part,
|
||||
@@ -3289,7 +3368,7 @@ channel_read_json_block(
|
||||
more = channel_parse_json(channel, part);
|
||||
|
||||
/* search for message "id" */
|
||||
if (channel_get_json(channel, part, id, rettv) == OK)
|
||||
if (channel_get_json(channel, part, id, TRUE, rettv) == OK)
|
||||
{
|
||||
chanpart->ch_block_id = 0;
|
||||
return OK;
|
||||
@@ -3840,6 +3919,11 @@ channel_parse_messages(void)
|
||||
int ret = FALSE;
|
||||
int r;
|
||||
ch_part_T part = PART_SOCK;
|
||||
#ifdef ELAPSED_FUNC
|
||||
ELAPSED_TYPE start_tv;
|
||||
|
||||
ELAPSED_INIT(start_tv);
|
||||
#endif
|
||||
|
||||
++safe_to_invoke_callback;
|
||||
|
||||
@@ -3884,7 +3968,14 @@ channel_parse_messages(void)
|
||||
r = may_invoke_callback(channel, part);
|
||||
if (r == OK)
|
||||
ret = TRUE;
|
||||
if (channel_unref(channel) || r == OK)
|
||||
if (channel_unref(channel) || (r == OK
|
||||
#ifdef ELAPSED_FUNC
|
||||
/* Limit the time we loop here to 100 msec, otherwise
|
||||
* Vim becomes unresponsive when the callback takes
|
||||
* more than a bit of time. */
|
||||
&& ELAPSED_FUNC(start_tv) < 100L
|
||||
#endif
|
||||
))
|
||||
{
|
||||
/* channel was freed or something was done, start over */
|
||||
channel = first_channel;
|
||||
@@ -3912,6 +4003,31 @@ channel_parse_messages(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if any channel has readahead. That means we should not block on
|
||||
* waiting for input.
|
||||
*/
|
||||
int
|
||||
channel_any_readahead(void)
|
||||
{
|
||||
channel_T *channel = first_channel;
|
||||
ch_part_T part = PART_SOCK;
|
||||
|
||||
while (channel != NULL)
|
||||
{
|
||||
if (channel_has_readahead(channel, part))
|
||||
return TRUE;
|
||||
if (part < PART_ERR)
|
||||
++part;
|
||||
else
|
||||
{
|
||||
channel = channel->ch_next;
|
||||
part = PART_SOCK;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark references to lists used in channels.
|
||||
*/
|
||||
@@ -4278,6 +4394,20 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported)
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "drop") == 0)
|
||||
{
|
||||
int never = FALSE;
|
||||
val = get_tv_string(item);
|
||||
|
||||
if (STRCMP(val, "never") == 0)
|
||||
never = TRUE;
|
||||
else if (STRCMP(val, "auto") != 0)
|
||||
{
|
||||
EMSG2(_(e_invarg2), "drop");
|
||||
return FAIL;
|
||||
}
|
||||
opt->jo_drop_never = never;
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "exit_cb") == 0)
|
||||
{
|
||||
if (!(supported & JO_EXIT_CB))
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
#undef BAD_GETCWD
|
||||
|
||||
/* Define if you the function: */
|
||||
#undef HAVE_BCMP
|
||||
#undef HAVE_FCHDIR
|
||||
#undef HAVE_FCHOWN
|
||||
#undef HAVE_FSEEKO
|
||||
@@ -170,7 +169,6 @@
|
||||
#undef HAVE_ICONV
|
||||
#undef HAVE_NL_LANGINFO_CODESET
|
||||
#undef HAVE_LSTAT
|
||||
#undef HAVE_MEMCMP
|
||||
#undef HAVE_MEMSET
|
||||
#undef HAVE_MKDTEMP
|
||||
#undef HAVE_NANOSLEEP
|
||||
|
||||
+3
-3
@@ -2053,7 +2053,7 @@ if test "$enable_channel" = "yes"; then
|
||||
/* Check bitfields */
|
||||
struct nbbuf {
|
||||
unsigned int initDone:1;
|
||||
ushort signmaplen;
|
||||
unsigned short signmaplen;
|
||||
};
|
||||
], [
|
||||
/* Check creating a socket. */
|
||||
@@ -3673,8 +3673,8 @@ fi
|
||||
|
||||
dnl Check for functions in one big call, to reduce the size of configure.
|
||||
dnl Can only be used for functions that do not require any include.
|
||||
AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
AC_CHECK_FUNCS(fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
|
||||
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
|
||||
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
|
||||
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
|
||||
+1
-1
@@ -3889,7 +3889,7 @@ ins_compl_prep(int c)
|
||||
if (prev_col > 0)
|
||||
dec_cursor();
|
||||
/* only format when something was inserted */
|
||||
if (!arrow_used && !ins_need_undo)
|
||||
if (!arrow_used && !ins_need_undo && c != Ctrl_E)
|
||||
insertchar(NUL, 0, -1);
|
||||
if (prev_col > 0
|
||||
&& ml_get_curline()[curwin->w_cursor.col] != NUL)
|
||||
|
||||
+22
-1
@@ -76,6 +76,7 @@ static void f_call(typval_T *argvars, typval_T *rettv);
|
||||
static void f_ceil(typval_T *argvars, typval_T *rettv);
|
||||
#endif
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
static void f_ch_canread(typval_T *argvars, typval_T *rettv);
|
||||
static void f_ch_close(typval_T *argvars, typval_T *rettv);
|
||||
static void f_ch_close_in(typval_T *argvars, typval_T *rettv);
|
||||
static void f_ch_evalexpr(typval_T *argvars, typval_T *rettv);
|
||||
@@ -470,7 +471,7 @@ static struct fst
|
||||
{"assert_exception", 1, 2, f_assert_exception},
|
||||
{"assert_fails", 1, 2, f_assert_fails},
|
||||
{"assert_false", 1, 2, f_assert_false},
|
||||
{"assert_inrange", 2, 3, f_assert_inrange},
|
||||
{"assert_inrange", 3, 4, f_assert_inrange},
|
||||
{"assert_match", 2, 3, f_assert_match},
|
||||
{"assert_notequal", 2, 3, f_assert_notequal},
|
||||
{"assert_notmatch", 2, 3, f_assert_notmatch},
|
||||
@@ -499,6 +500,7 @@ static struct fst
|
||||
{"ceil", 1, 1, f_ceil},
|
||||
#endif
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
{"ch_canread", 1, 1, f_ch_canread},
|
||||
{"ch_close", 1, 1, f_ch_close},
|
||||
{"ch_close_in", 1, 1, f_ch_close_in},
|
||||
{"ch_evalexpr", 2, 3, f_ch_evalexpr},
|
||||
@@ -1778,6 +1780,21 @@ f_ceil(typval_T *argvars, typval_T *rettv)
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
/*
|
||||
* "ch_canread()" function
|
||||
*/
|
||||
static void
|
||||
f_ch_canread(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
channel_T *channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
|
||||
rettv->vval.v_number = 0;
|
||||
if (channel != NULL)
|
||||
rettv->vval.v_number = channel_has_readahead(channel, PART_SOCK)
|
||||
|| channel_has_readahead(channel, PART_OUT)
|
||||
|| channel_has_readahead(channel, PART_ERR);
|
||||
}
|
||||
|
||||
/*
|
||||
* "ch_close()" function
|
||||
*/
|
||||
@@ -5978,6 +5995,10 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
else if (STRICMP(name, "vim_starting") == 0)
|
||||
n = (starting != 0);
|
||||
else if (STRICMP(name, "ttyin") == 0)
|
||||
n = mch_input_isatty();
|
||||
else if (STRICMP(name, "ttyout") == 0)
|
||||
n = stdout_isatty;
|
||||
#ifdef FEAT_MBYTE
|
||||
else if (STRICMP(name, "multi_byte_encoding") == 0)
|
||||
n = has_mbyte;
|
||||
|
||||
+2
-1
@@ -3967,7 +3967,8 @@ do_ecmd(
|
||||
* <VN> We could instead free the synblock
|
||||
* and re-attach to buffer, perhaps.
|
||||
*/
|
||||
if (curwin->w_s == &(curwin->w_buffer->b_s))
|
||||
if (curwin->w_buffer != NULL
|
||||
&& curwin->w_s == &(curwin->w_buffer->b_s))
|
||||
curwin->w_s = &(buf->b_s);
|
||||
#endif
|
||||
curwin->w_buffer = buf;
|
||||
|
||||
+32
-14
@@ -137,7 +137,7 @@ static int getargopt(exarg_T *eap);
|
||||
#endif
|
||||
|
||||
static int check_more(int, int);
|
||||
static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int to_other_file);
|
||||
static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int to_other_file, int address_count);
|
||||
static void get_flags(exarg_T *eap);
|
||||
#if !defined(FEAT_PERL) \
|
||||
|| !defined(FEAT_PYTHON) || !defined(FEAT_PYTHON3) \
|
||||
@@ -794,8 +794,13 @@ do_cmdline(
|
||||
#endif
|
||||
|
||||
/* It's possible to create an endless loop with ":execute", catch that
|
||||
* here. The value of 200 allows nested function calls, ":source", etc. */
|
||||
if (call_depth == 200)
|
||||
* here. The value of 200 allows nested function calls, ":source", etc.
|
||||
* Allow 200 or 'maxfuncdepth', whatever is larger. */
|
||||
if (call_depth >= 200
|
||||
#ifdef FEAT_EVAL
|
||||
&& call_depth >= p_mfd
|
||||
#endif
|
||||
)
|
||||
{
|
||||
EMSG(_("E169: Command too recursive"));
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -1798,6 +1803,7 @@ do_one_cmd(
|
||||
cmdmod_T save_cmdmod;
|
||||
int ni; /* set when Not Implemented */
|
||||
char_u *cmd;
|
||||
int address_count = 1;
|
||||
|
||||
vim_memset(&ea, 0, sizeof(ea));
|
||||
ea.line1 = 1;
|
||||
@@ -2022,7 +2028,7 @@ do_one_cmd(
|
||||
{
|
||||
#ifdef FEAT_WINDOWS
|
||||
long tabnr = get_address(&ea, &ea.cmd, ADDR_TABS,
|
||||
ea.skip, FALSE);
|
||||
ea.skip, FALSE, 1);
|
||||
if (tabnr == MAXLNUM)
|
||||
cmdmod.tab = tabpage_index(curtab) + 1;
|
||||
else
|
||||
@@ -2182,7 +2188,7 @@ do_one_cmd(
|
||||
}
|
||||
ea.cmd = skipwhite(ea.cmd);
|
||||
lnum = get_address(&ea, &ea.cmd, ea.addr_type, ea.skip,
|
||||
ea.addr_count == 0);
|
||||
ea.addr_count == 0, address_count++);
|
||||
if (ea.cmd == NULL) /* error detected */
|
||||
goto doend;
|
||||
if (lnum == MAXLNUM)
|
||||
@@ -2284,7 +2290,11 @@ do_one_cmd(
|
||||
if (*ea.cmd == ';')
|
||||
{
|
||||
if (!ea.skip)
|
||||
{
|
||||
curwin->w_cursor.lnum = ea.line2;
|
||||
/* don't leave the cursor on an illegal line */
|
||||
check_cursor_lnum();
|
||||
}
|
||||
}
|
||||
else if (*ea.cmd != ',')
|
||||
break;
|
||||
@@ -2300,9 +2310,6 @@ do_one_cmd(
|
||||
ea.addr_count = 0;
|
||||
}
|
||||
|
||||
/* Don't leave the cursor on an illegal line (caused by ';') */
|
||||
check_cursor_lnum();
|
||||
|
||||
/*
|
||||
* 5. Parse the command.
|
||||
*/
|
||||
@@ -4379,7 +4386,8 @@ get_address(
|
||||
char_u **ptr,
|
||||
int addr_type, /* flag: one of ADDR_LINES, ... */
|
||||
int skip, /* only skip the address, don't use it */
|
||||
int to_other_file) /* flag: may jump to other file */
|
||||
int to_other_file, /* flag: may jump to other file */
|
||||
int address_count UNUSED) /* 1 for first address, >1 after comma */
|
||||
{
|
||||
int c;
|
||||
int i;
|
||||
@@ -4655,10 +4663,20 @@ get_address(
|
||||
|| addr_type == ADDR_BUFFERS)
|
||||
lnum = compute_buffer_local_count(
|
||||
addr_type, lnum, (i == '-') ? -1 * n : n);
|
||||
else if (i == '-')
|
||||
lnum -= n;
|
||||
else
|
||||
lnum += n;
|
||||
{
|
||||
#ifdef FEAT_FOLDING
|
||||
/* Relative line addressing, need to adjust for folded lines
|
||||
* now, but only do it after the first address. */
|
||||
if (addr_type == ADDR_LINES && (i == '-' || i == '+')
|
||||
&& address_count >= 2)
|
||||
(void)hasFolding(lnum, NULL, &lnum);
|
||||
#endif
|
||||
if (i == '-')
|
||||
lnum -= n;
|
||||
else
|
||||
lnum += n;
|
||||
}
|
||||
}
|
||||
} while (*cmd == '/' || *cmd == '?');
|
||||
|
||||
@@ -7588,7 +7606,7 @@ ex_all(exarg_T *eap)
|
||||
#endif /* FEAT_WINDOWS */
|
||||
|
||||
static void
|
||||
ex_hide(exarg_T *eap)
|
||||
ex_hide(exarg_T *eap UNUSED)
|
||||
{
|
||||
/* ":hide" or ":hide | cmd": hide current window */
|
||||
#ifdef FEAT_WINDOWS
|
||||
@@ -9319,7 +9337,7 @@ ex_copymove(exarg_T *eap)
|
||||
{
|
||||
long n;
|
||||
|
||||
n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE);
|
||||
n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE, 1);
|
||||
if (eap->arg == NULL) /* error detected */
|
||||
{
|
||||
eap->nextcmd = NULL;
|
||||
|
||||
@@ -643,6 +643,8 @@ EXTERN int exiting INIT(= FALSE);
|
||||
EXTERN int really_exiting INIT(= FALSE);
|
||||
/* TRUE when we are sure to exit, e.g., after
|
||||
* a deadly signal */
|
||||
EXTERN int stdout_isatty INIT(= TRUE); /* is stdout a terminal? */
|
||||
|
||||
#if defined(FEAT_AUTOCHDIR)
|
||||
EXTERN int test_autochdir INIT(= FALSE);
|
||||
#endif
|
||||
|
||||
+10
-2
@@ -3102,7 +3102,7 @@ drawarea_configure_event_cb(GtkWidget *widget,
|
||||
g_return_val_if_fail(event
|
||||
&& event->width >= 1 && event->height >= 1, TRUE);
|
||||
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
# if GTK_CHECK_VERSION(3,22,2) && !GTK_CHECK_VERSION(3,22,4)
|
||||
/* As of 3.22.2, GdkWindows have started distributing configure events to
|
||||
* their "native" children (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=12579fe71b3b8f79eb9c1b80e429443bcc437dd0).
|
||||
*
|
||||
@@ -3123,6 +3123,10 @@ drawarea_configure_event_cb(GtkWidget *widget,
|
||||
* implementation details. Therefore, watch out any relevant internal
|
||||
* changes happening in GTK in the feature (sigh).
|
||||
*/
|
||||
/* Follow-up
|
||||
* After a few weeks later, the GdkWindow change mentioned above was
|
||||
* reverted (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=f70039cb9603a02d2369fec4038abf40a1711155).
|
||||
* The corresponding official release is 3.22.4. */
|
||||
if (event->send_event == FALSE)
|
||||
return TRUE;
|
||||
# endif
|
||||
@@ -4492,7 +4496,7 @@ form_configure_event(GtkWidget *widget UNUSED,
|
||||
{
|
||||
int usable_height = event->height;
|
||||
|
||||
#if GTK_CHECK_VERSION(3,22,2)
|
||||
#if GTK_CHECK_VERSION(3,22,2) && !GTK_CHECK_VERSION(3,22,4)
|
||||
/* As of 3.22.2, GdkWindows have started distributing configure events to
|
||||
* their "native" children (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=12579fe71b3b8f79eb9c1b80e429443bcc437dd0).
|
||||
*
|
||||
@@ -4508,6 +4512,10 @@ form_configure_event(GtkWidget *widget UNUSED,
|
||||
* To filter out such fallacious events, check if the given event is the
|
||||
* one that was sent out to the right place. Ignore it if not.
|
||||
*/
|
||||
/* Follow-up
|
||||
* After a few weeks later, the GdkWindow change mentioned above was
|
||||
* reverted (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=f70039cb9603a02d2369fec4038abf40a1711155).
|
||||
* The corresponding official release is 3.22.4. */
|
||||
if (event->window != gtk_widget_get_window(gui.formwin))
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
+39
-27
@@ -2297,19 +2297,24 @@ GetTextWidthEnc(HDC hdc, char_u *str, int len)
|
||||
# define GetTextWidthEnc(h, s, l) GetTextWidth((h), (s), (l))
|
||||
#endif
|
||||
|
||||
static void get_work_area(RECT *spi_rect);
|
||||
|
||||
/*
|
||||
* A quick little routine that will center one window over another, handy for
|
||||
* dialog boxes. Taken from the Win32SDK samples.
|
||||
* dialog boxes. Taken from the Win32SDK samples and modified for multiple
|
||||
* monitors.
|
||||
*/
|
||||
static BOOL
|
||||
CenterWindow(
|
||||
HWND hwndChild,
|
||||
HWND hwndParent)
|
||||
{
|
||||
RECT rChild, rParent;
|
||||
int wChild, hChild, wParent, hParent;
|
||||
int wScreen, hScreen, xNew, yNew;
|
||||
HDC hdc;
|
||||
HMONITOR mon;
|
||||
MONITORINFO moninfo;
|
||||
RECT rChild, rParent, rScreen;
|
||||
int wChild, hChild, wParent, hParent;
|
||||
int xNew, yNew;
|
||||
HDC hdc;
|
||||
|
||||
GetWindowRect(hwndChild, &rChild);
|
||||
wChild = rChild.right - rChild.left;
|
||||
@@ -2317,32 +2322,39 @@ CenterWindow(
|
||||
|
||||
/* If Vim is minimized put the window in the middle of the screen. */
|
||||
if (hwndParent == NULL || IsMinimized(hwndParent))
|
||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &rParent, 0);
|
||||
get_work_area(&rParent);
|
||||
else
|
||||
GetWindowRect(hwndParent, &rParent);
|
||||
wParent = rParent.right - rParent.left;
|
||||
hParent = rParent.bottom - rParent.top;
|
||||
|
||||
hdc = GetDC(hwndChild);
|
||||
wScreen = GetDeviceCaps (hdc, HORZRES);
|
||||
hScreen = GetDeviceCaps (hdc, VERTRES);
|
||||
ReleaseDC(hwndChild, hdc);
|
||||
|
||||
xNew = rParent.left + ((wParent - wChild) /2);
|
||||
if (xNew < 0)
|
||||
moninfo.cbSize = sizeof(MONITORINFO);
|
||||
mon = MonitorFromWindow(hwndChild, MONITOR_DEFAULTTOPRIMARY);
|
||||
if (mon != NULL && GetMonitorInfo(mon, &moninfo))
|
||||
{
|
||||
xNew = 0;
|
||||
rScreen = moninfo.rcWork;
|
||||
}
|
||||
else if ((xNew+wChild) > wScreen)
|
||||
else
|
||||
{
|
||||
xNew = wScreen - wChild;
|
||||
hdc = GetDC(hwndChild);
|
||||
rScreen.left = 0;
|
||||
rScreen.top = 0;
|
||||
rScreen.right = GetDeviceCaps(hdc, HORZRES);
|
||||
rScreen.bottom = GetDeviceCaps(hdc, VERTRES);
|
||||
ReleaseDC(hwndChild, hdc);
|
||||
}
|
||||
|
||||
yNew = rParent.top + ((hParent - hChild) /2);
|
||||
if (yNew < 0)
|
||||
yNew = 0;
|
||||
else if ((yNew+hChild) > hScreen)
|
||||
yNew = hScreen - hChild;
|
||||
xNew = rParent.left + ((wParent - wChild) / 2);
|
||||
if (xNew < rScreen.left)
|
||||
xNew = rScreen.left;
|
||||
else if ((xNew + wChild) > rScreen.right)
|
||||
xNew = rScreen.right - wChild;
|
||||
|
||||
yNew = rParent.top + ((hParent - hChild) / 2);
|
||||
if (yNew < rScreen.top)
|
||||
yNew = rScreen.top;
|
||||
else if ((yNew + hChild) > rScreen.bottom)
|
||||
yNew = rScreen.bottom - hChild;
|
||||
|
||||
return SetWindowPos(hwndChild, NULL, xNew, yNew, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOZORDER);
|
||||
@@ -3539,12 +3551,12 @@ gui_mch_browseW(
|
||||
filterp = convert_filterW(filter);
|
||||
|
||||
vim_memset(&fileStruct, 0, sizeof(OPENFILENAMEW));
|
||||
#ifdef OPENFILENAME_SIZE_VERSION_400W
|
||||
# ifdef OPENFILENAME_SIZE_VERSION_400W
|
||||
/* be compatible with Windows NT 4.0 */
|
||||
fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400W;
|
||||
#else
|
||||
# else
|
||||
fileStruct.lStructSize = sizeof(fileStruct);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
if (title != NULL)
|
||||
titlep = enc_to_utf16(title, NULL);
|
||||
@@ -3581,10 +3593,10 @@ gui_mch_browseW(
|
||||
* Don't use OFN_OVERWRITEPROMPT, Vim has its own ":confirm" dialog.
|
||||
*/
|
||||
fileStruct.Flags = (OFN_NOCHANGEDIR | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY);
|
||||
#ifdef FEAT_SHORTCUT
|
||||
# ifdef FEAT_SHORTCUT
|
||||
if (curbuf->b_p_bin)
|
||||
fileStruct.Flags |= OFN_NODEREFERENCELINKS;
|
||||
#endif
|
||||
# endif
|
||||
if (saving)
|
||||
{
|
||||
if (!GetSaveFileNameW(&fileStruct))
|
||||
@@ -5559,7 +5571,7 @@ get_work_area(RECT *spi_rect)
|
||||
MONITORINFO moninfo;
|
||||
|
||||
/* work out which monitor the window is on, and get *it's* work area */
|
||||
mon = MonitorFromWindow(s_hwnd, 1 /*MONITOR_DEFAULTTOPRIMARY*/);
|
||||
mon = MonitorFromWindow(s_hwnd, MONITOR_DEFAULTTOPRIMARY);
|
||||
if (mon != NULL)
|
||||
{
|
||||
moninfo.cbSize = sizeof(MONITORINFO);
|
||||
|
||||
+9
-5
@@ -933,13 +933,17 @@ Python_Init(void)
|
||||
EMSG(_("E263: Sorry, this command is disabled, the Python library could not be loaded."));
|
||||
goto fail;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PYTHON_HOME
|
||||
# ifdef DYNAMIC_PYTHON
|
||||
if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
|
||||
# endif
|
||||
if (p_pyhome && *p_pyhome != '\0')
|
||||
Py_SetPythonHome((char *)p_pyhome);
|
||||
# ifdef PYTHON_HOME
|
||||
else if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
|
||||
Py_SetPythonHome(PYTHON_HOME);
|
||||
# endif
|
||||
#else
|
||||
# ifdef PYTHON_HOME
|
||||
Py_SetPythonHome(PYTHON_HOME);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
init_structs();
|
||||
|
||||
+19
-5
@@ -860,12 +860,26 @@ Python3_Init(void)
|
||||
|
||||
init_structs();
|
||||
|
||||
|
||||
#ifdef PYTHON3_HOME
|
||||
# ifdef DYNAMIC_PYTHON3
|
||||
if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
|
||||
# endif
|
||||
#ifdef DYNAMIC_PYTHON3
|
||||
if (*p_py3home != '\0')
|
||||
{
|
||||
int len;
|
||||
wchar_t *buf;
|
||||
len = mbstowcs(NULL, (char *)p_py3home, 0) + 1;
|
||||
buf = (wchar_t *)alloc(len * sizeof(wchar_t));
|
||||
if (buf && mbstowcs(buf, (char *)p_py3home, len) != (size_t)-1) {
|
||||
Py_SetPythonHome(buf);
|
||||
/* We must keep buf for Py_SetPythonHome */
|
||||
}
|
||||
}
|
||||
# ifdef PYTHON3_HOME
|
||||
else if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
|
||||
Py_SetPythonHome(PYTHON3_HOME);
|
||||
# endif
|
||||
#else
|
||||
# ifdef PYTHON3_HOME
|
||||
Py_SetPythonHome(PYTHON3_HOME);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
PyImport_AppendInittab("vim", Py3Init_vim);
|
||||
|
||||
+10
-4
@@ -1036,7 +1036,7 @@ common_init(mparm_T *paramp)
|
||||
* (needed for :! to * work). mch_check_win() will also handle the -d or
|
||||
* -dev argument.
|
||||
*/
|
||||
paramp->stdout_isatty = (mch_check_win(paramp->argc, paramp->argv) != FAIL);
|
||||
stdout_isatty = (mch_check_win(paramp->argc, paramp->argv) != FAIL);
|
||||
TIME_MSG("window checked");
|
||||
|
||||
/*
|
||||
@@ -1906,6 +1906,7 @@ command_line_scan(mparm_T *parmp)
|
||||
/* "--literal" take files literally */
|
||||
/* "--nofork" don't fork */
|
||||
/* "--not-a-term" don't warn for not a term */
|
||||
/* "--ttyfail" exit if not a term */
|
||||
/* "--noplugin[s]" skip plugins */
|
||||
/* "--cmd <cmd>" execute cmd before vimrc */
|
||||
if (STRICMP(argv[0] + argv_idx, "help") == 0)
|
||||
@@ -1935,6 +1936,8 @@ command_line_scan(mparm_T *parmp)
|
||||
p_lpl = FALSE;
|
||||
else if (STRNICMP(argv[0] + argv_idx, "not-a-term", 10) == 0)
|
||||
parmp->not_a_term = TRUE;
|
||||
else if (STRNICMP(argv[0] + argv_idx, "ttyfail", 7) == 0)
|
||||
parmp->tty_fail = TRUE;
|
||||
else if (STRNICMP(argv[0] + argv_idx, "cmd", 3) == 0)
|
||||
{
|
||||
want_argument = TRUE;
|
||||
@@ -2573,7 +2576,7 @@ check_tty(mparm_T *parmp)
|
||||
if (!input_isatty)
|
||||
silent_mode = TRUE;
|
||||
}
|
||||
else if (parmp->want_full_screen && (!parmp->stdout_isatty || !input_isatty)
|
||||
else if (parmp->want_full_screen && (!stdout_isatty || !input_isatty)
|
||||
#ifdef FEAT_GUI
|
||||
/* don't want the delay when started from the desktop */
|
||||
&& !gui.starting
|
||||
@@ -2588,7 +2591,7 @@ check_tty(mparm_T *parmp)
|
||||
* input buffer so fast I can't even kill the process in under 2
|
||||
* minutes (and it beeps continuously the whole time :-)
|
||||
*/
|
||||
if (netbeans_active() && (!parmp->stdout_isatty || !input_isatty))
|
||||
if (netbeans_active() && (!stdout_isatty || !input_isatty))
|
||||
{
|
||||
mch_errmsg(_("Vim: Error: Failure to start gvim from NetBeans\n"));
|
||||
exit(1);
|
||||
@@ -2601,11 +2604,13 @@ check_tty(mparm_T *parmp)
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
if (!parmp->stdout_isatty)
|
||||
if (!stdout_isatty)
|
||||
mch_errmsg(_("Vim: Warning: Output is not to a terminal\n"));
|
||||
if (!input_isatty)
|
||||
mch_errmsg(_("Vim: Warning: Input is not from a terminal\n"));
|
||||
out_flush();
|
||||
if (parmp->tty_fail && (!stdout_isatty || !input_isatty))
|
||||
exit(1);
|
||||
if (scriptin[0] == NULL)
|
||||
ui_delay(2000L, TRUE);
|
||||
TIME_MSG("Warning delay");
|
||||
@@ -3371,6 +3376,7 @@ usage(void)
|
||||
#endif
|
||||
main_msg(_("-T <terminal>\tSet terminal type to <terminal>"));
|
||||
main_msg(_("--not-a-term\t\tSkip warning for input/output not being a terminal"));
|
||||
main_msg(_("--ttyfail\t\tExit if input or output is not a terminal"));
|
||||
main_msg(_("-u <vimrc>\t\tUse <vimrc> instead of any .vimrc"));
|
||||
#ifdef FEAT_GUI
|
||||
main_msg(_("-U <gvimrc>\t\tUse <gvimrc> instead of any .gvimrc"));
|
||||
|
||||
+1
-1
@@ -5807,7 +5807,7 @@ static char e_xim[] = N_("E285: Failed to create input context");
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_GUI_X11) || defined(PROTO)
|
||||
# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(sun)
|
||||
# if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(SUN_SYSTEM)
|
||||
# define USE_X11R6_XIM
|
||||
# endif
|
||||
|
||||
|
||||
+24
-1
@@ -42,6 +42,9 @@ static int confirm_msg_used = FALSE; /* displaying confirm_msg */
|
||||
static char_u *confirm_msg = NULL; /* ":confirm" message */
|
||||
static char_u *confirm_msg_tail; /* tail of confirm_msg */
|
||||
#endif
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
static int emsg_to_channel_log = FALSE;
|
||||
#endif
|
||||
|
||||
struct msg_hist
|
||||
{
|
||||
@@ -166,6 +169,14 @@ msg_attr_keep(
|
||||
&& STRCMP(s, last_msg_hist->msg)))
|
||||
add_msg_hist(s, -1, attr);
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
if (emsg_to_channel_log)
|
||||
{
|
||||
/* Write message in the channel log. */
|
||||
ch_logs(NULL, "ERROR: %s", (char *)s);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* When displaying keep_msg, don't let msg_start() free it, caller must do
|
||||
* that. */
|
||||
if (s == keep_msg)
|
||||
@@ -556,6 +567,7 @@ emsg(char_u *s)
|
||||
{
|
||||
int attr;
|
||||
char_u *p;
|
||||
int r;
|
||||
#ifdef FEAT_EVAL
|
||||
int ignore = FALSE;
|
||||
int severe;
|
||||
@@ -624,6 +636,9 @@ emsg(char_u *s)
|
||||
}
|
||||
redir_write(s, -1);
|
||||
}
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
ch_logs(NULL, "ERROR: %s", (char *)s);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -650,6 +665,9 @@ emsg(char_u *s)
|
||||
* and a redraw is expected because
|
||||
* msg_scrolled is non-zero */
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
emsg_to_channel_log = TRUE;
|
||||
#endif
|
||||
/*
|
||||
* Display name and line number for the source of the error.
|
||||
*/
|
||||
@@ -659,7 +677,12 @@ emsg(char_u *s)
|
||||
* Display the error message itself.
|
||||
*/
|
||||
msg_nowait = FALSE; /* wait for this msg */
|
||||
return msg_attr(s, attr);
|
||||
r = msg_attr(s, attr);
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
emsg_to_channel_log = FALSE;
|
||||
#endif
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+30
-21
@@ -1740,27 +1740,6 @@ vim_memset(void *ptr, int c, size_t size)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VIM_MEMCMP
|
||||
/*
|
||||
* Return zero when "b1" and "b2" are the same for "len" bytes.
|
||||
* Return non-zero otherwise.
|
||||
*/
|
||||
int
|
||||
vim_memcmp(void *b1, void *b2, size_t len)
|
||||
{
|
||||
char_u *p1 = (char_u *)b1, *p2 = (char_u *)b2;
|
||||
|
||||
for ( ; len > 0; --len)
|
||||
{
|
||||
if (*p1 != *p2)
|
||||
return 1;
|
||||
++p1;
|
||||
++p2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* skipped when generating prototypes, the prototype is in vim.h */
|
||||
#ifdef VIM_MEMMOVE
|
||||
/*
|
||||
@@ -6269,3 +6248,33 @@ parse_queued_messages(void)
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef PROTO /* proto is defined in vim.h */
|
||||
# ifdef ELAPSED_TIMEVAL
|
||||
/*
|
||||
* Return time in msec since "start_tv".
|
||||
*/
|
||||
long
|
||||
elapsed(struct timeval *start_tv)
|
||||
{
|
||||
struct timeval now_tv;
|
||||
|
||||
gettimeofday(&now_tv, NULL);
|
||||
return (now_tv.tv_sec - start_tv->tv_sec) * 1000L
|
||||
+ (now_tv.tv_usec - start_tv->tv_usec) / 1000L;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef ELAPSED_TICKCOUNT
|
||||
/*
|
||||
* Return time in msec since "start_tick".
|
||||
*/
|
||||
long
|
||||
elapsed(DWORD start_tick)
|
||||
{
|
||||
DWORD now = GetTickCount();
|
||||
|
||||
return (long)now - (long)start_tick;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -259,11 +259,6 @@ op_shift(oparg_T *oap, int curs_top, int amount)
|
||||
}
|
||||
|
||||
changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
|
||||
#ifdef FEAT_FOLDING
|
||||
/* The cursor line is not in a closed fold */
|
||||
foldOpenCursor();
|
||||
#endif
|
||||
|
||||
if (oap->block_mode)
|
||||
{
|
||||
curwin->w_cursor.lnum = oap->start.lnum;
|
||||
@@ -277,6 +272,12 @@ op_shift(oparg_T *oap, int curs_top, int amount)
|
||||
else
|
||||
--curwin->w_cursor.lnum; /* put cursor on last line, for ":>" */
|
||||
|
||||
#ifdef FEAT_FOLDING
|
||||
/* The cursor line is not in a closed fold */
|
||||
foldOpenCursor();
|
||||
#endif
|
||||
|
||||
|
||||
if (oap->line_count > p_report)
|
||||
{
|
||||
if (oap->op_type == OP_RSHIFT)
|
||||
@@ -3350,6 +3351,8 @@ do_put(
|
||||
*/
|
||||
if (regname == '.')
|
||||
{
|
||||
if (VIsual_active)
|
||||
stuffcharReadbuff(VIsual_mode);
|
||||
(void)stuff_inserted((dir == FORWARD ? (count == -1 ? 'o' : 'a') :
|
||||
(count == -1 ? 'O' : 'i')), count, FALSE);
|
||||
/* Putting the text is done later, so can't really move the cursor to
|
||||
|
||||
+37
-19
@@ -441,8 +441,8 @@ struct vimoption
|
||||
|
||||
/* when option changed, what to display: */
|
||||
#define P_RSTAT 0x1000 /* redraw status lines */
|
||||
#define P_RWIN 0x2000 /* redraw current window */
|
||||
#define P_RBUF 0x4000 /* redraw current buffer */
|
||||
#define P_RWIN 0x2000 /* redraw current window and recompute text */
|
||||
#define P_RBUF 0x4000 /* redraw current buffer and recompute text */
|
||||
#define P_RALL 0x6000 /* redraw all windows */
|
||||
#define P_RCLR 0x7000 /* clear and redraw all */
|
||||
|
||||
@@ -458,10 +458,12 @@ struct vimoption
|
||||
#define P_NFNAME 0x400000L /* only normal file name chars allowed */
|
||||
#define P_INSECURE 0x800000L /* option was set from a modeline */
|
||||
#define P_PRI_MKRC 0x1000000L /* priority for :mkvimrc (setting option has
|
||||
side effects) */
|
||||
side effects) */
|
||||
#define P_NO_ML 0x2000000L /* not allowed in modeline */
|
||||
#define P_CURSWANT 0x4000000L /* update curswant required; not needed when
|
||||
* there is a redraw flag */
|
||||
#define P_NDNAME 0x8000000L /* only normal dir name chars allowed */
|
||||
#define P_RWINONLY 0x10000000L /* only redraw current window */
|
||||
|
||||
#define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
|
||||
|
||||
@@ -978,7 +980,7 @@ static struct vimoption options[] =
|
||||
(char_u *)NULL, PV_NONE,
|
||||
#endif
|
||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWIN,
|
||||
{"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWINONLY,
|
||||
#ifdef FEAT_SYN_HL
|
||||
(char_u *)VAR_WIN, PV_CUL,
|
||||
#else
|
||||
@@ -1004,7 +1006,7 @@ static struct vimoption options[] =
|
||||
(char_u *)NULL, PV_NONE,
|
||||
#endif
|
||||
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP,
|
||||
{"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
(char_u *)&p_dict, PV_DICT,
|
||||
#else
|
||||
@@ -2111,7 +2113,7 @@ static struct vimoption options[] =
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
#endif
|
||||
SCRIPTID_INIT},
|
||||
{"printexpr", "pexpr", P_STRING|P_VI_DEF,
|
||||
{"printexpr", "pexpr", P_STRING|P_VI_DEF|P_SECURE,
|
||||
#ifdef FEAT_POSTSCRIPT
|
||||
(char_u *)&p_pexpr, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L}
|
||||
@@ -2186,12 +2188,20 @@ static struct vimoption options[] =
|
||||
(char_u *)&p_py3dll, PV_NONE,
|
||||
{(char_u *)DYNAMIC_PYTHON3_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
{"pythonthreehome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_py3home, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
#if defined(DYNAMIC_PYTHON)
|
||||
{"pythondll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_pydll, PV_NONE,
|
||||
{(char_u *)DYNAMIC_PYTHON_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
{"pythonhome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_pyhome, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
{"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF,
|
||||
#ifdef FEAT_TEXTOBJ
|
||||
@@ -2712,7 +2722,7 @@ static struct vimoption options[] =
|
||||
{"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
|
||||
(char_u *)&p_tw, PV_TW,
|
||||
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP,
|
||||
{"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
(char_u *)&p_tsr, PV_TSR,
|
||||
#else
|
||||
@@ -5961,11 +5971,15 @@ did_set_string_option(
|
||||
errmsg = e_secure;
|
||||
}
|
||||
|
||||
/* Check for a "normal" file name in some options. Disallow a path
|
||||
* separator (slash and/or backslash), wildcards and characters that are
|
||||
* often illegal in a file name. */
|
||||
else if ((options[opt_idx].flags & P_NFNAME)
|
||||
&& vim_strpbrk(*varp, (char_u *)"/\\*?[|<>") != NULL)
|
||||
/* Check for a "normal" directory or file name in some options. Disallow a
|
||||
* path separator (slash and/or backslash), wildcards and characters that
|
||||
* are often illegal in a file name. Be more permissive if "secure" is off.
|
||||
*/
|
||||
else if (((options[opt_idx].flags & P_NFNAME)
|
||||
&& vim_strpbrk(*varp, (char_u *)(secure
|
||||
? "/\\*?[|;&<>\r\n" : "/\\*?[<>\r\n")) != NULL)
|
||||
|| ((options[opt_idx].flags & P_NDNAME)
|
||||
&& vim_strpbrk(*varp, (char_u *)"*?[|;&<>\r\n") != NULL))
|
||||
{
|
||||
errmsg = e_invarg;
|
||||
}
|
||||
@@ -7111,6 +7125,7 @@ did_set_string_option(
|
||||
|
||||
|
||||
#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32)
|
||||
/* 'toolbar' */
|
||||
else if (varp == &p_toolbar)
|
||||
{
|
||||
if (opt_strings_flags(p_toolbar, p_toolbar_values,
|
||||
@@ -7335,6 +7350,7 @@ did_set_string_option(
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_RENDER_OPTIONS)
|
||||
/* 'renderoptions' */
|
||||
else if (varp == &p_rop && gui.in_use)
|
||||
{
|
||||
if (!gui_mch_set_rendering_options(p_rop))
|
||||
@@ -7362,19 +7378,19 @@ did_set_string_option(
|
||||
else
|
||||
{
|
||||
p = NULL;
|
||||
if (varp == &p_ww)
|
||||
if (varp == &p_ww) /* 'whichwrap' */
|
||||
p = (char_u *)WW_ALL;
|
||||
if (varp == &p_shm)
|
||||
if (varp == &p_shm) /* 'shortmess' */
|
||||
p = (char_u *)SHM_ALL;
|
||||
else if (varp == &(p_cpo))
|
||||
else if (varp == &(p_cpo)) /* 'cpoptions' */
|
||||
p = (char_u *)CPO_ALL;
|
||||
else if (varp == &(curbuf->b_p_fo))
|
||||
else if (varp == &(curbuf->b_p_fo)) /* 'formatoptions' */
|
||||
p = (char_u *)FO_ALL;
|
||||
#ifdef FEAT_CONCEAL
|
||||
else if (varp == &curwin->w_p_cocu)
|
||||
else if (varp == &curwin->w_p_cocu) /* 'concealcursor' */
|
||||
p = (char_u *)COCU_ALL;
|
||||
#endif
|
||||
else if (varp == &p_mouse)
|
||||
else if (varp == &p_mouse) /* 'mouse' */
|
||||
{
|
||||
#ifdef FEAT_MOUSE
|
||||
p = (char_u *)MOUSE_ALL;
|
||||
@@ -7384,7 +7400,7 @@ did_set_string_option(
|
||||
#endif
|
||||
}
|
||||
#if defined(FEAT_GUI)
|
||||
else if (varp == &p_go)
|
||||
else if (varp == &p_go) /* 'guioptions' */
|
||||
p = (char_u *)GO_ALL;
|
||||
#endif
|
||||
if (p != NULL)
|
||||
@@ -9223,6 +9239,8 @@ check_redraw(long_u flags)
|
||||
changed_window_setting();
|
||||
if (flags & P_RBUF)
|
||||
redraw_curbuf_later(NOT_VALID);
|
||||
if (flags & P_RWINONLY)
|
||||
redraw_later(NOT_VALID);
|
||||
if (doclear)
|
||||
redraw_all_later(CLEAR);
|
||||
else if (all)
|
||||
|
||||
@@ -706,9 +706,11 @@ EXTERN char_u *p_perldll; /* 'perldll' */
|
||||
#endif
|
||||
#if defined(DYNAMIC_PYTHON3)
|
||||
EXTERN char_u *p_py3dll; /* 'pythonthreedll' */
|
||||
EXTERN char_u *p_py3home; /* 'pythonthreehome' */
|
||||
#endif
|
||||
#if defined(DYNAMIC_PYTHON)
|
||||
EXTERN char_u *p_pydll; /* 'pythondll' */
|
||||
EXTERN char_u *p_pyhome; /* 'pythonhome' */
|
||||
#endif
|
||||
#ifdef FEAT_RELTIME
|
||||
EXTERN long p_rdt; /* 'redrawtime' */
|
||||
|
||||
+4
-2
@@ -40,7 +40,7 @@
|
||||
# include <dlgs.h>
|
||||
# include <winspool.h>
|
||||
# include <commdlg.h>
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif /* PROTO */
|
||||
|
||||
@@ -1619,7 +1619,9 @@ mch_print_init(prt_settings_T *psettings, char_u *jobname, int forceit)
|
||||
|
||||
if (psettings->n_uncollated_copies == 0)
|
||||
psettings->n_uncollated_copies = 1;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
psettings->n_collated_copies = 1;
|
||||
psettings->n_uncollated_copies = 1;
|
||||
}
|
||||
|
||||
+30
-44
@@ -376,21 +376,6 @@ mch_write(char_u *s, int len)
|
||||
RealWaitForChar(read_cmd_fd, p_wd, NULL, NULL);
|
||||
}
|
||||
|
||||
#if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
/*
|
||||
* Return time in msec since "start_tv".
|
||||
*/
|
||||
static long
|
||||
elapsed(struct timeval *start_tv)
|
||||
{
|
||||
struct timeval now_tv;
|
||||
|
||||
gettimeofday(&now_tv, NULL);
|
||||
return (now_tv.tv_sec - start_tv->tv_sec) * 1000L
|
||||
+ (now_tv.tv_usec - start_tv->tv_usec) / 1000L;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* mch_inchar(): low level input function.
|
||||
* Get a characters from the keyboard.
|
||||
@@ -411,10 +396,10 @@ mch_inchar(
|
||||
int did_start_blocking = FALSE;
|
||||
long wait_time;
|
||||
long elapsed_time = 0;
|
||||
#if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
struct timeval start_tv;
|
||||
#ifdef ELAPSED_FUNC
|
||||
ELAPSED_TYPE start_tv;
|
||||
|
||||
gettimeofday(&start_tv, NULL);
|
||||
ELAPSED_INIT(start_tv);
|
||||
#endif
|
||||
|
||||
/* repeat until we got a character or waited long enough */
|
||||
@@ -438,8 +423,8 @@ mch_inchar(
|
||||
else
|
||||
/* going to block after p_ut */
|
||||
wait_time = p_ut;
|
||||
#if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
elapsed_time = elapsed(&start_tv);
|
||||
#ifdef ELAPSED_FUNC
|
||||
elapsed_time = ELAPSED_FUNC(start_tv);
|
||||
#endif
|
||||
wait_time -= elapsed_time;
|
||||
if (wait_time < 0)
|
||||
@@ -477,6 +462,10 @@ mch_inchar(
|
||||
/* Checking if a job ended requires polling. Do this every 100 msec. */
|
||||
if (has_pending_job() && (wait_time < 0 || wait_time > 100L))
|
||||
wait_time = 100L;
|
||||
/* If there is readahead then parse_queued_messages() timed out and we
|
||||
* should call it again soon. */
|
||||
if ((wait_time < 0 || wait_time > 100L) && channel_any_readahead())
|
||||
wait_time = 10L;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -1554,18 +1543,16 @@ mch_input_isatty(void)
|
||||
|
||||
#ifdef FEAT_X11
|
||||
|
||||
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) \
|
||||
# if defined(ELAPSED_TIMEVAL) \
|
||||
&& (defined(FEAT_XCLIPBOARD) || defined(FEAT_TITLE))
|
||||
|
||||
static void xopen_message(struct timeval *start_tv);
|
||||
|
||||
/*
|
||||
* Give a message about the elapsed time for opening the X window.
|
||||
*/
|
||||
static void
|
||||
xopen_message(struct timeval *start_tv)
|
||||
xopen_message(long elapsed_msec)
|
||||
{
|
||||
smsg((char_u *)_("Opening the X display took %ld msec"), elapsed(start_tv));
|
||||
smsg((char_u *)_("Opening the X display took %ld msec"), elapsed_msec);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
@@ -1864,11 +1851,11 @@ get_x11_windis(void)
|
||||
#endif
|
||||
if (x11_display != NULL)
|
||||
{
|
||||
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
# ifdef ELAPSED_FUNC
|
||||
if (p_verbose > 0)
|
||||
{
|
||||
verbose_enter();
|
||||
xopen_message(&start_tv);
|
||||
xopen_message(ELAPSED_FUNC(start_tv));
|
||||
verbose_leave();
|
||||
}
|
||||
# endif
|
||||
@@ -4648,8 +4635,8 @@ mch_call_shell(
|
||||
ga_init2(&ga, 1, BUFLEN);
|
||||
|
||||
noread_cnt = 0;
|
||||
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
gettimeofday(&start_tv, NULL);
|
||||
# ifdef ELAPSED_FUNC
|
||||
ELAPSED_INIT(start_tv);
|
||||
# endif
|
||||
for (;;)
|
||||
{
|
||||
@@ -4684,8 +4671,8 @@ mch_call_shell(
|
||||
/* Get extra characters when we don't have any.
|
||||
* Reset the counter and timer. */
|
||||
noread_cnt = 0;
|
||||
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
gettimeofday(&start_tv, NULL);
|
||||
# ifdef ELAPSED_FUNC
|
||||
ELAPSED_INIT(start_tv);
|
||||
# endif
|
||||
len = ui_inchar(ta_buf, BUFLEN, 10L, 0);
|
||||
}
|
||||
@@ -4908,10 +4895,10 @@ mch_call_shell(
|
||||
if (got_int)
|
||||
break;
|
||||
|
||||
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
# ifdef ELAPSED_FUNC
|
||||
if (wait_pid == 0)
|
||||
{
|
||||
long msec = elapsed(&start_tv);
|
||||
long msec = ELAPSED_FUNC(start_tv);
|
||||
|
||||
/* Avoid that we keep looping here without
|
||||
* checking for a CTRL-C for a long time. Don't
|
||||
@@ -5654,15 +5641,14 @@ RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED, int *interrupted)
|
||||
/* May retry getting characters after an event was handled. */
|
||||
# define MAY_LOOP
|
||||
|
||||
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
# ifdef ELAPSED_FUNC
|
||||
/* Remember at what time we started, so that we know how much longer we
|
||||
* should wait after being interrupted. */
|
||||
# define USE_START_TV
|
||||
long start_msec = msec;
|
||||
struct timeval start_tv;
|
||||
ELAPSED_TYPE start_tv;
|
||||
|
||||
if (msec > 0)
|
||||
gettimeofday(&start_tv, NULL);
|
||||
ELAPSED_INIT(start_tv);
|
||||
# endif
|
||||
|
||||
/* Handle being called recursively. This may happen for the session
|
||||
@@ -5969,9 +5955,9 @@ select_eintr:
|
||||
/* We're going to loop around again, find out for how long */
|
||||
if (msec > 0)
|
||||
{
|
||||
# ifdef USE_START_TV
|
||||
# ifdef ELAPSED_FUNC
|
||||
/* Compute remaining wait time. */
|
||||
msec = start_msec - elapsed(&start_tv);
|
||||
msec = start_msec - ELAPSED_FUNC(start_tv);
|
||||
# else
|
||||
/* Guess we got interrupted halfway. */
|
||||
msec = msec / 2;
|
||||
@@ -7068,11 +7054,11 @@ setup_term_clip(void)
|
||||
#if defined(HAVE_SETJMP_H)
|
||||
int (*oldIOhandler)();
|
||||
#endif
|
||||
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
struct timeval start_tv;
|
||||
# ifdef ELAPSED_FUNC
|
||||
ELAPSED_TYPE start_tv;
|
||||
|
||||
if (p_verbose > 0)
|
||||
gettimeofday(&start_tv, NULL);
|
||||
ELAPSED_INIT(start_tv);
|
||||
# endif
|
||||
|
||||
/* Ignore X errors while opening the display */
|
||||
@@ -7114,11 +7100,11 @@ setup_term_clip(void)
|
||||
/* Catch terminating error of the X server connection. */
|
||||
(void)XSetIOErrorHandler(x_IOerror_handler);
|
||||
|
||||
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
# ifdef ELAPSED_FUNC
|
||||
if (p_verbose > 0)
|
||||
{
|
||||
verbose_enter();
|
||||
xopen_message(&start_tv);
|
||||
xopen_message(ELAPSED_FUNC(start_tv));
|
||||
verbose_leave();
|
||||
}
|
||||
# endif
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
# define signal sigset
|
||||
#endif
|
||||
|
||||
/* sun's sys/ioctl.h redefines symbols from termio world */
|
||||
#if defined(HAVE_SYS_IOCTL_H) && !defined(sun)
|
||||
/* Sun's sys/ioctl.h redefines symbols from termio world */
|
||||
#if defined(HAVE_SYS_IOCTL_H) && !defined(SUN_SYSTEM)
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
#define HAVE_STRTOL
|
||||
#define HAVE_TGETENT
|
||||
#define HAVE_MEMSET
|
||||
#define HAVE_MEMCMP
|
||||
#define HAVE_STRERROR
|
||||
#define HAVE_FCHOWN
|
||||
#define HAVE_RENAME
|
||||
|
||||
+7
-4
@@ -1351,9 +1351,15 @@ WaitForChar(long msec)
|
||||
DWORD dwWaitTime = dwEndTime - dwNow;
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
/* Check channel while waiting input. */
|
||||
/* Check channel while waiting for input. */
|
||||
if (dwWaitTime > 100)
|
||||
{
|
||||
dwWaitTime = 100;
|
||||
/* If there is readahead then parse_queued_messages() timed out
|
||||
* and we should call it again soon. */
|
||||
if (channel_any_readahead())
|
||||
dwWaitTime = 10;
|
||||
}
|
||||
#endif
|
||||
#ifdef FEAT_MZSCHEME
|
||||
if (mzthreads_allowed() && p_mzq > 0
|
||||
@@ -4287,9 +4293,6 @@ mch_system_piped(char *cmd, int options)
|
||||
/* Get extra characters when we don't have any. Reset the
|
||||
* counter and timer. */
|
||||
noread_cnt = 0;
|
||||
# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
|
||||
gettimeofday(&start_tv, NULL);
|
||||
# endif
|
||||
len = ui_inchar(ta_buf, BUFLEN, 10L, 0);
|
||||
}
|
||||
if (ta_len > 0 || len > 0)
|
||||
|
||||
@@ -50,12 +50,7 @@ extern int poll(struct pollfd *, long, int);
|
||||
#ifdef HAVE_MEMSET
|
||||
extern void *memset(void *, int, size_t);
|
||||
#endif
|
||||
#ifdef HAVE_BCMP
|
||||
extern int bcmp(void *, void *, size_t);
|
||||
#endif
|
||||
#ifdef HAVE_MEMCMP
|
||||
extern int memcmp(const void *, const void *, size_t);
|
||||
#endif
|
||||
#ifdef HAVE_STRPBRK
|
||||
extern char *strpbrk(const char *, const char *);
|
||||
#endif
|
||||
|
||||
+2
-1
@@ -105,7 +105,8 @@ redo:
|
||||
|
||||
/* Put the pum below "row" if possible. If there are few lines decide on
|
||||
* where there is more room. */
|
||||
if (row - above_row >= below_row - row)
|
||||
if (row + 2 >= below_row - pum_height
|
||||
&& row - above_row > (below_row - above_row) / 2)
|
||||
{
|
||||
/* pum above "row" */
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ void channel_consume(channel_T *channel, ch_part_T part, int len);
|
||||
int channel_collapse(channel_T *channel, ch_part_T part, int want_nl);
|
||||
int channel_can_write_to(channel_T *channel);
|
||||
int channel_is_open(channel_T *channel);
|
||||
int channel_has_readahead(channel_T *channel, ch_part_T part);
|
||||
char *channel_status(channel_T *channel, int req_part);
|
||||
void channel_info(channel_T *channel, dict_T *dict);
|
||||
void channel_close(channel_T *channel, int invoke_close_cb);
|
||||
@@ -32,7 +33,6 @@ void channel_close_in(channel_T *channel);
|
||||
void channel_clear(channel_T *channel);
|
||||
void channel_free_all(void);
|
||||
char_u *channel_read_block(channel_T *channel, ch_part_T part, int timeout);
|
||||
int channel_read_json_block(channel_T *channel, ch_part_T part, int timeout_arg, int id, typval_T **rettv);
|
||||
void common_channel_read(typval_T *argvars, typval_T *rettv, int raw);
|
||||
channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
|
||||
void channel_handle_events(void);
|
||||
@@ -44,6 +44,7 @@ int channel_poll_check(int ret_in, void *fds_in);
|
||||
int channel_select_setup(int maxfd_in, void *rfds_in, void *wfds_in);
|
||||
int channel_select_check(int ret_in, void *rfds_in, void *wfds_in);
|
||||
int channel_parse_messages(void);
|
||||
int channel_any_readahead(void);
|
||||
int set_ref_in_channel(int copyID);
|
||||
ch_part_T channel_part_send(channel_T *channel);
|
||||
ch_part_T channel_part_read(channel_T *channel);
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#ifdef sinix
|
||||
#undef buf_T
|
||||
#endif
|
||||
# ifdef sun
|
||||
# ifdef SUN_SYSTEM
|
||||
# include <sys/conf.h>
|
||||
# endif
|
||||
#endif
|
||||
@@ -87,11 +87,11 @@
|
||||
# include <sys/ptem.h>
|
||||
#endif
|
||||
|
||||
#if !defined(sun) && !defined(VMS) && !defined(MACOS)
|
||||
#if !defined(SUN_SYSTEM) && !defined(VMS) && !defined(MACOS)
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
|
||||
#if defined(SUN_SYSTEM) && defined(LOCKPTY) && !defined(TIOCEXCL)
|
||||
# include <sys/ttold.h>
|
||||
#endif
|
||||
|
||||
@@ -166,7 +166,7 @@ SetupSlavePTY(int fd)
|
||||
# endif
|
||||
if (ioctl(fd, I_PUSH, "ldterm") != 0)
|
||||
return -1;
|
||||
# ifdef sun
|
||||
# ifdef SUN_SYSTEM
|
||||
if (ioctl(fd, I_PUSH, "ttcompat") != 0)
|
||||
return -1;
|
||||
# endif
|
||||
@@ -391,7 +391,7 @@ OpenPTY(char **ttyn)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3)
|
||||
#if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3)
|
||||
/* Hack to ensure that the slave side of the pty is
|
||||
* unused. May not work in anything other than SunOS4.1
|
||||
*/
|
||||
|
||||
+13
-7
@@ -3649,13 +3649,19 @@ win_line(
|
||||
draw_state = WL_FOLD;
|
||||
if (fdc > 0)
|
||||
{
|
||||
/* Draw the 'foldcolumn'. */
|
||||
fill_foldcolumn(extra, wp, FALSE, lnum);
|
||||
n_extra = fdc;
|
||||
p_extra = extra;
|
||||
p_extra[n_extra] = NUL;
|
||||
c_extra = NUL;
|
||||
char_attr = hl_attr(HLF_FC);
|
||||
/* Draw the 'foldcolumn'. Allocate a buffer, "extra" may
|
||||
* already be in used. */
|
||||
p_extra_free = alloc(12 + 1);
|
||||
|
||||
if (p_extra_free != NULL)
|
||||
{
|
||||
fill_foldcolumn(p_extra_free, wp, FALSE, lnum);
|
||||
n_extra = fdc;
|
||||
p_extra_free[n_extra] = NUL;
|
||||
p_extra = p_extra_free;
|
||||
c_extra = NUL;
|
||||
char_attr = hl_attr(HLF_FC);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+2
-1
@@ -1704,7 +1704,8 @@ searchc(cmdarg_T *cap, int t_cmd)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vim_memcmp(p + col, lastc_bytes, lastc_bytelen) == 0 && stop)
|
||||
if (memcmp(p + col, lastc_bytes, lastc_bytelen) == 0
|
||||
&& stop)
|
||||
break;
|
||||
}
|
||||
stop = TRUE;
|
||||
|
||||
+4
-1
@@ -1474,6 +1474,7 @@ struct jsonq_S
|
||||
typval_T *jq_value;
|
||||
jsonq_T *jq_next;
|
||||
jsonq_T *jq_prev;
|
||||
int jq_no_callback; /* TRUE when no callback was found */
|
||||
};
|
||||
|
||||
struct cbq_S
|
||||
@@ -1600,6 +1601,7 @@ struct channel_S {
|
||||
partial_T *ch_partial;
|
||||
char_u *ch_close_cb; /* call when channel is closed */
|
||||
partial_T *ch_close_partial;
|
||||
int ch_drop_never;
|
||||
|
||||
job_T *ch_job; /* Job that uses this channel; this does not
|
||||
* count as a reference to avoid a circular
|
||||
@@ -1687,6 +1689,7 @@ typedef struct
|
||||
partial_T *jo_close_partial; /* not referenced! */
|
||||
char_u *jo_exit_cb; /* not allocated! */
|
||||
partial_T *jo_exit_partial; /* not referenced! */
|
||||
int jo_drop_never;
|
||||
int jo_waittime;
|
||||
int jo_timeout;
|
||||
int jo_out_timeout;
|
||||
@@ -3244,8 +3247,8 @@ typedef struct
|
||||
#endif
|
||||
|
||||
int want_full_screen;
|
||||
int stdout_isatty; /* is stdout a terminal? */
|
||||
int not_a_term; /* no warning for missing term? */
|
||||
int tty_fail; /* exit if not a tty */
|
||||
char_u *term; /* specified terminal name */
|
||||
#ifdef FEAT_CRYPT
|
||||
int ask_for_key; /* -x argument */
|
||||
|
||||
@@ -8766,6 +8766,10 @@ hl_combine_attr(int char_attr, int prim_attr)
|
||||
else
|
||||
{
|
||||
vim_memset(&new_en, 0, sizeof(new_en));
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
new_en.ae_u.cterm.bg_rgb = INVALCOLOR;
|
||||
new_en.ae_u.cterm.fg_rgb = INVALCOLOR;
|
||||
#endif
|
||||
if (char_attr <= HL_ALL)
|
||||
new_en.ae_attr = char_attr;
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@ do_tag(
|
||||
/* skip backslash used for escaping a command char or
|
||||
* a backslash */
|
||||
if (*p == '\\' && (*(p + 1) == *tagp.command
|
||||
|| *(p + 1) == '\\'))
|
||||
|| *(p + 1) == '\\'))
|
||||
++p;
|
||||
|
||||
if (*p == TAB)
|
||||
@@ -1356,6 +1356,7 @@ find_tags(
|
||||
char_u *help_lang_find = NULL; /* lang to be found */
|
||||
char_u help_lang[3]; /* lang of current tags file */
|
||||
char_u *saved_pat = NULL; /* copy of pat[] */
|
||||
int is_txt = FALSE; /* flag of file extension */
|
||||
#endif
|
||||
|
||||
pat_T orgpat; /* holds unconverted pattern info */
|
||||
@@ -1388,7 +1389,7 @@ find_tags(
|
||||
*/
|
||||
switch (curbuf->b_tc_flags ? curbuf->b_tc_flags : tc_flags)
|
||||
{
|
||||
case TC_FOLLOWIC: break;
|
||||
case TC_FOLLOWIC: break;
|
||||
case TC_IGNORE: p_ic = TRUE; break;
|
||||
case TC_MATCH: p_ic = FALSE; break;
|
||||
case TC_FOLLOWSCS: p_ic = ignorecase(pat); break;
|
||||
@@ -1476,6 +1477,15 @@ find_tags(
|
||||
* When the tag file is case-fold sorted, it is either one or the other.
|
||||
* Only ignore case when TAG_NOIC not used or 'ignorecase' set.
|
||||
*/
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
/* Set a flag if the file extension is .txt */
|
||||
if ((flags & TAG_KEEP_LANG)
|
||||
&& help_lang_find == NULL
|
||||
&& curbuf->b_fname != NULL
|
||||
&& (i = (int)STRLEN(curbuf->b_fname)) > 4
|
||||
&& STRICMP(curbuf->b_fname + i - 4, ".txt") == 0)
|
||||
is_txt = TRUE;
|
||||
#endif
|
||||
#ifdef FEAT_TAG_BINS
|
||||
orgpat.regmatch.rm_ic = ((p_ic || !noic)
|
||||
&& (findall || orgpat.headlen == 0 || !p_tbs));
|
||||
@@ -1509,14 +1519,19 @@ find_tags(
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
if (curbuf->b_help)
|
||||
{
|
||||
/* Prefer help tags according to 'helplang'. Put the
|
||||
* two-letter language name in help_lang[]. */
|
||||
i = (int)STRLEN(tag_fname);
|
||||
if (i > 3 && tag_fname[i - 3] == '-')
|
||||
STRCPY(help_lang, tag_fname + i - 2);
|
||||
else
|
||||
/* Keep en if the file extension is .txt*/
|
||||
if (is_txt)
|
||||
STRCPY(help_lang, "en");
|
||||
|
||||
else
|
||||
{
|
||||
/* Prefer help tags according to 'helplang'. Put the
|
||||
* two-letter language name in help_lang[]. */
|
||||
i = (int)STRLEN(tag_fname);
|
||||
if (i > 3 && tag_fname[i - 3] == '-')
|
||||
STRCPY(help_lang, tag_fname + i - 2);
|
||||
else
|
||||
STRCPY(help_lang, "en");
|
||||
}
|
||||
/* When searching for a specific language skip tags files
|
||||
* for other languages. */
|
||||
if (help_lang_find != NULL
|
||||
@@ -2400,7 +2415,7 @@ parse_line:
|
||||
mfp2 = ((struct match_found **)
|
||||
(ga_match[mtt].ga_data))[i];
|
||||
if (mfp2->len == mfp->len
|
||||
&& vim_memcmp(mfp2->match, mfp->match,
|
||||
&& memcmp(mfp2->match, mfp->match,
|
||||
(size_t)mfp->len) == 0)
|
||||
break;
|
||||
fast_breakcheck();
|
||||
|
||||
@@ -63,8 +63,6 @@ SCRIPTS_ALL = \
|
||||
test88.out \
|
||||
test90.out \
|
||||
test91.out \
|
||||
test92.out \
|
||||
test93.out \
|
||||
test94.out \
|
||||
test95.out \
|
||||
test98.out \
|
||||
@@ -150,8 +148,10 @@ NEW_TESTS = test_arglist.res \
|
||||
test_cscope.res \
|
||||
test_diffmode.res \
|
||||
test_digraph.res \
|
||||
test_display.res \
|
||||
test_farsi.res \
|
||||
test_fnameescape.res \
|
||||
test_fold.res \
|
||||
test_gf.res \
|
||||
test_gn.res \
|
||||
test_gui.res \
|
||||
@@ -167,6 +167,8 @@ NEW_TESTS = test_arglist.res \
|
||||
test_man.res \
|
||||
test_marks.res \
|
||||
test_matchadd_conceal.res \
|
||||
test_mksession.res \
|
||||
test_mksession_utf8.res \
|
||||
test_nested_function.res \
|
||||
test_netbeans.res \
|
||||
test_normal.res \
|
||||
|
||||
@@ -92,7 +92,7 @@ SCRIPT = test1.out test3.out test4.out test5.out \
|
||||
test72.out test75.out \
|
||||
test77a.out test78.out test79.out test80.out \
|
||||
test82.out test84.out test88.out test89.out \
|
||||
test90.out test91.out test92.out test93.out test94.out \
|
||||
test90.out test91.out test94.out \
|
||||
test95.out test98.out test99.out \
|
||||
test103.out test104.out \
|
||||
test107.out test108.out\
|
||||
|
||||
@@ -88,7 +88,7 @@ func RunServer(cmd, testfunc, args)
|
||||
|
||||
call call(function(a:testfunc), [port])
|
||||
catch
|
||||
call assert_false(1, "Caught exception: " . v:exception)
|
||||
call assert_false(1, 'Caught exception: "' . v:exception . '" in ' . v:throwpoint)
|
||||
finally
|
||||
call s:kill_server(a:cmd)
|
||||
endtry
|
||||
|
||||
@@ -658,10 +658,10 @@ assert sys.stderr.closed()==False:NOT FAILED
|
||||
assert sys.stdout.errors=="strict":NOT FAILED
|
||||
assert sys.stderr.errors=="strict":NOT FAILED
|
||||
assert sys.stdout.encoding==sys.stderr.encoding:NOT FAILED
|
||||
sys.stdout.write(None):(<class 'TypeError'>, TypeError("Can't convert 'NoneType' object to str implicitly",))
|
||||
sys.stdout.write(None):(<class 'TypeError'>, TypeError('argument must be str, bytes or bytearray, not None',))
|
||||
>> OutputWriteLines
|
||||
sys.stdout.writelines(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
|
||||
sys.stdout.writelines([1]):(<class 'TypeError'>, TypeError("Can't convert 'int' object to str implicitly",))
|
||||
sys.stdout.writelines([1]):(<class 'TypeError'>, TypeError('argument must be str, bytes or bytearray, not int',))
|
||||
>>> Testing *Iter* using sys.stdout.writelines(%s)
|
||||
sys.stdout.writelines(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',))
|
||||
sys.stdout.writelines(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',))
|
||||
@@ -700,8 +700,8 @@ vim.foreach_rtp(NoArgsCall()):(<class 'TypeError'>, TypeError('__call__() takes
|
||||
vim.foreach_rtp(FailingCall()):(<class 'NotImplementedError'>, NotImplementedError('call',))
|
||||
vim.foreach_rtp(int, 2):(<class 'TypeError'>, TypeError('foreach_rtp() takes exactly one argument (2 given)',))
|
||||
> import
|
||||
import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
|
||||
import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
|
||||
import xxx_no_such_module_xxx:(<class 'ModuleNotFoundError'>, ModuleNotFoundError("No module named 'xxx_no_such_module_xxx'",))
|
||||
import failing_import:(<class 'ModuleNotFoundError'>, ModuleNotFoundError("No module named 'failing_import'",))
|
||||
import failing:(<class 'NotImplementedError'>, NotImplementedError())
|
||||
> Options
|
||||
>> OptionsItem
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
vim: set ft=vim fenc=utf-8:
|
||||
|
||||
Tests if :mksession saves cursor columns correctly in presence of tab and
|
||||
multibyte characters when fileencoding=utf-8.
|
||||
|
||||
STARTTEST
|
||||
:so mbyte.vim
|
||||
:if !has('mksession')
|
||||
: e! test.ok
|
||||
: wq! test.out
|
||||
:endif
|
||||
:set sessionoptions=buffers splitbelow fileencoding=utf-8
|
||||
/^start:
|
||||
:vsplit
|
||||
j16|:split
|
||||
j16|:split
|
||||
j16|:split
|
||||
j8|:split
|
||||
j8|:split
|
||||
j16|:split
|
||||
j16|:split
|
||||
j16|:wincmd l
|
||||
/^start:
|
||||
:set nowrap
|
||||
j16|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
j08|3zl:split
|
||||
j08|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
:mksession! test.out
|
||||
:new test.out
|
||||
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
|
||||
:w! test.out
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
start:
|
||||
no multibyte chAracter
|
||||
one leaDing tab
|
||||
four leadinG spaces
|
||||
two consecutive tabs
|
||||
two tabs in one line
|
||||
one … multibyteCharacter
|
||||
a “b” two multiByte characters
|
||||
“c”1€ three mulTibyte characters
|
||||
@@ -1,26 +0,0 @@
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 08|
|
||||
normal! 08|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 8 . '|'
|
||||
normal! 08|
|
||||
exe 'normal! ' . s:c . '|zs' . 8 . '|'
|
||||
normal! 08|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
@@ -1,48 +0,0 @@
|
||||
vim: set ft=vim fenc=latin1:
|
||||
|
||||
Tests if :mksession saves cursor columns correctly in presence of tab and
|
||||
multibyte characters when fileencoding=latin1.
|
||||
|
||||
STARTTEST
|
||||
:so mbyte.vim
|
||||
:if !has('mksession')
|
||||
: e! test.ok
|
||||
: wq! test.out
|
||||
:endif
|
||||
:set sessionoptions=buffers splitbelow fileencoding=latin1
|
||||
/^start:
|
||||
:vsplit
|
||||
j16|:split
|
||||
j16|:split
|
||||
j16|:split
|
||||
j8|:split
|
||||
j8|:split
|
||||
j16|:split
|
||||
j16|:split
|
||||
j16|:wincmd l
|
||||
/^start:
|
||||
:set nowrap
|
||||
j16|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
j08|3zl:split
|
||||
j08|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
j016|3zl:split
|
||||
:mksession! test.out
|
||||
:new test.out
|
||||
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
|
||||
:w! test.out
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
start:
|
||||
no multibyte chAracter
|
||||
one leaDing tab
|
||||
four leadinG spaces
|
||||
two consecutive tabs
|
||||
two tabs in one line
|
||||
one ä multibyteCharacter
|
||||
aä Ä two multiByte characters
|
||||
Aäöü three mulTibyte characters
|
||||
@@ -1,26 +0,0 @@
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 08|
|
||||
normal! 08|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 8 . '|'
|
||||
normal! 08|
|
||||
exe 'normal! ' . s:c . '|zs' . 8 . '|'
|
||||
normal! 08|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
exe 'normal! ' . s:c . '|zs' . 16 . '|'
|
||||
normal! 016|
|
||||
@@ -117,6 +117,8 @@ func Test_assert_inrange()
|
||||
call assert_inrange(5, 7, 8)
|
||||
call assert_match("Expected range 5 - 7, but got 8", v:errors[0])
|
||||
call remove(v:errors, 0)
|
||||
|
||||
call assert_fails('call assert_inrange(1, 1)', 'E119:')
|
||||
endfunc
|
||||
|
||||
func Test_user_is_happy()
|
||||
|
||||
@@ -127,7 +127,9 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
|
||||
print("sending: {0}".format(cmd))
|
||||
self.request.sendall(cmd.encode('utf-8'))
|
||||
response = "ok"
|
||||
time.sleep(0.01)
|
||||
# Need to wait for Vim to give up, otherwise it
|
||||
# sometimes fails on OS X.
|
||||
time.sleep(0.2)
|
||||
elif decoded[1] == 'malformed2':
|
||||
cmd = '"unterminated string'
|
||||
print("sending: {0}".format(cmd))
|
||||
|
||||
@@ -26,7 +26,10 @@ func Ch_requestHandler(handle, msg)
|
||||
endfunc
|
||||
|
||||
func Ch_communicate(port)
|
||||
" Avoid dropping messages, since we don't use a callback here.
|
||||
let s:chopt.drop = 'never'
|
||||
let handle = ch_open('localhost:' . a:port, s:chopt)
|
||||
unlet s:chopt.drop
|
||||
if ch_status(handle) == "fail"
|
||||
call assert_false(1, "Can't open channel")
|
||||
return
|
||||
@@ -58,6 +61,9 @@ func Ch_communicate(port)
|
||||
" string with ][ should work
|
||||
call assert_equal('this][that', ch_evalexpr(handle, 'echo this][that'))
|
||||
|
||||
" nothing to read now
|
||||
call assert_equal(0, ch_canread(handle))
|
||||
|
||||
" sending three messages quickly then reading should work
|
||||
for i in range(3)
|
||||
call ch_sendexpr(handle, 'echo hello ' . i)
|
||||
@@ -126,6 +132,9 @@ func Ch_communicate(port)
|
||||
call ch_setoptions(handle, {'mode': 'json'})
|
||||
call assert_fails("call ch_setoptions(handle, {'waittime': 111})", "E475")
|
||||
call ch_setoptions(handle, {'callback': ''})
|
||||
call ch_setoptions(handle, {'drop': 'never'})
|
||||
call ch_setoptions(handle, {'drop': 'auto'})
|
||||
call assert_fails("call ch_setoptions(handle, {'drop': 'bad'})", "E475")
|
||||
|
||||
" Send an eval request that works.
|
||||
call assert_equal('ok', ch_evalexpr(handle, 'eval-works'))
|
||||
@@ -246,6 +255,7 @@ endfunc
|
||||
"""""""""
|
||||
|
||||
func Ch_handler(chan, msg)
|
||||
call ch_log('Ch_handler()')
|
||||
unlet g:Ch_reply
|
||||
let g:Ch_reply = a:msg
|
||||
endfunc
|
||||
@@ -269,6 +279,7 @@ func Ch_channel_handler(port)
|
||||
endfunc
|
||||
|
||||
func Test_channel_handler()
|
||||
call ch_logfile('channellog', 'w')
|
||||
call ch_log('Test_channel_handler()')
|
||||
let g:Ch_reply = ""
|
||||
let s:chopt.callback = 'Ch_handler'
|
||||
@@ -368,7 +379,7 @@ func Ch_raw_one_time_callback(port)
|
||||
endif
|
||||
call ch_setoptions(handle, {'mode': 'raw'})
|
||||
|
||||
" The message are sent raw, we do our own JSON strings here.
|
||||
" The messages are sent raw, we do our own JSON strings here.
|
||||
call ch_sendraw(handle, "[1, \"hello!\"]\n", {'callback': 'Ch_handleRaw1'})
|
||||
call WaitFor('g:Ch_reply1 != ""')
|
||||
call assert_equal("[1, \"got it\"]", g:Ch_reply1)
|
||||
@@ -431,7 +442,10 @@ func Test_raw_pipe()
|
||||
return
|
||||
endif
|
||||
call ch_log('Test_raw_pipe()')
|
||||
let job = job_start(s:python . " test_channel_pipe.py", {'mode': 'raw'})
|
||||
" Add a dummy close callback to avoid that messages are dropped when calling
|
||||
" ch_canread().
|
||||
let job = job_start(s:python . " test_channel_pipe.py",
|
||||
\ {'mode': 'raw', 'drop': 'never'})
|
||||
call assert_equal(v:t_job, type(job))
|
||||
call assert_equal("run", job_status(job))
|
||||
|
||||
@@ -458,6 +472,9 @@ func Test_raw_pipe()
|
||||
call assert_equal("something\n", substitute(msg, "\r", "", 'g'))
|
||||
|
||||
call ch_sendraw(job, "double this\n")
|
||||
let g:handle = job_getchannel(job)
|
||||
call WaitFor('ch_canread(g:handle)')
|
||||
unlet g:handle
|
||||
let msg = ch_readraw(job)
|
||||
call assert_equal("this\nAND this\n", substitute(msg, "\r", "", 'g'))
|
||||
|
||||
@@ -1396,7 +1413,7 @@ function MyExitTimeCb(job, status)
|
||||
endfunction
|
||||
|
||||
func Test_exit_callback_interval()
|
||||
if !has('job') || has('gui_macvim')
|
||||
if !has('job')
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
@@ -194,3 +194,50 @@ func Test_expand_star_star()
|
||||
bwipe!
|
||||
call delete('a', 'rf')
|
||||
endfunc
|
||||
|
||||
func Test_paste_in_cmdline()
|
||||
let @a = "def"
|
||||
call feedkeys(":abc \<C-R>a ghi\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"abc def ghi', @:)
|
||||
|
||||
new
|
||||
call setline(1, 'asdf.x /tmp/some verylongword a;b-c*d ')
|
||||
|
||||
call feedkeys(":aaa \<C-R>\<C-W> bbb\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"aaa asdf bbb', @:)
|
||||
|
||||
call feedkeys("ft:aaa \<C-R>\<C-F> bbb\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"aaa /tmp/some bbb', @:)
|
||||
|
||||
set incsearch
|
||||
call feedkeys("fy:aaa veryl\<C-R>\<C-W> bbb\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"aaa verylongword bbb', @:)
|
||||
|
||||
call feedkeys("f;:aaa \<C-R>\<C-A> bbb\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"aaa a;b-c*d bbb', @:)
|
||||
|
||||
call feedkeys(":\<C-\>etoupper(getline(1))\<CR>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"ASDF.X /TMP/SOME VERYLONGWORD A;B-C*D ', @:)
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_remove_char_in_cmdline()
|
||||
call feedkeys(":abc def\<S-Left>\<Del>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"abc ef', @:)
|
||||
|
||||
call feedkeys(":abc def\<S-Left>\<BS>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"abcdef', @:)
|
||||
|
||||
call feedkeys(":abc def ghi\<S-Left>\<C-W>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"abc ghi', @:)
|
||||
|
||||
call feedkeys(":abc def\<S-Left>\<C-U>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"def', @:)
|
||||
endfunc
|
||||
|
||||
func Test_illegal_address()
|
||||
new
|
||||
2;'(
|
||||
2;')
|
||||
quit
|
||||
endfunc
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
" Test for displaying stuff
|
||||
if !has('gui_running') && has('unix')
|
||||
set term=ansi
|
||||
endif
|
||||
|
||||
function! s:screenline(lnum, nr) abort
|
||||
let line = []
|
||||
for j in range(a:nr)
|
||||
for c in range(1, winwidth(0))
|
||||
call add(line, nr2char(screenchar(a:lnum+j, c)))
|
||||
endfor
|
||||
call add(line, "\n")
|
||||
endfor
|
||||
return join(line, '')
|
||||
endfunction
|
||||
|
||||
function! Test_display_foldcolumn()
|
||||
new
|
||||
vnew
|
||||
vert resize 25
|
||||
call assert_equal(25, winwidth(winnr()))
|
||||
set isprint=@
|
||||
|
||||
1put='e more noise blah blah more stuff here'
|
||||
|
||||
let expect = "e more noise blah blah<82\n> more stuff here \n"
|
||||
|
||||
call cursor(2, 1)
|
||||
norm! zt
|
||||
redraw!
|
||||
call assert_equal(expect, s:screenline(1,2))
|
||||
set fdc=2
|
||||
redraw!
|
||||
let expect = " e more noise blah blah<\n 82> more stuff here \n"
|
||||
call assert_equal(expect, s:screenline(1,2))
|
||||
|
||||
quit!
|
||||
quit!
|
||||
endfunction
|
||||
@@ -0,0 +1,97 @@
|
||||
" Test for folding
|
||||
|
||||
function! Test_address_fold()
|
||||
new
|
||||
call setline(1, ['int FuncName() {/*{{{*/', 1, 2, 3, 4, 5, '}/*}}}*/',
|
||||
\ 'after fold 1', 'after fold 2', 'after fold 3'])
|
||||
setl fen fdm=marker
|
||||
" The next ccommands should all copy the same part of the buffer,
|
||||
" regardless of the adressing type, since the part to be copied
|
||||
" is folded away
|
||||
:1y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
|
||||
:.y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
|
||||
:.+y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
|
||||
:.,.y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
|
||||
:sil .1,.y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
|
||||
" use silent to make E493 go away
|
||||
:sil .+,.y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
|
||||
:,y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
|
||||
:,+y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/','after fold 1'], getreg(0,1,1))
|
||||
" using .+3 as second address should copy the whole folded line + the next 3
|
||||
" lines
|
||||
:.,+3y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/',
|
||||
\ 'after fold 1', 'after fold 2', 'after fold 3'], getreg(0,1,1))
|
||||
:sil .,-2y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3', '4', '5', '}/*}}}*/'], getreg(0,1,1))
|
||||
|
||||
" now test again with folding disabled
|
||||
set nofoldenable
|
||||
:1y
|
||||
call assert_equal(['int FuncName() {/*{{{*/'], getreg(0,1,1))
|
||||
:.y
|
||||
call assert_equal(['int FuncName() {/*{{{*/'], getreg(0,1,1))
|
||||
:.+y
|
||||
call assert_equal(['1'], getreg(0,1,1))
|
||||
:.,.y
|
||||
call assert_equal(['int FuncName() {/*{{{*/'], getreg(0,1,1))
|
||||
" use silent to make E493 go away
|
||||
:sil .1,.y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1'], getreg(0,1,1))
|
||||
" use silent to make E493 go away
|
||||
:sil .+,.y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1'], getreg(0,1,1))
|
||||
:,y
|
||||
call assert_equal(['int FuncName() {/*{{{*/'], getreg(0,1,1))
|
||||
:,+y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1'], getreg(0,1,1))
|
||||
" using .+3 as second address should copy the whole folded line + the next 3
|
||||
" lines
|
||||
:.,+3y
|
||||
call assert_equal(['int FuncName() {/*{{{*/', '1', '2', '3'], getreg(0,1,1))
|
||||
:7
|
||||
:sil .,-2y
|
||||
call assert_equal(['4', '5', '}/*}}}*/'], getreg(0,1,1))
|
||||
|
||||
quit!
|
||||
endfunction
|
||||
|
||||
function! Test_indent_fold()
|
||||
new
|
||||
call setline(1, ['', 'a', ' b', ' c'])
|
||||
setl fen fdm=indent
|
||||
2
|
||||
norm! >>
|
||||
let a=map(range(1,4), 'foldclosed(v:val)')
|
||||
call assert_equal([-1,-1,-1,-1], a)
|
||||
endfu
|
||||
|
||||
function! Test_indent_fold()
|
||||
new
|
||||
call setline(1, ['', 'a', ' b', ' c'])
|
||||
setl fen fdm=indent
|
||||
2
|
||||
norm! >>
|
||||
let a=map(range(1,4), 'foldclosed(v:val)')
|
||||
call assert_equal([-1,-1,-1,-1], a)
|
||||
bw!
|
||||
endfu
|
||||
|
||||
function! Test_indent_fold2()
|
||||
new
|
||||
call setline(1, ['', '{{{', '}}}', '{{{', '}}}'])
|
||||
setl fen fdm=marker
|
||||
2
|
||||
norm! >>
|
||||
let a=map(range(1,5), 'foldclosed(v:val)')
|
||||
call assert_equal([-1,-1,-1,4,4], a)
|
||||
bw!
|
||||
endfu
|
||||
@@ -273,3 +273,18 @@ func Test_gd_string_only()
|
||||
\ ]
|
||||
call XTest_goto_decl('gd', lines, 5, 10)
|
||||
endfunc
|
||||
|
||||
" Check that setting 'cursorline' does not change curswant
|
||||
func Test_cursorline_keep_col()
|
||||
new
|
||||
call setline(1, ['long long long line', 'short line'])
|
||||
normal ggfi
|
||||
let pos = getcurpos()
|
||||
normal j
|
||||
set cursorline
|
||||
normal k
|
||||
call assert_equal(pos, getcurpos())
|
||||
bwipe!
|
||||
set nocursorline
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -141,4 +141,36 @@ func Test_help_complete()
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
func Test_help_respect_current_file_lang()
|
||||
try
|
||||
let list = []
|
||||
call s:doc_config_setup()
|
||||
|
||||
if has('multi_lang')
|
||||
function s:check_help_file_ext(help_keyword, ext)
|
||||
exec 'help ' . a:help_keyword
|
||||
call assert_equal(a:ext, expand('%:e'))
|
||||
call feedkeys("\<C-]>", 'tx')
|
||||
call assert_equal(a:ext, expand('%:e'))
|
||||
pop
|
||||
helpclose
|
||||
endfunc
|
||||
|
||||
set rtp+=Xdir1/doc-ab
|
||||
set rtp+=Xdir1/doc-ja
|
||||
|
||||
set helplang=ab
|
||||
call s:check_help_file_ext('test-char', 'abx')
|
||||
call s:check_help_file_ext('test-char@ja', 'jax')
|
||||
set helplang=ab,ja
|
||||
call s:check_help_file_ext('test-char@ja', 'jax')
|
||||
call s:check_help_file_ext('test-char@en', 'txt')
|
||||
endif
|
||||
catch
|
||||
call assert_exception('X')
|
||||
finally
|
||||
call s:doc_config_teardown()
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -31,6 +31,30 @@ function History_Tests(hist)
|
||||
call assert_equal('ls', histget(a:hist, -1))
|
||||
call assert_equal(4, histnr(a:hist))
|
||||
|
||||
let a=execute('history ' . a:hist)
|
||||
call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
|
||||
let a=execute('history all')
|
||||
call assert_match("^\n # .* history\n 3 buffers\n> 4 ls", a)
|
||||
|
||||
if len(a:hist) > 0
|
||||
let a=execute('history ' . a:hist . ' 2')
|
||||
call assert_match("^\n # \\S* history$", a)
|
||||
let a=execute('history ' . a:hist . ' 3')
|
||||
call assert_match("^\n # \\S* history\n 3 buffers$", a)
|
||||
let a=execute('history ' . a:hist . ' 4')
|
||||
call assert_match("^\n # \\S* history\n> 4 ls$", a)
|
||||
let a=execute('history ' . a:hist . ' 3,4')
|
||||
call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
|
||||
let a=execute('history ' . a:hist . ' -1')
|
||||
call assert_match("^\n # \\S* history\n> 4 ls$", a)
|
||||
let a=execute('history ' . a:hist . ' -2')
|
||||
call assert_match("^\n # \\S* history\n 3 buffers$", a)
|
||||
let a=execute('history ' . a:hist . ' -2,')
|
||||
call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
|
||||
let a=execute('history ' . a:hist . ' -3')
|
||||
call assert_match("^\n # \\S* history$", a)
|
||||
endif
|
||||
|
||||
" Test for removing entries matching a pattern
|
||||
for i in range(1, 3)
|
||||
call histadd(a:hist, 'text_' . i)
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
" Test for :mksession, :mkview and :loadview in latin1 encoding
|
||||
|
||||
set encoding=latin1
|
||||
scriptencoding latin1
|
||||
|
||||
if !has('multi_byte') || !has('mksession')
|
||||
finish
|
||||
endif
|
||||
|
||||
func Test_mksession()
|
||||
tabnew
|
||||
let wrap_save = &wrap
|
||||
set sessionoptions=buffers splitbelow fileencoding=latin1
|
||||
call setline(1, [
|
||||
\ 'start:',
|
||||
\ 'no multibyte chAracter',
|
||||
\ ' one leaDing tab',
|
||||
\ ' four leadinG spaces',
|
||||
\ 'two consecutive tabs',
|
||||
\ 'two tabs in one line',
|
||||
\ 'one ä multibyteCharacter',
|
||||
\ 'aä Ä two multiByte characters',
|
||||
\ 'Aäöü three mulTibyte characters'
|
||||
\ ])
|
||||
let tmpfile = tempname()
|
||||
exec 'w! ' . tmpfile
|
||||
/^start:
|
||||
set wrap
|
||||
vsplit
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j8|
|
||||
split
|
||||
norm! j8|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
wincmd l
|
||||
|
||||
set nowrap
|
||||
/^start:
|
||||
norm! j16|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j08|3zl
|
||||
split
|
||||
norm! j08|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
call wincol()
|
||||
mksession! test_mks.out
|
||||
let li = filter(readfile('test_mks.out'), 'v:val =~# "\\(^ *normal! 0\\|^ *exe ''normal!\\)"')
|
||||
let expected = [
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 08|',
|
||||
\ 'normal! 08|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
|
||||
\ " normal! 08|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
|
||||
\ " normal! 08|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|"
|
||||
\ ]
|
||||
call assert_equal(expected, li)
|
||||
tabclose!
|
||||
|
||||
call delete('test_mks.out')
|
||||
call delete(tmpfile)
|
||||
let &wrap = wrap_save
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
@@ -0,0 +1,104 @@
|
||||
" Test for :mksession, :mkview and :loadview in utf-8 encoding
|
||||
|
||||
set encoding=utf-8
|
||||
scriptencoding utf-8
|
||||
|
||||
if !has('multi_byte') || !has('mksession')
|
||||
finish
|
||||
endif
|
||||
|
||||
func Test_mksession_utf8()
|
||||
tabnew
|
||||
let wrap_save = &wrap
|
||||
set sessionoptions=buffers splitbelow fileencoding=utf-8
|
||||
call setline(1, [
|
||||
\ 'start:',
|
||||
\ 'no multibyte chAracter',
|
||||
\ ' one leaDing tab',
|
||||
\ ' four leadinG spaces',
|
||||
\ 'two consecutive tabs',
|
||||
\ 'two tabs in one line',
|
||||
\ 'one … multibyteCharacter',
|
||||
\ 'a “b” two multiByte characters',
|
||||
\ '“c”1€ three mulTibyte characters'
|
||||
\ ])
|
||||
let tmpfile = tempname()
|
||||
exec 'w! ' . tmpfile
|
||||
/^start:
|
||||
set wrap
|
||||
vsplit
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j8|
|
||||
split
|
||||
norm! j8|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
split
|
||||
norm! j16|
|
||||
wincmd l
|
||||
|
||||
set nowrap
|
||||
/^start:
|
||||
norm! j16|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j08|3zl
|
||||
split
|
||||
norm! j08|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
norm! j016|3zl
|
||||
split
|
||||
call wincol()
|
||||
mksession! test_mks.out
|
||||
let li = filter(readfile('test_mks.out'), 'v:val =~# "\\(^ *normal! 0\\|^ *exe ''normal!\\)"')
|
||||
let expected = [
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 08|',
|
||||
\ 'normal! 08|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ 'normal! 016|',
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
|
||||
\ " normal! 08|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
|
||||
\ " normal! 08|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|",
|
||||
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
|
||||
\ " normal! 016|"
|
||||
\ ]
|
||||
call assert_equal(expected, li)
|
||||
tabclose!
|
||||
|
||||
call delete('test_mks.out')
|
||||
call delete(tmpfile)
|
||||
let &wrap = wrap_save
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
@@ -40,3 +40,28 @@ func Test_nested_argument()
|
||||
delfunc g:X
|
||||
unlet g:Y
|
||||
endfunc
|
||||
|
||||
func Recurse(count)
|
||||
if a:count > 0
|
||||
call Recurse(a:count - 1)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func Test_max_nesting()
|
||||
" TODO: why does this fail on Windows? Runs out of stack perhaps?
|
||||
if has('win32')
|
||||
return
|
||||
endif
|
||||
let call_depth_here = 2
|
||||
let ex_depth_here = 5
|
||||
set mfd&
|
||||
|
||||
call Recurse(99 - call_depth_here)
|
||||
call assert_fails('call Recurse(' . (100 - call_depth_here) . ')', 'E132:')
|
||||
|
||||
set mfd=210
|
||||
call Recurse(209 - ex_depth_here)
|
||||
call assert_fails('call Recurse(' . (210 - ex_depth_here) . ')', 'E169:')
|
||||
|
||||
set mfd&
|
||||
endfunc
|
||||
|
||||
@@ -106,3 +106,26 @@ func Test_keymap_valid()
|
||||
call assert_fails(":set kmp=trunc\x00name", "E544:")
|
||||
call assert_fails(":set kmp=trunc\x00name", "trunc")
|
||||
endfunc
|
||||
|
||||
func Check_dir_option(name)
|
||||
" Check that it's possible to set the option.
|
||||
exe 'set ' . a:name . '=/usr/share/dict/words'
|
||||
call assert_equal('/usr/share/dict/words', eval('&' . a:name))
|
||||
exe 'set ' . a:name . '=/usr/share/dict/words,/and/there'
|
||||
call assert_equal('/usr/share/dict/words,/and/there', eval('&' . a:name))
|
||||
exe 'set ' . a:name . '=/usr/share/dict\ words'
|
||||
call assert_equal('/usr/share/dict words', eval('&' . a:name))
|
||||
|
||||
" Check rejecting weird characters.
|
||||
call assert_fails("set " . a:name . "=/not&there", "E474:")
|
||||
call assert_fails("set " . a:name . "=/not>there", "E474:")
|
||||
call assert_fails("set " . a:name . "=/not.*there", "E474:")
|
||||
endfunc
|
||||
|
||||
func Test_dictionary()
|
||||
call Check_dir_option('dictionary')
|
||||
endfunc
|
||||
|
||||
func Test_thesaurus()
|
||||
call Check_dir_option('thesaurus')
|
||||
endfunc
|
||||
|
||||
@@ -464,4 +464,22 @@ func Test_completefunc_with_scratch_buffer()
|
||||
set completeopt&
|
||||
endfunc
|
||||
|
||||
" <C-E> - select original typed text before the completion started without
|
||||
" auto-wrap text.
|
||||
func Test_completion_ctrl_e_without_autowrap()
|
||||
new
|
||||
let tw_save=&tw
|
||||
set tw=78
|
||||
let li = [
|
||||
\ '" zzz',
|
||||
\ '" zzzyyyyyyyyyyyyyyyyyyy']
|
||||
call setline(1, li)
|
||||
0
|
||||
call feedkeys("A\<C-X>\<C-N>\<C-E>\<Esc>", "tx")
|
||||
call assert_equal(li, getline(1, '$'))
|
||||
|
||||
let &tw=tw_save
|
||||
q!
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -54,7 +54,7 @@ func Test_syn_iskeyword()
|
||||
setlocal isk-=_
|
||||
call assert_equal('DLTD_BY', GetSyntaxItem('DLTD'))
|
||||
/\<D\k\+\>/:norm! ygn
|
||||
let b2=@0
|
||||
let b2 = @0
|
||||
call assert_equal('DLTD', @0)
|
||||
|
||||
syn iskeyword clear
|
||||
@@ -80,3 +80,79 @@ func Test_syntax_after_reload()
|
||||
call assert_true(exists('g:gotit'))
|
||||
call delete('Xsomefile')
|
||||
endfunc
|
||||
|
||||
func Test_syntime()
|
||||
if !has('profile')
|
||||
return
|
||||
endif
|
||||
|
||||
syntax on
|
||||
syntime on
|
||||
let a = execute('syntime report')
|
||||
call assert_equal("\nNo Syntax items defined for this buffer", a)
|
||||
|
||||
view ../memfile_test.c
|
||||
setfiletype cpp
|
||||
redraw
|
||||
let a = execute('syntime report')
|
||||
call assert_match('^ TOTAL *COUNT *MATCH *SLOWEST *AVERAGE *NAME *PATTERN', a)
|
||||
call assert_match(' \d*\.\d* \+[^0]\d* .* cppRawString ', a)
|
||||
call assert_match(' \d*\.\d* \+[^0]\d* .* cppNumber ', a)
|
||||
|
||||
syntime off
|
||||
syntime clear
|
||||
let a = execute('syntime report')
|
||||
call assert_match('^ TOTAL *COUNT *MATCH *SLOWEST *AVERAGE *NAME *PATTERN', a)
|
||||
call assert_notmatch('.* cppRawString *', a)
|
||||
call assert_notmatch('.* cppNumber*', a)
|
||||
call assert_notmatch('[1-9]', a)
|
||||
|
||||
call assert_fails('syntime abc', 'E475')
|
||||
|
||||
syntax clear
|
||||
let a = execute('syntime report')
|
||||
call assert_equal("\nNo Syntax items defined for this buffer", a)
|
||||
|
||||
bd
|
||||
endfunc
|
||||
|
||||
func Test_syntax_list()
|
||||
syntax on
|
||||
let a = execute('syntax list')
|
||||
call assert_equal("\nNo Syntax items defined for this buffer", a)
|
||||
|
||||
view ../memfile_test.c
|
||||
setfiletype c
|
||||
|
||||
let a = execute('syntax list')
|
||||
call assert_match('cInclude*', a)
|
||||
call assert_match('cDefine', a)
|
||||
|
||||
let a = execute('syntax list cDefine')
|
||||
call assert_notmatch('cInclude*', a)
|
||||
call assert_match('cDefine', a)
|
||||
call assert_match(' links to Macro$', a)
|
||||
|
||||
call assert_fails('syntax list ABCD', 'E28:')
|
||||
call assert_fails('syntax list @ABCD', 'E392:')
|
||||
|
||||
syntax clear
|
||||
let a = execute('syntax list')
|
||||
call assert_equal("\nNo Syntax items defined for this buffer", a)
|
||||
|
||||
bd
|
||||
endfunc
|
||||
|
||||
func Test_syntax_completion()
|
||||
call feedkeys(":syn \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"syn case clear cluster conceal enable include iskeyword keyword list manual match off on region reset spell sync', @:)
|
||||
|
||||
call feedkeys(":syn case \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"syn case ignore match', @:)
|
||||
|
||||
call feedkeys(":syn list \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_match('^"syn list Boolean Character ', @:)
|
||||
|
||||
call feedkeys(":syn match \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_match('^"syn match Boolean Character ', @:)
|
||||
endfunc
|
||||
|
||||
@@ -65,6 +65,15 @@ function Test_tabpage()
|
||||
call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1)
|
||||
tabclose
|
||||
q
|
||||
"
|
||||
"
|
||||
" Test for ":tab drop vertical-split-window" to jump test1 buffer
|
||||
tabedit test1
|
||||
vnew
|
||||
tabfirst
|
||||
tab drop test1
|
||||
call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)])
|
||||
1tabonly
|
||||
endif
|
||||
"
|
||||
"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
" Tests for Visual mode. Uses double-wide character.
|
||||
if !has('multi_byte')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Tests for various Visual mode.
|
||||
if !has('visual')
|
||||
finish
|
||||
endif
|
||||
|
||||
func Test_block_shift_multibyte()
|
||||
" Uses double-wide character.
|
||||
if !has('multi_byte')
|
||||
return
|
||||
endif
|
||||
split
|
||||
call setline(1, ['xヹxxx', 'ヹxxx'])
|
||||
exe "normal 1G0l\<C-V>jl>"
|
||||
@@ -15,3 +15,11 @@ func Test_block_shift_multibyte()
|
||||
call assert_equal(' ヹxxx', getline(2))
|
||||
q!
|
||||
endfunc
|
||||
|
||||
func Test_dotregister_paste()
|
||||
new
|
||||
exe "norm! ihello world\<esc>"
|
||||
norm! 0ve".p
|
||||
call assert_equal('hello world world', getline(1))
|
||||
q!
|
||||
endfunc
|
||||
|
||||
@@ -779,6 +779,102 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
142,
|
||||
/**/
|
||||
141,
|
||||
/**/
|
||||
140,
|
||||
/**/
|
||||
139,
|
||||
/**/
|
||||
138,
|
||||
/**/
|
||||
137,
|
||||
/**/
|
||||
136,
|
||||
/**/
|
||||
135,
|
||||
/**/
|
||||
134,
|
||||
/**/
|
||||
133,
|
||||
/**/
|
||||
132,
|
||||
/**/
|
||||
131,
|
||||
/**/
|
||||
130,
|
||||
/**/
|
||||
129,
|
||||
/**/
|
||||
128,
|
||||
/**/
|
||||
127,
|
||||
/**/
|
||||
126,
|
||||
/**/
|
||||
125,
|
||||
/**/
|
||||
124,
|
||||
/**/
|
||||
123,
|
||||
/**/
|
||||
122,
|
||||
/**/
|
||||
121,
|
||||
/**/
|
||||
120,
|
||||
/**/
|
||||
119,
|
||||
/**/
|
||||
118,
|
||||
/**/
|
||||
117,
|
||||
/**/
|
||||
116,
|
||||
/**/
|
||||
115,
|
||||
/**/
|
||||
114,
|
||||
/**/
|
||||
113,
|
||||
/**/
|
||||
112,
|
||||
/**/
|
||||
111,
|
||||
/**/
|
||||
110,
|
||||
/**/
|
||||
109,
|
||||
/**/
|
||||
108,
|
||||
/**/
|
||||
107,
|
||||
/**/
|
||||
106,
|
||||
/**/
|
||||
105,
|
||||
/**/
|
||||
104,
|
||||
/**/
|
||||
103,
|
||||
/**/
|
||||
102,
|
||||
/**/
|
||||
101,
|
||||
/**/
|
||||
100,
|
||||
/**/
|
||||
99,
|
||||
/**/
|
||||
98,
|
||||
/**/
|
||||
97,
|
||||
/**/
|
||||
96,
|
||||
/**/
|
||||
95,
|
||||
/**/
|
||||
94,
|
||||
/**/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user