mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
141 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| 109b8c134c | |||
| 967b1a1814 | |||
| 7fe35f8735 | |||
| cab4040499 | |||
| 4dba9d1e2f | |||
| aedaad51cf | |||
| fbf66f9918 | |||
| 63e4344edc | |||
| dda39aeafc | |||
| 3129be9a78 | |||
| 7c8684761b | |||
| 32418b98a0 | |||
| abeb366f9f | |||
| 28f88ac8e7 | |||
| a6d11c71a0 | |||
| cf2ddc70a1 | |||
| 0b0e6b0350 | |||
| deddd2587c | |||
| ca8b8d6956 | |||
| 9f0e423c28 | |||
| 6c896867c4 | |||
| a859f04b4d | |||
| cc28e2d05d | |||
| 7df915d113 | |||
| c0514bf477 | |||
| 1ed1ccc2c3 | |||
| 1de54de4ef | |||
| 2256c99471 | |||
| 4663f06f3e | |||
| 914798ebeb | |||
| 8a01f969c1 | |||
| 20d6ca2821 | |||
| 7618e00d3b | |||
| 8e63905263 | |||
| 5d7520fbfe | |||
| 04561d6622 | |||
| 2c1841d1d4 | |||
| 3f7d090726 | |||
| d4db7719bd | |||
| b6be3ea45b | |||
| 2b946c9f9b | |||
| 63bed3d319 | |||
| 59f5f0ab64 | |||
| 08a873a739 | |||
| e3505dfc85 | |||
| 79cbdcb1ee | |||
| 87243e38ea | |||
| 8a5883b748 | |||
| 95f096030e | |||
| 459ca56312 | |||
| 38bc495637 | |||
| fde8fd50d8 | |||
| c4d4ac22f7 | |||
| 3f9ebf32a3 | |||
| c1e81252b7 | |||
| a1f4cb93ba | |||
| 25de4c232d | |||
| 21662be221 | |||
| 98500fdc61 | |||
| 06b40267d6 | |||
| 4a08b0dc4d | |||
| 40d3f137e7 | |||
| eb828d01d9 | |||
| 7416ff4766 | |||
| 55952d4dd4 | |||
| 3549534f18 | |||
| 8161551724 | |||
| aab3383e70 | |||
| 426f375422 | |||
| de5e2c219b | |||
| 91e44a3305 | |||
| 9376f5f482 | |||
| d0b5138ba4 | |||
| 2a2ff9da47 | |||
| 3a117e19e0 | |||
| b4ada79aa7 | |||
| 4dfba198e1 | |||
| fb63090b62 | |||
| 60ef3e81f4 |
@@ -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.
|
||||
|
||||
@@ -207,7 +207,7 @@ SRC_UNIX = \
|
||||
src/config.mk.dist \
|
||||
src/config.mk.in \
|
||||
src/configure \
|
||||
src/configure.in \
|
||||
src/configure.ac \
|
||||
src/gui_at_fs.c \
|
||||
src/gui_at_sb.c \
|
||||
src/gui_at_sb.h \
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -41,9 +41,16 @@ this autocmd might be useful:
|
||||
autocmd SourcePre */colors/blue_sky.vim set background=dark
|
||||
Replace "blue_sky" with the name of the colorscheme.
|
||||
|
||||
In case you want to tweak a colorscheme after it was loaded, check out that
|
||||
In case you want to tweak a colorscheme after it was loaded, check out the
|
||||
ColorScheme autocmd event.
|
||||
|
||||
To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim",
|
||||
and use `:runtime` to load the original colorscheme:
|
||||
" load the "evening" colorscheme
|
||||
runtime colors/evening.vim
|
||||
" change the color of statements
|
||||
hi Statement ctermfg=Blue guifg=Blue
|
||||
|
||||
To see which highlight group is used where, find the help for
|
||||
"highlight-groups" and "group-name".
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
" Vim compiler file
|
||||
" Compiler: csslint for CSS
|
||||
" Maintainer: Daniel Moch <daniel@danielmoch.com>
|
||||
" Last Change: 2016 May 21
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "csslint"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=csslint\ --format=compact
|
||||
CompilerSet errorformat=%-G,%-G%f:\ lint\ free!,%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %m
|
||||
@@ -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
|
||||
@@ -0,0 +1,16 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Pylint for Python
|
||||
" Maintainer: Daniel Moch <daniel@danielmoch.com>
|
||||
" Last Change: 2016 May 20
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "pylint"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no
|
||||
CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%#
|
||||
@@ -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: >
|
||||
:&&
|
||||
|
||||
+26
-11
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Sep 29
|
||||
*channel.txt* For Vim version 8.0. Last change: 2016 Dec 01
|
||||
|
||||
|
||||
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.
|
||||
@@ -369,7 +375,7 @@ Leave out the fourth argument if no response is to be sent:
|
||||
==============================================================================
|
||||
6. Using a RAW or NL channel *channel-raw*
|
||||
|
||||
If mode is RAW or NL then a message can be send like this: >
|
||||
If mode is RAW or NL then a message can be sent like this: >
|
||||
let response = ch_evalraw(channel, {string})
|
||||
|
||||
The {string} is sent as-is. The response will be what can be read from the
|
||||
@@ -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.
|
||||
|
||||
@@ -596,11 +606,16 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"close_cb": handler Callback for when the channel is closed. Same as
|
||||
"close_cb" on |ch_open()|, see |close_cb|.
|
||||
*job-exit_cb*
|
||||
"drop" Specifies when to drop messages. Same as "drop" on
|
||||
|ch_open()|, see |channel-drop|. For "auto" the
|
||||
exit_cb is not considered.
|
||||
|
||||
"exit_cb": handler Callback for when the job ends. The arguments are the
|
||||
job and the exit status.
|
||||
Vim checks about every 10 seconds for jobs that ended.
|
||||
The check also be triggered by calling |job_status()|,
|
||||
which may then invoke the exit_cb handler.
|
||||
Vim checks up to 10 times per second for jobs that
|
||||
ended. The check can also be triggered by calling
|
||||
|job_status()|, which may then invoke the exit_cb
|
||||
handler.
|
||||
Note that data can be buffered, callbacks may still be
|
||||
called after the process ends.
|
||||
*job-timeout*
|
||||
@@ -628,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.
|
||||
|
||||
@@ -646,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
|
||||
@@ -659,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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*digraph.txt* For Vim version 8.0. Last change: 2014 Jun 19
|
||||
*digraph.txt* For Vim version 8.0. Last change: 2016 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,7 +147,7 @@ a standard meaning:
|
||||
Two 2 Hook
|
||||
Nine 9 Horn
|
||||
|
||||
Equals = Cyrillic (= used as second char)
|
||||
Equals = Cyrillic (= used as second char)
|
||||
Asterisk * Greek
|
||||
Percent sign % Greek/Cyrillic special
|
||||
Plus + smalls: Arabic, capitals: Hebrew
|
||||
@@ -926,6 +926,7 @@ char digraph hex dec official name ~
|
||||
† /- 2020 8224 DAGGER
|
||||
‡ /= 2021 8225 DOUBLE DAGGER
|
||||
‥ .. 2025 8229 TWO DOT LEADER
|
||||
… ,. 2026 8230 HORIZONTAL ELLIPSIS
|
||||
‰ %0 2030 8240 PER MILLE SIGN
|
||||
′ 1' 2032 8242 PRIME
|
||||
″ 2' 2033 8243 DOUBLE PRIME
|
||||
|
||||
@@ -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
|
||||
|
||||
+27
-12
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2016 Oct 15
|
||||
*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}])
|
||||
@@ -2523,7 +2524,7 @@ assert_exception({error} [, {msg}]) *assert_exception()*
|
||||
assert_fails({cmd} [, {error}]) *assert_fails()*
|
||||
Run {cmd} and add an error message to |v:errors| if it does
|
||||
NOT produce an error.
|
||||
When {error} is given it must match |v:errmsg|.
|
||||
When {error} is given it must match in |v:errmsg|.
|
||||
|
||||
assert_false({actual} [, {msg}]) *assert_false()*
|
||||
When {actual} is not false an error message is added to
|
||||
@@ -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 @@
|
||||
*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}
|
||||
|
||||
*'(* *`(*
|
||||
|
||||
+37
-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: 2016 Nov 26
|
||||
|
||||
|
||||
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
|
||||
@@ -5851,6 +5853,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 +5925,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 +5952,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 +8007,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 @@
|
||||
*pi_gzip.txt* For Vim version 8.0. Last change: 2012 Jul 19
|
||||
*pi_gzip.txt* For Vim version 8.0. Last change: 2016 Nov 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -27,6 +27,8 @@ with these extensions:
|
||||
*.bz2 bzip2
|
||||
*.lzma lzma
|
||||
*.xz xz
|
||||
*.lz lzip
|
||||
*.zst zstd
|
||||
|
||||
That's actually the only thing you need to know. There are no options.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 8.0. Last change: 2016 Jul 17
|
||||
*quickfix.txt* For Vim version 8.0. Last change: 2016 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -878,7 +878,7 @@ need to write down a "todo" list.
|
||||
|
||||
|
||||
The Vim plugins in the "compiler" directory will set options to use the
|
||||
selected compiler. For ":compiler" local options are set, for ":compiler!"
|
||||
selected compiler. For `:compiler` local options are set, for `:compiler!`
|
||||
global options.
|
||||
*current_compiler*
|
||||
To support older Vim versions, the plugins always use "current_compiler" and
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*scroll.txt* For Vim version 8.0. Last change: 2006 Aug 27
|
||||
*scroll.txt* For Vim version 8.0. Last change: 2016 Nov 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -108,7 +108,8 @@ z^ Without [count]: Redraw with the line just above the
|
||||
3. Scrolling relative to cursor *scroll-cursor*
|
||||
|
||||
The following commands reposition the edit window (the part of the buffer that
|
||||
you see) while keeping the cursor on the same line:
|
||||
you see) while keeping the cursor on the same line. Note that the 'scrolloff'
|
||||
option may cause context lines to show above and below the cursor.
|
||||
|
||||
*z<CR>*
|
||||
z<CR> Redraw, line [count] at top of window (default
|
||||
|
||||
@@ -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|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2016 Sep 29
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2016 Oct 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4597,7 +4597,14 @@ in their own color.
|
||||
|
||||
Doesn't work recursively, thus you can't use
|
||||
":colorscheme" in a color scheme script.
|
||||
After the color scheme has been loaded the
|
||||
|
||||
To customize a colorscheme use another name, e.g.
|
||||
"~/.vim/colors/mine.vim", and use `:runtime` to load
|
||||
the original colorscheme: >
|
||||
runtime colors/evening.vim
|
||||
hi Statement ctermfg=Blue guifg=Blue
|
||||
|
||||
< After the color scheme has been loaded the
|
||||
|ColorScheme| autocommand event is triggered.
|
||||
For info about writing a colorscheme file: >
|
||||
:edit $VIMRUNTIME/colors/README.txt
|
||||
|
||||
@@ -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*
|
||||
|
||||
+58
-11
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Oct 27
|
||||
*todo.txt* For Vim version 8.0. Last change: 2016 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -28,14 +28,14 @@ See |develop.txt| for development plans. You can vote for which items should
|
||||
be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
|
||||
Issues can also be entered online: https://github.com/vim/vim/issues
|
||||
Updates will be forwarded to the vim_dev maillist. Issues entered there will
|
||||
not be repeated below, unless there is extra information.
|
||||
Only use this for bug reports, not for questions! Those belong on the
|
||||
maillist. Updates will be forwarded to the vim_dev maillist. Issues entered
|
||||
there will not be repeated below, unless there is extra information.
|
||||
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
+channel:
|
||||
- Check for job cleanup more often? Patch from Ozaki Kiichi, 2016 Oct 22.
|
||||
- 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.
|
||||
@@ -97,10 +97,30 @@ Regexp problems:
|
||||
- The pattern "\1" with the old engine gives E65, with the new engine it
|
||||
matches the empty string. (Dominique Pelle, 2015 Oct 2, Nov 24)
|
||||
had_endbrace[] is set but not initialized or used.
|
||||
- Difference between two engines: ".*\zs\/\@>\/" on text "///"
|
||||
(Chris Paul, 2016 Nov 13) New engine not greedy enough?
|
||||
|
||||
'] mark invalid after undoing insert "hello".
|
||||
|
||||
Make html indent file use javascript indent, now that it's not just cindent.
|
||||
#1220
|
||||
|
||||
Use __sun instead of sun define check. #1296
|
||||
|
||||
Patch to use buffer id for system() and systemlist() (LemonBoy, 2016 Nov 7,
|
||||
#1240)
|
||||
|
||||
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?
|
||||
|
||||
Bug: ":earlier 100d" doesn't work after using undo file.
|
||||
(Pavol Juhas, 2016 Nov 15, #1254)
|
||||
Fix by Christian, but lacks a test.
|
||||
Test by Pavol Juhas, Nov 22.
|
||||
|
||||
Bug: Json with same key should not give internal error. (Lcd, 2016 Oct 26)
|
||||
Make dict_add give a duplicate key error.
|
||||
|
||||
@@ -111,12 +131,11 @@ Allow using json with empty key? Dict already has it.
|
||||
|
||||
Json string with trailing \u should be an error. (Lcd)
|
||||
|
||||
Patch to fix conceal mode. (Christian Brabandt, 2016 Oct 23, close #1092)
|
||||
|
||||
Patch to reset ex_exitvalue after catch. (Christian Brabandt, 2016 Oct 23)
|
||||
|
||||
Patch to deal with changed configure events in GTK 3. (Jan Alexander Steffens,
|
||||
2016 Oct 23 #1193)
|
||||
Remarks from nuko8, 2016 Nov 2.
|
||||
|
||||
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
|
||||
Also get E749 on exit.
|
||||
@@ -129,6 +148,9 @@ Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
Screen updated delayed when using CTRL-O u in Insert mode.
|
||||
(Barlik, #1191) Perhaps because status message?
|
||||
|
||||
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)
|
||||
|
||||
@@ -142,12 +164,23 @@ Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
|
||||
Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
|
||||
#1053) With patch, does it work?
|
||||
|
||||
Patch to make finding duplicate tags much faster, using a hashtab. (James
|
||||
McCoy, 2016 Sept 14, #1046) Should work now. Updated Nov 12.
|
||||
>
|
||||
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?
|
||||
|
||||
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())
|
||||
|
||||
@@ -156,6 +189,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)
|
||||
|
||||
@@ -181,6 +221,9 @@ Include the test.
|
||||
When 'keywordprg' starts with ":" the argument is still escaped as a shell
|
||||
command argument. (Romain Lafourcade, 2016 Oct 16, #1175)
|
||||
|
||||
Patch to support CamelCase for spell checking: See a lower-to-upper case
|
||||
change as a word boundary. (btucker-MPCData, 2016 Nov 6, #1235)
|
||||
|
||||
Idea from Sven: record sequence of keys. Useful to show others what they are
|
||||
doing (look over the shoulder), and also to see what happened.
|
||||
Probably list of keystrokes, with some annotations for mode changes.
|
||||
@@ -230,6 +273,9 @@ Lakshmanan, 2016 Aug 25)
|
||||
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 ":@.".
|
||||
|
||||
@@ -238,6 +284,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)
|
||||
|
||||
@@ -290,9 +339,6 @@ Add redrawtabline command. (Naruhiko Nishino, 2016 Jun 11)
|
||||
Neovim patch for utfc_ptr2char_len() https://github.com/neovim/neovim/pull/4574
|
||||
No test, needs some work to include.
|
||||
|
||||
Patch to make finding duplicate tags much faster, using a hashtab. (James
|
||||
McCoy, 2016 Sept 14, #1046) Should work now.
|
||||
>
|
||||
Patch to improve indenting for C++ constructor with initializer list.
|
||||
(Hirohito Higashi, 2016 Mar 31)
|
||||
|
||||
@@ -1267,6 +1313,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.
|
||||
|
||||
@@ -3824,7 +3871,7 @@ Code size:
|
||||
left out.
|
||||
8 When compiled with a GUI-only version, the termcap entries for terminals
|
||||
can be removed.
|
||||
8 Can the check for libelf in configure.in be removed?
|
||||
8 Can the check for libelf in configure.ac be removed?
|
||||
|
||||
|
||||
Messages:
|
||||
@@ -5546,7 +5593,7 @@ From vile:
|
||||
Far future and "big" extensions:
|
||||
- Instead of using a Makefile and autoconf, use a simple shell script to
|
||||
find the C compiler and do everything with C code. Translate something
|
||||
like an Aap recipe and configure.in to C. Avoids depending on Python,
|
||||
like an Aap recipe and configure.ac to C. Avoids depending on Python,
|
||||
thus will work everywhere. With batch file to find the C compiler it
|
||||
would also work on MS-Windows.
|
||||
- Make it easy to setup Vim for groups of users: novice vi users, novice
|
||||
|
||||
@@ -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
|
||||
|
||||
+417
-1
@@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Sep 14
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Nov 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -14507,4 +14507,420 @@ Problem: Test runner misses a comma.
|
||||
Solution: Add the comma.
|
||||
Files: src/testdir/runtest.vim
|
||||
|
||||
Patch 8.0.0001
|
||||
Problem: Intro screen still mentions version7. (Paul)
|
||||
Solution: Change it to version8.
|
||||
Files: src/version.c
|
||||
|
||||
Patch 8.0.0002
|
||||
Problem: The netrw plugin does not work.
|
||||
Solution: Make it accept version 8.0.
|
||||
Files: runtime/autoload/netrw.vim
|
||||
|
||||
Patch 8.0.0003
|
||||
Problem: getwinvar() returns wrong Value of boolean and number options,
|
||||
especially non big endian systems. (James McCoy)
|
||||
Solution: Cast the pointer to long or int. (closes #1060)
|
||||
Files: src/option.c, src/testdir/test_bufwintabinfo.vim
|
||||
|
||||
Patch 8.0.0004
|
||||
Problem: A string argument for function() that is not a function name
|
||||
results in an error message with NULL. (Christian Brabandt)
|
||||
Solution: Use the argument for the error message.
|
||||
Files: src/evalfunc.c, src/testdir/test_expr.vim
|
||||
|
||||
Patch 8.0.0005
|
||||
Problem: Netbeans test fails with Python 3. (Jonathonf)
|
||||
Solution: Encode the string before sending it. (closes #1070)
|
||||
Files: src/testdir/test_netbeans.py
|
||||
|
||||
Patch 8.0.0006
|
||||
Problem: ":lb" is interpreted as ":lbottom" while the documentation says it
|
||||
means ":lbuffer".
|
||||
Solution: Adjust the order of the commands. (haya14busa, closes #1093)
|
||||
Files: src/ex_cmds.h
|
||||
|
||||
Patch 8.0.0007
|
||||
Problem: Vim 7.4 is still mentioned in a few places.
|
||||
Solution: Update to Vim 8. (Uncle Bill, closes #1094)
|
||||
Files: src/INSTALLpc.txt, src/vimtutor, uninstal.txt
|
||||
|
||||
Patch 8.0.0008
|
||||
Problem: Popup complete test is disabled.
|
||||
Solution: Enable the test and change the assert. (Hirohito Higashi)
|
||||
Files: src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0009
|
||||
Problem: Unnecessary workaround for AppVeyor.
|
||||
Solution: Revert patch 7.4.990. (Christian Brabandt)
|
||||
Files: appveyor.yml
|
||||
|
||||
Patch 8.0.0010
|
||||
Problem: Crash when editing file that starts with crypt header. (igor2x)
|
||||
Solution: Check for length of text. (Christian Brabandt) Add a test.
|
||||
Files: src/fileio.c, src/testdir/test_crypt.vim, src/Makefile,
|
||||
src/testdir/Make_all.mak
|
||||
|
||||
Patch 8.0.0011
|
||||
Problem: On OSX Test_pipe_through_sort_all() sometimes fails.
|
||||
Solution: Add the test to the list of flaky tests.
|
||||
Files: src/testdir/runtest.vim
|
||||
|
||||
Patch 8.0.0012
|
||||
Problem: Typos in comments.
|
||||
Solution: Change "its" to "it's". (Matthew Brener, closes #1088)
|
||||
Files: src/evalfunc.c, src/main.aap, src/nbdebug.c, src/netbeans.c,
|
||||
src/quickfix.c, src/workshop.c, src/wsdebug.c
|
||||
|
||||
Patch 8.0.0013 (after 8.0.0011)
|
||||
Problem: Missing comma in list.
|
||||
Solution: Add the comma.
|
||||
Files: src/testdir/runtest.vim
|
||||
|
||||
Patch 8.0.0014
|
||||
Problem: Crypt tests are old style.
|
||||
Solution: Convert to new style.
|
||||
Files: src/testdir/test71.in, src/testdir/test71.ok,
|
||||
src/testdir/test71a.in, src/testdir/test_crypt.vim, src/Makefile,
|
||||
src/testdir/Make_all.mak
|
||||
|
||||
Patch 8.0.0015
|
||||
Problem: Can't tell which part of a channel has "buffered" status.
|
||||
Solution: Add an optional argument to ch_status(). Let ch_info() also
|
||||
return "buffered" for out_status and err_status.
|
||||
Files: src/evalfunc.c, src/channel.c, src/proto/channel.pro,
|
||||
src/testdir/test_channel.vim, runtime/doc/eval.txt
|
||||
|
||||
Patch 8.0.0016 (after 8.0.0015)
|
||||
Problem: Build fails.
|
||||
Solution: Include missing change.
|
||||
Files: src/eval.c
|
||||
|
||||
Patch 8.0.0017
|
||||
Problem: Cannot get the number of the current quickfix or location list.
|
||||
Solution: Use the current list if "nr" in "what" is zero. (Yegappan
|
||||
Lakshmanan) Remove debug command from test.
|
||||
Files: src/quickfix.c, src/testdir/test_quickfix.vim,
|
||||
runtime/doc/eval.txt
|
||||
|
||||
Patch 8.0.0018
|
||||
Problem: When using ":sleep" channel input is not handled.
|
||||
Solution: When there is a channel check for input also when not in raw mode.
|
||||
Check every 100 msec.
|
||||
Files: src/channel.c, src/proto/channel.pro, src/ui.c, src/proto/ui.pro,
|
||||
src/ex_docmd.c, src/os_amiga.c, src/proto/os_amiga.pro,
|
||||
src/os_unix.c, src/proto/os_unix.pro, src/os_win32.c,
|
||||
src/proto/os_win32.pro
|
||||
|
||||
Patch 8.0.0019
|
||||
Problem: Test_command_count is old style.
|
||||
Solution: Turn it into a new style test. (Naruhiko Nishino)
|
||||
Use more assert functions.
|
||||
Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/test_alot.vim,
|
||||
src/testdir/test_autocmd.vim, src/testdir/test_command_count.in,
|
||||
src/testdir/test_command_count.ok,
|
||||
src/testdir/test_command_count.vim
|
||||
|
||||
Patch 8.0.0020
|
||||
Problem: The regexp engines are not reentrant.
|
||||
Solution: Add regexec_T and save/restore the state when needed.
|
||||
Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test_expr.vim,
|
||||
runtime/doc/eval.txt, runtime/doc/change.txt
|
||||
|
||||
Patch 8.0.0021
|
||||
Problem: In the GUI when redrawing the cursor it may be on the second half
|
||||
of a double byte character.
|
||||
Solution: Correct the cursor column. (Yasuhiro Matsumoto)
|
||||
Files: src/screen.c
|
||||
|
||||
Patch 8.0.0022
|
||||
Problem: If a channel in NL mode is missing the NL at the end the remaining
|
||||
characters are dropped.
|
||||
Solution: When the channel is closed use the remaining text. (Ozaki Kiichi)
|
||||
Files: src/channel.c, src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0023
|
||||
Problem: "gd" and "gD" may find a match in a comment or string.
|
||||
Solution: Ignore matches in comments and strings. (Anton Lindqvist)
|
||||
Files: src/normal.c, src/testdir/test_goto.vim
|
||||
|
||||
Patch 8.0.0024
|
||||
Problem: When the netbeans channel closes, "DETACH" is put in the output
|
||||
part. (Ozaki Kiichi)
|
||||
Solution: Write "DETACH" in the socket part.
|
||||
Files: src/channel.c, src/testdir/test_netbeans.vim
|
||||
|
||||
Patch 8.0.0025
|
||||
Problem: Inconsistent use of spaces vs tabs in gd test.
|
||||
Solution: Use tabs. (Anton Lindqvist)
|
||||
Files: src/testdir/test_goto.vim
|
||||
|
||||
Patch 8.0.0026
|
||||
Problem: Error format with %W, %C and %Z does not work. (Gerd Wachsmuth)
|
||||
Solution: Skip code when qf_multiignore is set. (Lcd)
|
||||
Files: src/quickfix.c, src/testdir/test_quickfix.vim
|
||||
|
||||
Patch 8.0.0027
|
||||
Problem: A channel is closed when reading on stderr or stdout fails, but
|
||||
there may still be something to read on another part.
|
||||
Solution: Turn ch_to_be_closed into a bitfield. (Ozaki Kiichi)
|
||||
Files: src/channel.c, src/eval.c, src/structs.h, src/proto/channel.pro,
|
||||
src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0028
|
||||
Problem: Superfluous semicolons.
|
||||
Solution: Remove them. (Ozaki Kiichi)
|
||||
Files: src/ex_cmds2.c
|
||||
|
||||
Patch 8.0.0029
|
||||
Problem: Code for MS-Windows is complicated because of the exceptions for
|
||||
old systems.
|
||||
Solution: Drop support for MS-Windows older than Windows XP. (Ken Takata)
|
||||
Files: runtime/doc/gui_w32.txt, runtime/doc/os_win32.txt,
|
||||
runtime/doc/todo.txt, src/GvimExt/Makefile, src/Make_mvc.mak,
|
||||
src/evalfunc.c, src/ex_cmds.c, src/ex_docmd.c, src/gui_w32.c,
|
||||
src/if_cscope.c, src/misc1.c, src/misc2.c, src/option.c,
|
||||
src/os_mswin.c, src/os_win32.c, src/os_win32.h,
|
||||
src/proto/os_mswin.pro, src/proto/os_win32.pro, src/version.c
|
||||
|
||||
Patch 8.0.0030
|
||||
Problem: Mouse mode is not automatically detected for tmux.
|
||||
Solution: Check for 'term' to be "tmux". (Michael Henry)
|
||||
Files: src/os_unix.c
|
||||
|
||||
Patch 8.0.0031
|
||||
Problem: After ":bwipeout" 'fileformat' is not set to the right default.
|
||||
Solution: Get the default from 'fileformats'. (Mike Williams)
|
||||
Files: src/option.c, src/Makefile, src/testdir/test_fileformat.vim,
|
||||
src/testdir/test_alot.vim
|
||||
|
||||
Patch 8.0.0032
|
||||
Problem: Tests may change the input file when something goes wrong.
|
||||
Solution: Avoid writing the input file.
|
||||
Files: src/testdir/test51.in, src/testdir/test67.in,
|
||||
src/testdir/test97.in, src/testdir/test_tabpage.vim
|
||||
|
||||
Patch 8.0.0033
|
||||
Problem: Cannot use overlapping positions with matchaddpos().
|
||||
Solution: Check end of match. (Ozaki Kiichi) Add a test (Hirohito Higashi)
|
||||
Files: src/screen.c, src/testdir/test_match.vim
|
||||
|
||||
Patch 8.0.0034
|
||||
Problem: No completion for ":messages".
|
||||
Solution: Complete "clear" argument. (Hirohito Higashi)
|
||||
Files: src/ex_docmd.c, src/ex_getln.c, src/proto/ex_docmd.pro,
|
||||
src/testdir/test_cmdline.vim, src/vim.h,
|
||||
runtime/doc/eval.txt, runtime/doc/map.txt
|
||||
|
||||
Patch 8.0.0035 (after 7.4.2013)
|
||||
Problem: Order of matches for 'omnifunc' is messed up. (Danny Su)
|
||||
Solution: Do not set compl_curr_match when called from complete_check().
|
||||
(closes #1168)
|
||||
Files: src/edit.c, src/evalfunc.c, src/proto/edit.pro, src/search.c,
|
||||
src/spell.c, src/tag.c, src/testdir/test76.in,
|
||||
src/testdir/test76.ok, src/testdir/test_popup.vim, src/Makefile,
|
||||
src/testdir/Make_all.mak
|
||||
|
||||
Patch 8.0.0036
|
||||
Problem: Detecting that a job has finished may take a while.
|
||||
Solution: Check for a finished job more often (Ozaki Kiichi)
|
||||
Files: src/channel.c, src/os_unix.c, src/os_win32.c,
|
||||
src/proto/os_unix.pro, src/proto/os_win32.pro,
|
||||
src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0037
|
||||
Problem: Get E924 when switching tabs. ()
|
||||
Solution: Use win_valid_any_tab() instead of win_valid(). (Martin Vuille,
|
||||
closes #1167, closes #1171)
|
||||
Files: src/quickfix.c, src/testdir/test_quickfix.vim
|
||||
|
||||
Patch 8.0.0038
|
||||
Problem: OPEN_CHR_FILES not defined for FreeBSD using Debian userland
|
||||
files.
|
||||
Solution: Check for __FreeBSD_kernel__. (James McCoy, closes #1166)
|
||||
Files: src/vim.h
|
||||
|
||||
Patch 8.0.0039
|
||||
Problem: When Vim 8 reads an old viminfo and exits, the next time marks are
|
||||
not read from viminfo. (Ned Batchelder)
|
||||
Solution: Set a mark when it wasn't set before, even when the timestamp is
|
||||
zero. (closes #1170)
|
||||
Files: src/mark.c, src/testdir/test_viminfo.vim
|
||||
|
||||
Patch 8.0.0040 (after 8.0.0033)
|
||||
Problem: Whole line highlighting with matchaddpos() does not work.
|
||||
Solution: Check for zero length. (Hirohito Higashi)
|
||||
Files: src/screen.c, src/testdir/test_match.vim
|
||||
|
||||
Patch 8.0.0041
|
||||
Problem: When using Insert mode completion but not actually inserting
|
||||
anything an undo item is still created. (Tommy Allen)
|
||||
Solution: Do not call stop_arrow() when not inserting anything.
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0042 (after 8.0.0041)
|
||||
Problem: When using Insert mode completion with 'completeopt' containing
|
||||
"noinsert" change is not saved for undo. (Tommy Allen)
|
||||
Solution: Call stop_arrow() before inserting for pressing Enter.
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0043 (after 8.0.0041)
|
||||
Problem: When using Insert mode completion with 'completeopt' containing
|
||||
"noinsert" with CTRL-N the change is not saved for undo. (Tommy
|
||||
Allen)
|
||||
Solution: Call stop_arrow() before inserting for any key.
|
||||
Files: src/edit.c, src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0044
|
||||
Problem: In diff mode the cursor may end up below the last line, resulting
|
||||
in an ml_get error.
|
||||
Solution: Check the line to be valid.
|
||||
Files: src/move.c, src/diff.c, src/proto/diff.pro,
|
||||
src/testdir/test_diffmode.vim
|
||||
|
||||
Patch 8.0.0045
|
||||
Problem: Calling job_stop() right after job_start() does not work.
|
||||
Solution: Block signals while fork is still busy. (Ozaki Kiichi, closes
|
||||
#1155)
|
||||
Files: src/auto/configure, src/config.h.in, src/configure.in,
|
||||
src/os_unix.c, src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0046
|
||||
Problem: Using NUL instead of NULL.
|
||||
Solution: Change to NULL. (Dominique Pelle)
|
||||
Files: src/ex_cmds.c, src/json.c
|
||||
|
||||
Patch 8.0.0047
|
||||
Problem: Crash when using the preview window from an unnamed buffer.
|
||||
(lifepillar)
|
||||
Solution: Do not clear the wrong buffer. (closes #1200)
|
||||
Files: src/popupmnu.c
|
||||
|
||||
Patch 8.0.0048
|
||||
Problem: On Windows job_stop() stops cmd.exe, not the processes it runs.
|
||||
(Linwei)
|
||||
Solution: Iterate over all processes and terminate the one where the parent
|
||||
is the job process. (Yasuhiro Matsumoto, closes #1184)
|
||||
Files: src/os_win32.c, src/structs.h
|
||||
|
||||
Patch 8.0.0049
|
||||
Problem: When a match ends in part of concealed text highlighting, it might
|
||||
mess up concealing by resetting prev_syntax_id.
|
||||
Solution: Do not reset prev_syntax_id and add a test to verify. (Christian
|
||||
Brabandt, closes #1092)
|
||||
Files: src/screen.c, src/testdir/test_matchadd_conceal.vim
|
||||
|
||||
Patch 8.0.0050
|
||||
Problem: An exiting job is detected with a large latency.
|
||||
Solution: Check for pending job more often. (Ozaki Kiichi) Change the
|
||||
double loop in mch_inchar() into one.
|
||||
Files: src/channel.c, src/os_unix.c, src/testdir/shared.vim,
|
||||
src/testdir/test_channel.vim
|
||||
|
||||
Patch 8.0.0051 (after 8.0.0048)
|
||||
Problem: New code for job_stop() breaks channel test on AppVeyor.
|
||||
Solution: Revert the change.
|
||||
Files: src/os_win32.c, src/structs.h
|
||||
|
||||
Patch 8.0.0052 (after 8.0.0049)
|
||||
Problem: Conceal test passes even without the bug fix.
|
||||
Solution: Add a redraw command. (Christian Brabandt)
|
||||
Files: src/testdir/test_matchadd_conceal.vim
|
||||
|
||||
Patch 8.0.0053 (after 8.0.0047)
|
||||
Problem: No test for what 8.0.0047 fixes.
|
||||
Solution: Add a test. (Hirohito Higashi)
|
||||
Files: src/testdir/test_popup.vim
|
||||
|
||||
Patch 8.0.0054 (after 8.0.0051)
|
||||
Problem: On Windows job_stop() stops cmd.exe, not the processes it runs.
|
||||
(Linwei)
|
||||
Solution: Iterate over all processes and terminate the one where the parent
|
||||
is the job process. Now only when there is no job object.
|
||||
(Yasuhiro Matsumoto, closes #1203)
|
||||
Files: src/os_win32.c
|
||||
|
||||
Patch 8.0.0055
|
||||
Problem: Minor comment and style deficiencies.
|
||||
Solution: Update comments and fix style.
|
||||
Files: src/buffer.c, src/misc2.c, src/os_unix.c
|
||||
|
||||
Patch 8.0.0056
|
||||
Problem: When setting 'filetype' there is no check for a valid name.
|
||||
Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
|
||||
Files: src/option.c, src/testdir/test_options.vim
|
||||
|
||||
Patch 8.0.0057 (after 8.0.0056)
|
||||
Problem: Tests fail without the 'keymap' features.
|
||||
Solution: Check for feature in test.
|
||||
Files: src/testdir/test_options.vim
|
||||
|
||||
Patch 8.0.0058
|
||||
Problem: Positioning of the popup menu is not good.
|
||||
Solution: Position it better. (Hirohito Higashi)
|
||||
Files: src/popupmnu.c
|
||||
|
||||
Patch 8.0.0059
|
||||
Problem: Vim does not build on VMS systems.
|
||||
Solution: Various changes for VMS. (Zoltan Arpadffy)
|
||||
Files: src/json.c, src/macros.h, src/Make_vms.mms, src/os_unix.c,
|
||||
src/os_unix.h, src/os_vms.c, src/os_vms_conf.h,
|
||||
src/proto/os_vms.pro, src/testdir/Make_vms.mms
|
||||
|
||||
Patch 8.0.0060
|
||||
Problem: When using an Ex command for 'keywordprg' it is escaped as with a
|
||||
shell command. (Romain Lafourcade)
|
||||
Solution: Escape for an Ex command. (closes #1175)
|
||||
Files: src/normal.c, src/testdir/test_normal.vim
|
||||
|
||||
Patch 8.0.0061 (after 8.0.0058)
|
||||
Problem: Compiler warning for unused variable.
|
||||
Solution: Add #ifdef. (John Marriott)
|
||||
Files: src/popupmnu.c
|
||||
|
||||
Patch 8.0.0062
|
||||
Problem: No digraph for HORIZONTAL ELLIPSIS.
|
||||
Solution: Use ",.". (Hans Ginzel, closes #1226)
|
||||
Files: src/digraph.c, runtime/doc/digraph.txt
|
||||
|
||||
Patch 8.0.0063
|
||||
Problem: Compiler warning for comparing with unsigned. (Zoltan Arpadffy)
|
||||
Solution: Change <= to ==.
|
||||
Files: src/undo.c
|
||||
|
||||
Patch 8.0.0064 (after 8.0.0060)
|
||||
Problem: Normal test fails on MS-Windows.
|
||||
Solution: Don't try using an illegal file name.
|
||||
Files: src/testdir/test_normal.vim
|
||||
|
||||
Patch 8.0.0065 (after 8.0.0056)
|
||||
Problem: Compiler warning for unused function in tiny build. (Tony
|
||||
Mechelynck)
|
||||
Solution: Add #ifdef.
|
||||
Files: src/option.c
|
||||
|
||||
Patch 8.0.0066
|
||||
Problem: when calling an operator function when 'linebreak' is set, it is
|
||||
internally reset before calling the operator function.
|
||||
Solution: Restore 'linebreak' before calling op_function(). (Christian
|
||||
Brabandt)
|
||||
Files: src/normal.c, src/testdir/test_normal.vim
|
||||
|
||||
Patch 8.0.0067
|
||||
Problem: VMS has a problem with infinity.
|
||||
Solution: Avoid an overflow. (Zoltan Arpadffy)
|
||||
Files: src/json.c, src/macros.h
|
||||
|
||||
Patch 8.0.0068
|
||||
Problem: Checking did_throw after executing autocommands is wrong. (Daniel
|
||||
Hahler)
|
||||
Solution: Call aborting() instead, and only when autocommands were executed.
|
||||
Files: src/quickfix.c, src/if_cscope.c, src/testdir/test_quickfix.vim
|
||||
|
||||
Patch 8.0.0069
|
||||
Problem: Compiler warning for self-comparison.
|
||||
Solution: Define ONE_WINDOW and add #ifdef.
|
||||
Files: src/globals.h, src/buffer.c, src/ex_docmd.c, src/move.c,
|
||||
src/screen.c, src/quickfix.c, src/window.c
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -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,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Oct 15
|
||||
" Last Change: 2016 Oct 31
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -862,7 +862,7 @@ au BufNewFile,BufRead *.ht setf haste
|
||||
au BufNewFile,BufRead *.htpp setf hastepreproc
|
||||
|
||||
" Hercules
|
||||
au BufNewFile,BufRead *.vc,*.ev,*.rs,*.sum,*.errsum setf hercules
|
||||
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
|
||||
|
||||
" HEX (Intel)
|
||||
au BufNewFile,BufRead *.hex,*.h32 setf hex
|
||||
@@ -1760,6 +1760,9 @@ au BufNewFile,BufRead *.rb,*.rbw setf ruby
|
||||
" RubyGems
|
||||
au BufNewFile,BufRead *.gemspec setf ruby
|
||||
|
||||
" Rust
|
||||
au BufNewFile,BufRead *.rs setf rust
|
||||
|
||||
" Rackup
|
||||
au BufNewFile,BufRead *.ru setf ruby
|
||||
|
||||
@@ -2668,6 +2671,9 @@ au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc')
|
||||
" Nroff macros
|
||||
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
|
||||
|
||||
" OpenBSD hostname.if
|
||||
au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config')
|
||||
|
||||
" Pam conf
|
||||
au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf')
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: ConTeXt typesetting engine
|
||||
" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
" Former Maintainers: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2016 Oct 14
|
||||
" Latest Revision: 2016 Oct 30
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -21,7 +21,7 @@ let b:undo_ftplugin = "setl com< cms< def< inc< sua< fo< ofu<"
|
||||
|
||||
setlocal comments=b:%D,b:%C,b:%M,:% commentstring=%\ %s formatoptions+=tjcroql2
|
||||
if get(b:, 'context_metapost', get(g:, 'context_metapost', 1))
|
||||
setlocal omnifunc=context#complete
|
||||
setlocal omnifunc=contextcomplete#Complete
|
||||
let g:omni_syntax_group_include_context = 'mf\w\+,mp\w\+'
|
||||
let g:omni_syntax_group_exclude_context = 'mfTodoComment'
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.46
|
||||
" Last Change: 2016 Sep. 27
|
||||
" Version: 47
|
||||
" Last Change: 2016 Oct. 29
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-indent from Vim
|
||||
" Credits:
|
||||
@@ -100,9 +100,9 @@ function FortranGetIndent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
"Add a shiftwidth to statements following if, else, else if, case,
|
||||
"Add a shiftwidth to statements following if, else, else if, case, class,
|
||||
"where, else where, forall, type, interface and associate statements
|
||||
if prevstat =~? '^\s*\(case\|else\|else\s*if\|else\s*where\)\>'
|
||||
if prevstat =~? '^\s*\(case\|class\|else\|else\s*if\|else\s*where\)\>'
|
||||
\ ||prevstat=~? '^\s*\(type\|interface\|associate\|enum\)\>'
|
||||
\ ||prevstat=~?'^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*\(forall\|where\|block\)\>'
|
||||
\ ||prevstat=~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>'
|
||||
@@ -136,11 +136,11 @@ function FortranGetIndent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
"Subtract a shiftwidth from else, else if, elsewhere, case, end if,
|
||||
"Subtract a shiftwidth from else, else if, elsewhere, case, class, end if,
|
||||
" end where, end select, end forall, end interface, end associate,
|
||||
" end enum, end type, end block and end type statements
|
||||
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
|
||||
\. '\(else\|else\s*if\|else\s*where\|case\|'
|
||||
\. '\(else\|else\s*if\|else\s*where\|case\|class\|'
|
||||
\. 'end\s*\(if\|where\|select\|interface\|'
|
||||
\. 'type\|forall\|associate\|enum\|block\)\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
|
||||
@@ -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)
|
||||
|
||||
+10
-2
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2010 Mar 10
|
||||
" Last Change: 2016 Oct 30
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded
|
||||
@@ -20,25 +20,33 @@ augroup gzip
|
||||
"
|
||||
" Set binary mode before reading the file.
|
||||
" Use "gzip -d", gunzip isn't always available.
|
||||
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin
|
||||
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst setlocal bin
|
||||
autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
|
||||
autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
|
||||
autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
|
||||
autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d")
|
||||
autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d")
|
||||
autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d")
|
||||
autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm")
|
||||
autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
|
||||
autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
|
||||
autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
|
||||
autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z")
|
||||
autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z")
|
||||
autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip")
|
||||
autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm")
|
||||
autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
|
||||
autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
|
||||
autocmd FileAppendPre *.Z call gzip#appre("uncompress")
|
||||
autocmd FileAppendPre *.lzma call gzip#appre("lzma -d")
|
||||
autocmd FileAppendPre *.xz call gzip#appre("xz -d")
|
||||
autocmd FileAppendPre *.lz call gzip#appre("lzip -d")
|
||||
autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm")
|
||||
autocmd FileAppendPost *.gz call gzip#write("gzip")
|
||||
autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
|
||||
autocmd FileAppendPost *.Z call gzip#write("compress -f")
|
||||
autocmd FileAppendPost *.lzma call gzip#write("lzma -z")
|
||||
autocmd FileAppendPost *.xz call gzip#write("xz -z")
|
||||
autocmd FileAppendPost *.lz call gzip#write("lzip")
|
||||
autocmd FileAppendPost *.zst call gzip#write("zstd --rm")
|
||||
augroup END
|
||||
|
||||
+10
-10
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Oct 27
|
||||
" 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*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell 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 "<[^>]*>"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2016 Jul 07
|
||||
" Last Change: 2016 Oct 28
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -31,7 +31,7 @@ syn keyword cppConstant __cplusplus
|
||||
" C++ 11 extensions
|
||||
if !exists("cpp_no_cpp11")
|
||||
syn keyword cppModifier override final
|
||||
syn keyword cppType nullptr_t
|
||||
syn keyword cppType nullptr_t auto
|
||||
syn keyword cppExceptions noexcept
|
||||
syn keyword cppStorageClass constexpr decltype thread_local
|
||||
syn keyword cppConstant nullptr
|
||||
@@ -46,7 +46,11 @@ endif
|
||||
|
||||
" C++ 14 extensions
|
||||
if !exists("cpp_no_cpp14")
|
||||
syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn case ignore
|
||||
syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn case match
|
||||
endif
|
||||
|
||||
" The minimum and maximum operators in GNU C++
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 0.99
|
||||
" Last Change: 2016 Sep. 23
|
||||
" Version: 100
|
||||
" Last Change: 2016 Oct. 29
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-syntax from Vim
|
||||
" Credits:
|
||||
@@ -397,6 +397,7 @@ if exists("fortran_fold")
|
||||
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
|
||||
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
|
||||
else
|
||||
@@ -406,6 +407,7 @@ if exists("fortran_fold")
|
||||
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\s*[!#].*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction
|
||||
syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
|
||||
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
|
||||
endif
|
||||
@@ -415,12 +417,12 @@ if exists("fortran_fold")
|
||||
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
else
|
||||
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(\(.\|&\s*\n\)\+)\(\s\|&\s*\n\)*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
+52
-45
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2016 Sep 14
|
||||
" Last Change: 2016 Oct 29
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
@@ -46,6 +46,29 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists("python_no_doctest_highlight")
|
||||
let python_no_doctest_code_highlight = 1
|
||||
endif
|
||||
|
||||
if exists("python_highlight_all")
|
||||
if exists("python_no_builtin_highlight")
|
||||
unlet python_no_builtin_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_code_highlight")
|
||||
unlet python_no_doctest_code_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_highlight")
|
||||
unlet python_no_doctest_highlight
|
||||
endif
|
||||
if exists("python_no_exception_highlight")
|
||||
unlet python_no_exception_highlight
|
||||
endif
|
||||
if exists("python_no_number_highlight")
|
||||
unlet python_no_number_highlight
|
||||
endif
|
||||
let python_space_error_highlight = 1
|
||||
endif
|
||||
|
||||
" Keep Python keywords in alphabetical order inside groups for easy
|
||||
" comparison with the table in the 'Python Language Reference'
|
||||
" https://docs.python.org/2/reference/lexical_analysis.html#keywords,
|
||||
@@ -81,30 +104,31 @@ syn keyword pythonInclude from import
|
||||
syn keyword pythonAsync async await
|
||||
|
||||
" Decorators (new in Python 2.4)
|
||||
" Python 3.5 introduced the use of the same symbol for matrix
|
||||
" multiplication. We now have to exclude the symbol from being
|
||||
" highlighted when used in that context. Hence, the check that it's
|
||||
" preceded by empty space only (possibly in a docstring/doctest) and
|
||||
" followed by decorator name, optional parenthesized list of arguments,
|
||||
" and the next line with either def, class, or another decorator.
|
||||
syn match pythonDecorator
|
||||
\ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@="
|
||||
\ display nextgroup=pythonDecoratorName skipwhite
|
||||
|
||||
" A dot must be allowed because of @MyClass.myfunc decorators.
|
||||
" It must be preceded by a decorator symbol and on a separate line from
|
||||
" a function/class it decorates.
|
||||
syn match pythonDecoratorName
|
||||
\ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\)\@="
|
||||
\ contained display nextgroup=pythonFunction skipnl
|
||||
syn match pythonDecorator "@" display contained
|
||||
syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator
|
||||
|
||||
" The zero-length non-grouping match of def or class before the function
|
||||
" name is extremely important in pythonFunction. Without it, everything
|
||||
" is interpreted as a function inside the contained environment of
|
||||
" doctests.
|
||||
syn match pythonFunction
|
||||
\ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\%(def\|class\)\s\+\)\@<=\h\w*"
|
||||
\ contained
|
||||
" Python 3.5 introduced the use of the same symbol for matrix multiplication:
|
||||
" https://www.python.org/dev/peps/pep-0465/. We now have to exclude the
|
||||
" symbol from highlighting when used in that context.
|
||||
" Single line multiplication.
|
||||
syn match pythonMatrixMultiply
|
||||
\ "\%(\w\|[])]\)\s*@"
|
||||
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
|
||||
\ transparent
|
||||
" Multiplication continued on the next line after backslash.
|
||||
syn match pythonMatrixMultiply
|
||||
\ "[^\\]\\\s*\n\%(\s*\.\.\.\s\)\=\s\+@"
|
||||
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
|
||||
\ transparent
|
||||
" Multiplication in a parenthesized expression over multiple lines with @ at
|
||||
" the start of each continued line; very similar to decorators and complex.
|
||||
syn match pythonMatrixMultiply
|
||||
\ "^\s*\%(\%(>>>\|\.\.\.\)\s\+\)\=\zs\%(\h\|\%(\h\|[[(]\).\{-}\%(\w\|[])]\)\)\s*\n\%(\s*\.\.\.\s\)\=\s\+@\%(.\{-}\n\%(\s*\.\.\.\s\)\=\s\+@\)*"
|
||||
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
|
||||
\ transparent
|
||||
|
||||
syn match pythonFunction "\h\w*" display contained
|
||||
|
||||
syn match pythonComment "#.*$" contains=pythonTodo,@Spell
|
||||
syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
|
||||
@@ -131,25 +155,6 @@ syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
|
||||
syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
|
||||
syn match pythonEscape "\\$"
|
||||
|
||||
if exists("python_highlight_all")
|
||||
if exists("python_no_builtin_highlight")
|
||||
unlet python_no_builtin_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_code_highlight")
|
||||
unlet python_no_doctest_code_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_highlight")
|
||||
unlet python_no_doctest_highlight
|
||||
endif
|
||||
if exists("python_no_exception_highlight")
|
||||
unlet python_no_exception_highlight
|
||||
endif
|
||||
if exists("python_no_number_highlight")
|
||||
unlet python_no_number_highlight
|
||||
endif
|
||||
let python_space_error_highlight = 1
|
||||
endif
|
||||
|
||||
" It is very important to understand all details before changing the
|
||||
" regular expressions below or their order.
|
||||
" The word boundaries are *not* the floating-point number boundaries
|
||||
@@ -213,7 +218,9 @@ if !exists("python_no_builtin_highlight")
|
||||
" non-essential built-in functions; Python 2 only
|
||||
syn keyword pythonBuiltin apply buffer coerce intern
|
||||
" avoid highlighting attributes as builtins
|
||||
syn match pythonAttribute /\.\h\w*/hs=s+1 contains=ALLBUT,pythonBuiltin transparent
|
||||
syn match pythonAttribute /\.\h\w*/hs=s+1
|
||||
\ contains=ALLBUT,pythonBuiltin,pythonFunction,pythonAsync
|
||||
\ transparent
|
||||
endif
|
||||
|
||||
" From the 'Python Library Reference' class hierarchy at the bottom.
|
||||
@@ -275,7 +282,7 @@ if !exists("python_no_doctest_highlight")
|
||||
if !exists("python_no_doctest_code_highlight")
|
||||
syn region pythonDoctest
|
||||
\ start="^\s*>>>\s" end="^\s*$"
|
||||
\ contained contains=ALLBUT,pythonDoctest,@Spell
|
||||
\ contained contains=ALLBUT,pythonDoctest,pythonFunction,@Spell
|
||||
syn region pythonDoctestValue
|
||||
\ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$"
|
||||
\ contained
|
||||
@@ -287,7 +294,7 @@ if !exists("python_no_doctest_highlight")
|
||||
endif
|
||||
|
||||
" Sync at the beginning of class, function, or method definition.
|
||||
syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*("
|
||||
syn sync match pythonSync grouphere NONE "^\%(def\|class\)\s\+\h\w*\s*[(:]"
|
||||
|
||||
" The default highlight links. Can be overridden later.
|
||||
hi def link pythonStatement Statement
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Sep 25
|
||||
" Last Change: 2016 Nov 04
|
||||
|
||||
" This file sets up for syntax highlighting.
|
||||
" It is loaded from "syntax.vim" and "manual.vim".
|
||||
@@ -69,8 +69,11 @@ au Syntax c,cpp,cs,idl,java,php,datascript
|
||||
|
||||
|
||||
" Source the user-specified syntax highlighting file
|
||||
if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile))
|
||||
execute "source " . mysyntaxfile
|
||||
if exists("mysyntaxfile")
|
||||
let s:fname = expand(mysyntaxfile)
|
||||
if filereadable(s:fname)
|
||||
execute "source " . fnameescape(s:fname)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Restore 'cpoptions'
|
||||
|
||||
@@ -61,8 +61,8 @@ NOTE : Les touches fl
|
||||
Ceci quitte l'éditeur SANS enregistrer les changements que vous avez
|
||||
faits.
|
||||
|
||||
3. Lorsque l'invite du shell vous sera présentée, tapez la commande qui
|
||||
vous a mené dans ce tutoriel. Cela pourrait être : vimtutor <Entrée>
|
||||
3. Revenez ici en tapant la commande qui vous a mené à ce tutoriel.
|
||||
Cela pourrait être : vimtutor <Entrée>
|
||||
|
||||
4. Si vous avez mémorisé ces étapes et êtes confiant, effectuez les étapes
|
||||
1 à 3 pour sortir puis rentrer dans l'éditeur.
|
||||
@@ -154,7 +154,7 @@ NOTE : En avan
|
||||
!! NOTE : Lisez toute la leçon avant d'exécuter les instructions ci-dessous !!
|
||||
|
||||
1. Sortez de ce tutoriel comme vous l'avez fait dans la Leçon 1.2 : :q!
|
||||
Ou, si vous avez accès à un autre terminal, exécutez y les actions
|
||||
Ou, si vous avez accès à un autre terminal, exécutez-y les actions
|
||||
qui suivent.
|
||||
|
||||
2. À l'invite du shell, tapez cette commande : vim tutor <Entrée>
|
||||
@@ -704,7 +704,7 @@ NOTE : Si vous quittez Vim et le red
|
||||
3. Appuyez : . En bas de l'écran :'<,'> va apparaître.
|
||||
|
||||
4. Tapez w TEST , où TEST est un nom de fichier qui n'existe pas.
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur <Entrée>.
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant d'appuyer sur <Entrée>.
|
||||
|
||||
5. Vim va enregistrer les lignes sélectionnées dans le fichier TEST.
|
||||
Utilisez :!dir ou :!ls pour le voir. Ne l'effacez pas encore !
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le compl
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2016 Jul 02
|
||||
Last Change : 2016 Nov 08
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -61,8 +61,8 @@ NOTE : Les touches fléchées devraient également fonctionner. Mais en utilisan
|
||||
Ceci quitte l'éditeur SANS enregistrer les changements que vous avez
|
||||
faits.
|
||||
|
||||
3. Lorsque l'invite du shell vous sera présentée, tapez la commande qui
|
||||
vous a mené dans ce tutoriel. Cela pourrait être : vimtutor <Entrée>
|
||||
3. Revenez ici en tapant la commande qui vous a mené à ce tutoriel.
|
||||
Cela pourrait être : vimtutor <Entrée>
|
||||
|
||||
4. Si vous avez mémorisé ces étapes et êtes confiant, effectuez les étapes
|
||||
1 à 3 pour sortir puis rentrer dans l'éditeur.
|
||||
@@ -154,7 +154,7 @@ NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par
|
||||
!! NOTE : Lisez toute la leçon avant d'exécuter les instructions ci-dessous !!
|
||||
|
||||
1. Sortez de ce tutoriel comme vous l'avez fait dans la Leçon 1.2 : :q!
|
||||
Ou, si vous avez accès à un autre terminal, exécutez y les actions
|
||||
Ou, si vous avez accès à un autre terminal, exécutez-y les actions
|
||||
qui suivent.
|
||||
|
||||
2. À l'invite du shell, tapez cette commande : vim tutor <Entrée>
|
||||
@@ -704,7 +704,7 @@ NOTE : Si vous quittez Vim et le redémarrez de nouveau avec le fichier TEST,
|
||||
3. Appuyez : . En bas de l'écran :'<,'> va apparaître.
|
||||
|
||||
4. Tapez w TEST , où TEST est un nom de fichier qui n'existe pas.
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant de d'appuyer sur <Entrée>.
|
||||
Vérifiez que vous voyez :'<,'>w TEST avant d'appuyer sur <Entrée>.
|
||||
|
||||
5. Vim va enregistrer les lignes sélectionnées dans le fichier TEST.
|
||||
Utilisez :!dir ou :!ls pour le voir. Ne l'effacez pas encore !
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2016 Jul 02
|
||||
Last Change : 2016 Nov 08
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
+2
-2
@@ -221,8 +221,8 @@ diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
The file `configure.ac' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.ac' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>114</string>
|
||||
<string>119</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)
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
CGPoint *positions;
|
||||
NSMutableArray *fontCache;
|
||||
|
||||
BOOL cgLayerEnabled;
|
||||
CGLayerRef cgLayer;
|
||||
CGContextRef cgLayerContext;
|
||||
NSLock *cgLayerLock;
|
||||
|
||||
// These are used in MMCoreTextView+ToolTip.m
|
||||
id trackingRectOwner_; // (not retained)
|
||||
void *trackingRectUserData_;
|
||||
@@ -85,6 +90,7 @@
|
||||
- (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
|
||||
- (NSRect)rectForRow:(int)row column:(int)column numRows:(int)nr
|
||||
numColumns:(int)nc;
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled;
|
||||
|
||||
//
|
||||
// NSTextView methods
|
||||
|
||||
+154
-25
@@ -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,25 +590,117 @@ defaultAdvanceForFont(NSFont *font)
|
||||
NSGraphicsContext *context = [NSGraphicsContext currentContext];
|
||||
[context setShouldAntialias:antialias];
|
||||
|
||||
id data;
|
||||
NSEnumerator *e = [drawData objectEnumerator];
|
||||
while ((data = [e nextObject]))
|
||||
[self batchDrawData:data];
|
||||
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;
|
||||
NSRect drawRect = NSMakeRect(
|
||||
0,
|
||||
frameSize.height - cgLayerSize.height,
|
||||
cgLayerSize.width,
|
||||
cgLayerSize.height);
|
||||
|
||||
[drawData removeAllObjects];
|
||||
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
|
||||
{
|
||||
cgLayerEnabled = enabled;
|
||||
|
||||
if (!cgLayerEnabled)
|
||||
[self releaseCGLayer];
|
||||
}
|
||||
|
||||
- (void)releaseCGLayer
|
||||
{
|
||||
if (cgLayer) {
|
||||
CGLayerRelease(cgLayer);
|
||||
cgLayer = nil;
|
||||
cgLayerContext = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (CGLayerRef)getCGLayer
|
||||
{
|
||||
NSParameterAssert(cgLayerEnabled);
|
||||
if (!cgLayer && [self lockFocusIfCanDraw]) {
|
||||
NSGraphicsContext *context = [NSGraphicsContext currentContext];
|
||||
NSRect frame = [self frame];
|
||||
cgLayer = CGLayerCreateWithContext(
|
||||
[context graphicsPort], frame.size, NULL);
|
||||
[self unlockFocus];
|
||||
}
|
||||
return cgLayer;
|
||||
}
|
||||
|
||||
- (CGContextRef)getCGContext
|
||||
{
|
||||
if (cgLayerEnabled) {
|
||||
if (!cgLayerContext)
|
||||
cgLayerContext = CGLayerGetContext([self getCGLayer]);
|
||||
return cgLayerContext;
|
||||
} else {
|
||||
return [[NSGraphicsContext currentContext] graphicsPort];
|
||||
}
|
||||
}
|
||||
|
||||
- (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
|
||||
{
|
||||
// TODO:
|
||||
@@ -852,7 +948,7 @@ defaultAdvanceForFont(NSFont *font)
|
||||
const void *end = bytes + [data length];
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
ASLogNotice(@"====> BEGIN %s", _cmd);
|
||||
ASLogNotice(@"====> BEGIN");
|
||||
#endif
|
||||
// TODO: Sanity check input
|
||||
|
||||
@@ -908,10 +1004,19 @@ defaultAdvanceForFont(NSFont *font)
|
||||
column:col
|
||||
numRows:height
|
||||
numColumns:width];
|
||||
[signImg drawInRect:r
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositingOperationSourceOver
|
||||
fraction:1.0];
|
||||
if (cgLayerEnabled) {
|
||||
CGContextRef context = [self getCGContext];
|
||||
CGImageRef cgImage = [signImg CGImageForProposedRect:&r
|
||||
context:nil
|
||||
hints:nil];
|
||||
CGContextDrawImage(context, r, cgImage);
|
||||
} else {
|
||||
[signImg drawInRect:r
|
||||
fromRect:NSZeroRect
|
||||
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);
|
||||
@@ -1013,11 +1118,11 @@ defaultAdvanceForFont(NSFont *font)
|
||||
}
|
||||
|
||||
#if MM_DEBUG_DRAWING
|
||||
ASLogNotice(@"<==== END %s", _cmd);
|
||||
ASLogNotice(@"<==== END");
|
||||
#endif
|
||||
}
|
||||
|
||||
static CTFontRef
|
||||
static CTFontRef
|
||||
lookupFont(NSMutableArray *fontCache, const unichar *chars, UniCharCount count,
|
||||
CTFontRef currFontRef)
|
||||
{
|
||||
@@ -1294,7 +1399,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
withFlags:(int)flags foregroundColor:(int)fg
|
||||
backgroundColor:(int)bg specialColor:(int)sp
|
||||
{
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef context = [self getCGContext];
|
||||
NSRect frame = [self bounds];
|
||||
float x = col*cellSize.width + insetSize.width;
|
||||
float y = frame.size.height - insetSize.height - (1+row)*cellSize.height;
|
||||
@@ -1408,12 +1513,30 @@ 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
|
||||
{
|
||||
NSSize delta={0, -count * cellSize.height};
|
||||
[self scrollRect:rect by:delta];
|
||||
if (cgLayerEnabled) {
|
||||
CGContextRef context = [self getCGContext];
|
||||
int yOffset = count * cellSize.height;
|
||||
NSRect clipRect = rect;
|
||||
clipRect.origin.y -= yOffset;
|
||||
|
||||
// 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];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)deleteLinesFromRow:(int)row lineCount:(int)count
|
||||
@@ -1455,7 +1578,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
- (void)clearBlockFromRow:(int)row1 column:(int)col1 toRow:(int)row2
|
||||
column:(int)col2 color:(int)color
|
||||
{
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef context = [self getCGContext];
|
||||
NSRect rect = [self rectFromRow:row1 column:col1 toRow:row2 column:col2];
|
||||
|
||||
CGContextSetRGBFillColor(context, RED(color), GREEN(color), BLUE(color),
|
||||
@@ -1464,11 +1587,13 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
CGContextSetBlendMode(context, kCGBlendModeCopy);
|
||||
CGContextFillRect(context, *(CGRect*)&rect);
|
||||
CGContextSetBlendMode(context, kCGBlendModeNormal);
|
||||
[self setNeedsDisplayCGLayerInRect:rect];
|
||||
}
|
||||
|
||||
- (void)clearAll
|
||||
{
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
[self releaseCGLayer];
|
||||
CGContextRef context = [self getCGContext];
|
||||
NSRect rect = [self bounds];
|
||||
float r = [defaultBackgroundColor redComponent];
|
||||
float g = [defaultBackgroundColor greenComponent];
|
||||
@@ -1479,12 +1604,14 @@ 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
|
||||
fraction:(int)percent color:(int)color
|
||||
{
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef context = [self getCGContext];
|
||||
NSRect rect = [self rectForRow:row column:col numRows:1 numColumns:1];
|
||||
|
||||
CGContextSaveGState(context);
|
||||
@@ -1526,6 +1653,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
CGContextFillRect(context, *(CGRect*)&rect);
|
||||
}
|
||||
|
||||
[self setNeedsDisplayCGLayerInRect:rect];
|
||||
CGContextRestoreGState(context);
|
||||
}
|
||||
|
||||
@@ -1533,7 +1661,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
numColumns:(int)ncols
|
||||
{
|
||||
// TODO: THIS CODE HAS NOT BEEN TESTED!
|
||||
CGContextRef cgctx = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef cgctx = [self getCGContext];
|
||||
CGContextSaveGState(cgctx);
|
||||
CGContextSetBlendMode(cgctx, kCGBlendModeDifference);
|
||||
CGContextSetRGBFillColor(cgctx, 1.0, 1.0, 1.0, 1.0);
|
||||
@@ -1542,6 +1670,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
|
||||
numColumns:ncols];
|
||||
CGContextFillRect(cgctx, *(CGRect*)&rect);
|
||||
|
||||
[self setNeedsDisplayCGLayerInRect:rect];
|
||||
CGContextRestoreGState(cgctx);
|
||||
}
|
||||
|
||||
|
||||
@@ -172,6 +172,8 @@ enum {
|
||||
oldPosition = [view frame].origin;
|
||||
|
||||
[view removeFromSuperviewWithoutNeedingDisplay];
|
||||
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12)
|
||||
[[view textView] setCGLayerEnabled:YES];
|
||||
[[self contentView] addSubview:view];
|
||||
[self setInitialFirstResponder:[view textView]];
|
||||
|
||||
@@ -284,6 +286,9 @@ enum {
|
||||
[view setFrameOrigin:oldPosition];
|
||||
[self close];
|
||||
|
||||
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12)
|
||||
[[view textView] setCGLayerEnabled:NO];
|
||||
|
||||
// Set the text view to initial first responder, otherwise the 'plus'
|
||||
// button on the tabline steals the first responder status.
|
||||
[target setInitialFirstResponder:[view textView]];
|
||||
|
||||
@@ -72,4 +72,5 @@
|
||||
// NOT IMPLEMENTED (only in Core Text renderer)
|
||||
- (void)deleteSign:(NSString *)signName;
|
||||
- (void)setToolTipAtMousePoint:(NSString *)string;
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled;
|
||||
@end
|
||||
|
||||
@@ -517,6 +517,11 @@
|
||||
// ONLY in Core Text!
|
||||
}
|
||||
|
||||
- (void)setCGLayerEnabled:(BOOL)enabled
|
||||
{
|
||||
// ONLY in Core Text!
|
||||
}
|
||||
|
||||
- (BOOL)isOpaque
|
||||
{
|
||||
return NO;
|
||||
|
||||
@@ -969,7 +969,6 @@
|
||||
- (void)windowDidBecomeMain:(NSNotification *)notification
|
||||
{
|
||||
[[MMAppController sharedInstance] setMainMenu:[vimController mainMenu]];
|
||||
[vimController sendMessage:GotFocusMsgID data:nil];
|
||||
|
||||
if ([vimView textView]) {
|
||||
NSFontManager *fm = [NSFontManager sharedFontManager];
|
||||
@@ -977,7 +976,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidResignMain:(NSNotification *)notification
|
||||
- (void)windowDidBecomeKey:(NSNotificationCenter *)notification
|
||||
{
|
||||
[vimController sendMessage:GotFocusMsgID data:nil];
|
||||
}
|
||||
|
||||
- (void)windowDidResignKey:(NSNotification *)notification
|
||||
{
|
||||
[vimController sendMessage:LostFocusMsgID data:nil];
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -297,6 +297,9 @@ CPU = ix86
|
||||
# Flag to turn on Win64 compatibility warnings for VC7.x and VC8.
|
||||
WP64CHECK = /Wp64
|
||||
|
||||
# Use multiprocess build
|
||||
USE_MP = yes
|
||||
|
||||
#>>>>> path of the compiler and linker; name of include and lib directories
|
||||
# PATH = c:\msvc20\bin;$(PATH)
|
||||
# INCLUDE = c:\msvc20\include
|
||||
@@ -473,6 +476,14 @@ NODEFAULTLIB =
|
||||
NODEFAULTLIB = /nodefaultlib
|
||||
!endif
|
||||
|
||||
# Use multiprocess build on MSVC 10
|
||||
!if "$(USE_MP)"=="yes"
|
||||
!if $(MSVC_MAJOR) >= 10
|
||||
CFLAGS = $(CFLAGS) /MP
|
||||
!endif
|
||||
!endif
|
||||
|
||||
|
||||
!ifdef NODEBUG
|
||||
VIM = vim
|
||||
!if "$(OPTIMIZE)" == "SPACE"
|
||||
|
||||
+43
-11
@@ -2,7 +2,7 @@
|
||||
# Makefile for Vim on OpenVMS
|
||||
#
|
||||
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
|
||||
# Last change: 2016 Jul 02
|
||||
# Last change: 2016 Nov 04
|
||||
#
|
||||
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
|
||||
# with MMS and MMK
|
||||
@@ -38,7 +38,7 @@ MODEL = HUGE
|
||||
# GUI or terminal mode executable.
|
||||
# Comment out if you want just the character terminal mode only.
|
||||
# GUI with Motif
|
||||
# GUI = YES
|
||||
GUI = YES
|
||||
|
||||
# GUI with GTK
|
||||
# If you have GTK installed you might want to enable this option.
|
||||
@@ -299,22 +299,22 @@ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
|
||||
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
|
||||
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
|
||||
|
||||
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
|
||||
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
|
||||
hardcopy.c hashtab.c json.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
|
||||
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
|
||||
ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
|
||||
hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
|
||||
misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c\
|
||||
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
|
||||
spell.c spellfile.c syntax.c tag.c term.c termlib.c ui.c undo.c userfunc.c version.c screen.c \
|
||||
window.c os_unix.c os_vms.c pathdef.c \
|
||||
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
|
||||
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
|
||||
|
||||
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digraph.obj edit.obj eval.obj \
|
||||
ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
|
||||
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj main.obj mark.obj \
|
||||
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj edit.obj eval.obj \
|
||||
evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
|
||||
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
|
||||
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
|
||||
move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
|
||||
regexp.obj search.obj sha256.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
|
||||
ui.obj undo.obj screen.obj version.obj window.obj os_unix.obj \
|
||||
regexp.obj search.obj sha256.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj \
|
||||
ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
|
||||
os_vms.obj pathdef.obj if_mzsch.obj\
|
||||
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
|
||||
$(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ)
|
||||
@@ -496,6 +496,18 @@ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
crypt.obj : crypt.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
crypt_zip.obj : crypt_zip.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
diff.obj : diff.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
@@ -512,6 +524,10 @@ eval.obj : eval.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
arabic.h version.h
|
||||
evalfunc.obj : evalfunc.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h version.h
|
||||
ex_cmds.obj : ex_cmds.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
@@ -569,6 +585,10 @@ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
arabic.h version.h
|
||||
list.obj : list.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
@@ -653,10 +673,18 @@ search.obj : search.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
sha256.obj : sha256.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
|
||||
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
globals.h farsi.h arabic.h
|
||||
spellfile.obj : spellfile.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
@@ -681,6 +709,10 @@ undo.obj : undo.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
|
||||
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
|
||||
arabic.h
|
||||
userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h farsi.h arabic.h
|
||||
version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
|
||||
+33
-11
@@ -681,13 +681,17 @@ SANITIZER_LIBS = $(SANITIZER_CFLAGS)
|
||||
#LEAK_CFLAGS = -DEXITFREE
|
||||
#LEAK_LIBS = -lccmalloc
|
||||
|
||||
# Uncomment this line to have Vim call abort() when an internal error is
|
||||
# detected. Useful when using a tool to find errors.
|
||||
#ABORT_CLFAGS = -DABORT_ON_INTERNAL_ERROR
|
||||
|
||||
#####################################################
|
||||
### Specific systems, check if yours is listed! ### {{{
|
||||
#####################################################
|
||||
|
||||
### Uncomment things here only if the values chosen by configure are wrong.
|
||||
### It's better to adjust configure.in and "make autoconf", if you can!
|
||||
### Then send the required changes to configure.in to the bugs list.
|
||||
### It's better to adjust configure.ac and "make autoconf", if you can!
|
||||
### Then send the required changes to configure.ac to the bugs list.
|
||||
|
||||
### (1) BSD/OS 2.0.1, 2.1 or 3.0 using shared libraries
|
||||
###
|
||||
@@ -1426,7 +1430,7 @@ SHELL = /bin/sh
|
||||
PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
|
||||
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(EXTRA_DEFS)
|
||||
|
||||
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(SANITIZER_CFLAGS) $(LEAK_CFLAGS) $(POST_DEFS)
|
||||
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(SANITIZER_CFLAGS) $(LEAK_CFLAGS) $(ABORT_CLFAGS) $(POST_DEFS)
|
||||
|
||||
# Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together
|
||||
# with "-E".
|
||||
@@ -1697,21 +1701,30 @@ OBJ = $(OBJ_COMMON) \
|
||||
objects/memfile.o \
|
||||
objects/message.o
|
||||
|
||||
JSON_TEST_OBJ = $(OBJ_COMMON) \
|
||||
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_JSON_TEST) $(OBJ_MEMFILE_TEST) $(OBJ_MESSAGE_TEST)
|
||||
|
||||
|
||||
PRO_AUTO = \
|
||||
arabic.pro \
|
||||
blowfish.pro \
|
||||
@@ -1845,7 +1858,7 @@ reconfig: scratch clean
|
||||
# - DO NOT RUN autoconf MANUALLY! It will overwrite ./configure instead of
|
||||
# producing auto/configure.
|
||||
# - autoconf is not run automatically, because a patch usually changes both
|
||||
# configure.in and auto/configure but can't update the timestamps. People
|
||||
# configure.ac and auto/configure but can't update the timestamps. People
|
||||
# who do not have (the correct version of) autoconf would run into trouble.
|
||||
#
|
||||
# Two tricks are required to make autoconf put its output in the "auto" dir:
|
||||
@@ -2042,7 +2055,6 @@ run_message_test: $(MESSAGE_TEST_TARGET)
|
||||
test1 \
|
||||
test_autocmd_option \
|
||||
test_autoformat_join \
|
||||
test_breakindent \
|
||||
test_changelist \
|
||||
test_close_count \
|
||||
test_comparators \
|
||||
@@ -2066,7 +2078,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)
|
||||
|
||||
@@ -2077,6 +2089,7 @@ test_arglist \
|
||||
test_autochdir \
|
||||
test_autocmd \
|
||||
test_backspace_opt \
|
||||
test_breakindent \
|
||||
test_bufwintabinfo \
|
||||
test_cdo \
|
||||
test_channel \
|
||||
@@ -2110,6 +2123,7 @@ test_arglist \
|
||||
test_gui \
|
||||
test_hardcopy \
|
||||
test_help_tagjump \
|
||||
test_hide \
|
||||
test_history \
|
||||
test_hlsearch \
|
||||
test_increment \
|
||||
@@ -2130,6 +2144,8 @@ test_arglist \
|
||||
test_matchadd_conceal_utf8 \
|
||||
test_menu \
|
||||
test_messages \
|
||||
test_mksession \
|
||||
test_mksession_utf8 \
|
||||
test_nested_function \
|
||||
test_netbeans \
|
||||
test_normal \
|
||||
@@ -2863,8 +2879,14 @@ 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:
|
||||
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
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ typedef union {
|
||||
/* MS-Windows is always little endian */
|
||||
#else
|
||||
# ifdef HAVE_CONFIG_H
|
||||
/* in configure.in AC_C_BIGENDIAN() defines WORDS_BIGENDIAN when needed */
|
||||
/* in configure.ac AC_C_BIGENDIAN() defines WORDS_BIGENDIAN when needed */
|
||||
# else
|
||||
error!
|
||||
Please change this code to define WORDS_BIGENDIAN for big-endian machines.
|
||||
@@ -426,7 +426,7 @@ bf_key_init(
|
||||
keylen = (int)STRLEN(key) / 2;
|
||||
if (keylen == 0)
|
||||
{
|
||||
EMSG(_("E831: bf_key_init() called with empty password"));
|
||||
IEMSG(_("E831: bf_key_init() called with empty password"));
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < keylen; i++)
|
||||
|
||||
+9
-8
@@ -451,7 +451,7 @@ close_buffer(
|
||||
int nwindows;
|
||||
bufref_T bufref;
|
||||
# ifdef FEAT_WINDOWS
|
||||
int is_curwin = (curwin!= NULL && curwin->w_buffer == buf);
|
||||
int is_curwin = (curwin != NULL && curwin->w_buffer == buf);
|
||||
win_T *the_curwin = curwin;
|
||||
tabpage_T *the_curtab = curtab;
|
||||
# endif
|
||||
@@ -1416,7 +1416,7 @@ do_buffer(
|
||||
# ifdef FEAT_AUTOCMD
|
||||
&& !(curwin->w_closing || curwin->w_buffer->b_locked > 0)
|
||||
# endif
|
||||
&& (firstwin != lastwin || first_tabpage->tp_next != NULL))
|
||||
&& (!ONE_WINDOW || first_tabpage->tp_next != NULL))
|
||||
{
|
||||
if (win_close(curwin, FALSE) == FAIL)
|
||||
break;
|
||||
@@ -1653,10 +1653,11 @@ set_curbuf(buf_T *buf, int action)
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (!apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf)
|
||||
# ifdef FEAT_EVAL
|
||||
|| (bufref_valid(&bufref) && !aborting()))
|
||||
|| (bufref_valid(&bufref) && !aborting())
|
||||
# else
|
||||
|| bufref_valid(&bufref))
|
||||
|| bufref_valid(&bufref)
|
||||
# endif
|
||||
)
|
||||
#endif
|
||||
{
|
||||
#ifdef FEAT_SYN_HL
|
||||
@@ -4867,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
|
||||
{
|
||||
@@ -4944,7 +4945,7 @@ do_arg_all(
|
||||
}
|
||||
#ifdef FEAT_WINDOWS
|
||||
/* don't close last window */
|
||||
if (firstwin == lastwin
|
||||
if (ONE_WINDOW
|
||||
&& (first_tabpage->tp_next == NULL || !had_tab))
|
||||
#endif
|
||||
use_firstwin = TRUE;
|
||||
@@ -5149,7 +5150,7 @@ ex_buffer_all(exarg_T *eap)
|
||||
: wp->w_width != Columns)
|
||||
|| (had_tab > 0 && wp != firstwin)
|
||||
#endif
|
||||
) && firstwin != lastwin
|
||||
) && !ONE_WINDOW
|
||||
#ifdef FEAT_AUTOCMD
|
||||
&& !(wp->w_closing || wp->w_buffer->b_locked > 0)
|
||||
#endif
|
||||
|
||||
+242
-74
@@ -19,7 +19,7 @@
|
||||
# define CH_HAS_GUI (gui.in_use || gui.starting)
|
||||
#endif
|
||||
|
||||
/* Note: when making changes here also adjust configure.in. */
|
||||
/* Note: when making changes here also adjust configure.ac. */
|
||||
#ifdef WIN32
|
||||
/* WinSock API is separated from C API, thus we can't use read(), write(),
|
||||
* errno... */
|
||||
@@ -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)
|
||||
{
|
||||
@@ -1362,7 +1363,7 @@ write_buf_line(buf_T *buf, linenr_T lnum, channel_T *channel)
|
||||
|
||||
p[len] = NL;
|
||||
p[len + 1] = NUL;
|
||||
channel_send(channel, PART_IN, p, len + 1, "write_buf_line()");
|
||||
channel_send(channel, PART_IN, p, len + 1, "write_buf_line");
|
||||
vim_free(p);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -3475,7 +3554,12 @@ channel_handle_events(void)
|
||||
* Return FAIL or OK.
|
||||
*/
|
||||
int
|
||||
channel_send(channel_T *channel, ch_part_T part, char_u *buf, int len, char *fun)
|
||||
channel_send(
|
||||
channel_T *channel,
|
||||
ch_part_T part,
|
||||
char_u *buf,
|
||||
int len,
|
||||
char *fun)
|
||||
{
|
||||
int res;
|
||||
sock_T fd;
|
||||
@@ -3835,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;
|
||||
|
||||
@@ -3879,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;
|
||||
@@ -3907,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.
|
||||
*/
|
||||
@@ -4273,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))
|
||||
@@ -4453,19 +4588,66 @@ job_free(job_T *job)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(EXITFREE) || defined(PROTO)
|
||||
void
|
||||
job_free_all(void)
|
||||
{
|
||||
while (first_job != NULL)
|
||||
job_free(first_job);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return TRUE if we need to check if the process of "job" has ended.
|
||||
*/
|
||||
static int
|
||||
job_need_end_check(job_T *job)
|
||||
{
|
||||
return job->jv_status == JOB_STARTED
|
||||
&& (job->jv_stoponexit != NULL || job->jv_exit_cb != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if the channel of "job" is still useful.
|
||||
*/
|
||||
static int
|
||||
job_channel_still_useful(job_T *job)
|
||||
{
|
||||
return job->jv_channel != NULL && channel_still_useful(job->jv_channel);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if the job should not be freed yet. Do not free the job when
|
||||
* it has not ended yet and there is a "stoponexit" flag, an exit callback
|
||||
* or when the associated channel will do something with the job output.
|
||||
*/
|
||||
static int
|
||||
job_still_useful(job_T *job)
|
||||
{
|
||||
return job_need_end_check(job) || job_channel_still_useful(job);
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTE: Must call job_cleanup() only once right after the status of "job"
|
||||
* changed to JOB_ENDED (i.e. after job_status() returned "dead" first or
|
||||
* mch_detect_ended_job() returned non-NULL).
|
||||
*/
|
||||
static void
|
||||
job_cleanup(job_T *job)
|
||||
{
|
||||
if (job->jv_status != JOB_ENDED)
|
||||
return;
|
||||
|
||||
/* Ready to cleanup the job. */
|
||||
job->jv_status = JOB_FINISHED;
|
||||
|
||||
if (job->jv_exit_cb != NULL)
|
||||
{
|
||||
typval_T argv[3];
|
||||
typval_T rettv;
|
||||
int dummy;
|
||||
|
||||
/* invoke the exit callback; make sure the refcount is > 0 */
|
||||
/* Invoke the exit callback. Make sure the refcount is > 0. */
|
||||
++job->jv_refcount;
|
||||
argv[0].v_type = VAR_JOB;
|
||||
argv[0].vval.v_job = job;
|
||||
@@ -4478,42 +4660,18 @@ job_cleanup(job_T *job)
|
||||
--job->jv_refcount;
|
||||
channel_need_redraw = TRUE;
|
||||
}
|
||||
if (job->jv_refcount == 0)
|
||||
|
||||
/* Do not free the job in case the close callback of the associated channel
|
||||
* isn't invoked yet and may get information by job_info(). */
|
||||
if (job->jv_refcount == 0 && !job_channel_still_useful(job))
|
||||
{
|
||||
/* The job was already unreferenced, now that it ended it can be
|
||||
* freed. Careful: caller must not use "job" after this! */
|
||||
/* The job was already unreferenced and the associated channel was
|
||||
* detached, now that it ended it can be freed. Careful: caller must
|
||||
* not use "job" after this! */
|
||||
job_free(job);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(EXITFREE) || defined(PROTO)
|
||||
void
|
||||
job_free_all(void)
|
||||
{
|
||||
while (first_job != NULL)
|
||||
job_free(first_job);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return TRUE if the job should not be freed yet. Do not free the job when
|
||||
* it has not ended yet and there is a "stoponexit" flag, an exit callback
|
||||
* or when the associated channel will do something with the job output.
|
||||
*/
|
||||
static int
|
||||
job_still_useful(job_T *job)
|
||||
{
|
||||
return (job->jv_stoponexit != NULL || job->jv_exit_cb != NULL
|
||||
|| (job->jv_channel != NULL
|
||||
&& channel_still_useful(job->jv_channel)));
|
||||
}
|
||||
|
||||
static int
|
||||
job_still_alive(job_T *job)
|
||||
{
|
||||
return (job->jv_status == JOB_STARTED) && job_still_useful(job);
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark references in jobs that are still useful.
|
||||
*/
|
||||
@@ -4525,7 +4683,7 @@ set_ref_in_job(int copyID)
|
||||
typval_T tv;
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
if (job_still_alive(job))
|
||||
if (job_still_useful(job))
|
||||
{
|
||||
tv.v_type = VAR_JOB;
|
||||
tv.vval.v_job = job;
|
||||
@@ -4534,26 +4692,33 @@ set_ref_in_job(int copyID)
|
||||
return abort;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dereference "job". Note that after this "job" may have been freed.
|
||||
*/
|
||||
void
|
||||
job_unref(job_T *job)
|
||||
{
|
||||
if (job != NULL && --job->jv_refcount <= 0)
|
||||
{
|
||||
/* Do not free the job when it has not ended yet and there is a
|
||||
* "stoponexit" flag or an exit callback. */
|
||||
if (!job_still_alive(job))
|
||||
/* Do not free the job if there is a channel where the close callback
|
||||
* may get the job info. */
|
||||
if (!job_channel_still_useful(job))
|
||||
{
|
||||
job_free(job);
|
||||
}
|
||||
else if (job->jv_channel != NULL
|
||||
&& !channel_still_useful(job->jv_channel))
|
||||
{
|
||||
/* Do remove the link to the channel, otherwise it hangs
|
||||
* around until Vim exits. See job_free() for refcount. */
|
||||
ch_log(job->jv_channel, "detaching channel from job");
|
||||
job->jv_channel->ch_job = NULL;
|
||||
channel_unref(job->jv_channel);
|
||||
job->jv_channel = NULL;
|
||||
/* Do not free the job when it has not ended yet and there is a
|
||||
* "stoponexit" flag or an exit callback. */
|
||||
if (!job_need_end_check(job))
|
||||
{
|
||||
job_free(job);
|
||||
}
|
||||
else if (job->jv_channel != NULL)
|
||||
{
|
||||
/* Do remove the link to the channel, otherwise it hangs
|
||||
* around until Vim exits. See job_free() for refcount. */
|
||||
ch_log(job->jv_channel, "detaching channel from job");
|
||||
job->jv_channel->ch_job = NULL;
|
||||
channel_unref(job->jv_channel);
|
||||
job->jv_channel = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4566,7 +4731,7 @@ free_unused_jobs_contents(int copyID, int mask)
|
||||
|
||||
for (job = first_job; job != NULL; job = job->jv_next)
|
||||
if ((job->jv_copyID & mask) != (copyID & mask)
|
||||
&& !job_still_alive(job))
|
||||
&& !job_still_useful(job))
|
||||
{
|
||||
/* Free the channel and ordinary items it contains, but don't
|
||||
* recurse into Lists, Dictionaries etc. */
|
||||
@@ -4586,7 +4751,7 @@ free_unused_jobs(int copyID, int mask)
|
||||
{
|
||||
job_next = job->jv_next;
|
||||
if ((job->jv_copyID & mask) != (copyID & mask)
|
||||
&& !job_still_alive(job))
|
||||
&& !job_still_useful(job))
|
||||
{
|
||||
/* Free the job struct itself. */
|
||||
job_free_job(job);
|
||||
@@ -4680,8 +4845,7 @@ has_pending_job(void)
|
||||
/* Only should check if the channel has been closed, if the channel is
|
||||
* open the job won't exit. */
|
||||
if (job->jv_status == JOB_STARTED && job->jv_exit_cb != NULL
|
||||
&& (job->jv_channel == NULL
|
||||
|| !channel_still_useful(job->jv_channel)))
|
||||
&& !job_channel_still_useful(job))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
@@ -4696,14 +4860,18 @@ job_check_ended(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (first_job == NULL)
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAX_CHECK_ENDED; ++i)
|
||||
{
|
||||
/* NOTE: mch_detect_ended_job() must only return a job of which the
|
||||
* status was just set to JOB_ENDED. */
|
||||
job_T *job = mch_detect_ended_job(first_job);
|
||||
|
||||
if (job == NULL)
|
||||
break;
|
||||
if (job_still_useful(job))
|
||||
job_cleanup(job); /* may free "job" */
|
||||
job_cleanup(job); /* may free "job" */
|
||||
}
|
||||
|
||||
if (channel_need_redraw)
|
||||
@@ -4917,7 +5085,7 @@ job_status(job_T *job)
|
||||
{
|
||||
char *result;
|
||||
|
||||
if (job->jv_status == JOB_ENDED)
|
||||
if (job->jv_status >= JOB_ENDED)
|
||||
/* No need to check, dead is dead. */
|
||||
result = "dead";
|
||||
else if (job->jv_status == JOB_FAILED)
|
||||
|
||||
+2
-4
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* config.h.in. Generated automatically from configure.in by autoheader, and
|
||||
* manually changed after that.
|
||||
* config.h.in. Originally generated automatically from configure.ac by
|
||||
* autoheader and manually changed after that.
|
||||
*/
|
||||
|
||||
/* Define if we have EBCDIC code */
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
dnl configure.in: autoconf script for Vim
|
||||
dnl configure.ac: autoconf script for Vim
|
||||
|
||||
dnl Process this file with autoconf 2.12 or 2.13 to produce "configure".
|
||||
dnl Should also work with autoconf 2.54 and later.
|
||||
@@ -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
@@ -214,7 +214,7 @@ dictitem_remove(dict_T *dict, dictitem_T *item)
|
||||
|
||||
hi = hash_find(&dict->dv_hashtab, item->di_key);
|
||||
if (HASHITEM_EMPTY(hi))
|
||||
EMSG2(_(e_intern2), "dictitem_remove()");
|
||||
internal_error("dictitem_remove()");
|
||||
else
|
||||
hash_remove(&dict->dv_hashtab, hi);
|
||||
dictitem_free(item);
|
||||
|
||||
@@ -1312,6 +1312,7 @@ static digr_T digraphdefault[] =
|
||||
{'/', '-', 0x2020},
|
||||
{'/', '=', 0x2021},
|
||||
{'.', '.', 0x2025},
|
||||
{',', '.', 0x2026},
|
||||
{'%', '0', 0x2030},
|
||||
{'1', '\'', 0x2032},
|
||||
{'2', '\'', 0x2033},
|
||||
|
||||
+2
-2
@@ -2308,7 +2308,7 @@ vim_is_ctrl_x_key(int c)
|
||||
case CTRL_X_EVAL:
|
||||
return (c == Ctrl_P || c == Ctrl_N);
|
||||
}
|
||||
EMSG(_(e_internal));
|
||||
internal_error("vim_is_ctrl_x_key()");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -5445,7 +5445,7 @@ ins_complete(int c, int enable_pum)
|
||||
}
|
||||
else
|
||||
{
|
||||
EMSG2(_(e_intern2), "ins_complete()");
|
||||
internal_error("ins_complete()");
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
||||
+21
-14
@@ -839,7 +839,7 @@ restore_vimvar(int idx, typval_T *save_tv)
|
||||
{
|
||||
hi = hash_find(&vimvarht, vimvars[idx].vv_di.di_key);
|
||||
if (HASHITEM_EMPTY(hi))
|
||||
EMSG2(_(e_intern2), "restore_vimvar()");
|
||||
internal_error("restore_vimvar()");
|
||||
else
|
||||
hash_remove(&vimvarht, hi);
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@ ex_let_vars(
|
||||
}
|
||||
else if (*arg != ',' && *arg != ']')
|
||||
{
|
||||
EMSG2(_(e_intern2), "ex_let_vars()");
|
||||
internal_error("ex_let_vars()");
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
@@ -2830,7 +2830,7 @@ do_unlet(char_u *name, int forceit)
|
||||
}
|
||||
if (d == NULL)
|
||||
{
|
||||
EMSG2(_(e_intern2), "do_unlet()");
|
||||
internal_error("do_unlet()");
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
@@ -4339,10 +4339,17 @@ eval7(
|
||||
* use its contents. */
|
||||
s = deref_func_name(s, &len, &partial, !evaluate);
|
||||
|
||||
/* Invoke the function. */
|
||||
ret = get_func_tv(s, len, rettv, arg,
|
||||
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
|
||||
&len, evaluate, partial, NULL);
|
||||
/* Need to make a copy, in case evaluating the arguments makes
|
||||
* the name invalid. */
|
||||
s = vim_strsave(s);
|
||||
if (s == NULL)
|
||||
ret = FAIL;
|
||||
else
|
||||
/* Invoke the function. */
|
||||
ret = get_func_tv(s, len, rettv, arg,
|
||||
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
|
||||
&len, evaluate, partial, NULL);
|
||||
vim_free(s);
|
||||
|
||||
/* If evaluate is FALSE rettv->v_type was not set in
|
||||
* get_func_tv, but it's needed in handle_subscript() to parse
|
||||
@@ -5678,7 +5685,7 @@ get_var_special_name(int nr)
|
||||
case VVAL_NONE: return "v:none";
|
||||
case VVAL_NULL: return "v:null";
|
||||
}
|
||||
EMSG2(_(e_intern2), "get_var_special_name()");
|
||||
internal_error("get_var_special_name()");
|
||||
return "42";
|
||||
}
|
||||
|
||||
@@ -7152,7 +7159,7 @@ get_tv_number_chk(typval_T *varp, int *denote)
|
||||
break;
|
||||
#endif
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "get_tv_number(UNKNOWN)");
|
||||
internal_error("get_tv_number(UNKNOWN)");
|
||||
break;
|
||||
}
|
||||
if (denote == NULL) /* useful for values that must be unsigned */
|
||||
@@ -7199,7 +7206,7 @@ get_tv_float(typval_T *varp)
|
||||
break;
|
||||
# endif
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "get_tv_float(UNKNOWN)");
|
||||
internal_error("get_tv_float(UNKNOWN)");
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
@@ -7283,7 +7290,7 @@ get_tv_string_buf_chk(typval_T *varp, char_u *buf)
|
||||
if (job == NULL)
|
||||
return (char_u *)"no process";
|
||||
status = job->jv_status == JOB_FAILED ? "fail"
|
||||
: job->jv_status == JOB_ENDED ? "dead"
|
||||
: job->jv_status >= JOB_ENDED ? "dead"
|
||||
: "run";
|
||||
# ifdef UNIX
|
||||
vim_snprintf((char *)buf, NUMBUFLEN,
|
||||
@@ -7733,7 +7740,7 @@ set_var(
|
||||
return;
|
||||
}
|
||||
else if (v->di_tv.v_type != tv->v_type)
|
||||
EMSG2(_(e_intern2), "set_var()");
|
||||
internal_error("set_var()");
|
||||
}
|
||||
|
||||
clear_tv(&v->di_tv);
|
||||
@@ -7962,7 +7969,7 @@ copy_tv(typval_T *from, typval_T *to)
|
||||
}
|
||||
break;
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "copy_tv(UNKNOWN)");
|
||||
internal_error("copy_tv(UNKNOWN)");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -8036,7 +8043,7 @@ item_copy(
|
||||
ret = FAIL;
|
||||
break;
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "item_copy(UNKNOWN)");
|
||||
internal_error("item_copy(UNKNOWN)");
|
||||
ret = FAIL;
|
||||
}
|
||||
--recurse;
|
||||
|
||||
+24
-3
@@ -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
|
||||
*/
|
||||
@@ -2644,7 +2661,7 @@ f_empty(typval_T *argvars, typval_T *rettv)
|
||||
break;
|
||||
#endif
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "f_empty(UNKNOWN)");
|
||||
internal_error("f_empty(UNKNOWN)");
|
||||
n = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -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;
|
||||
@@ -12722,7 +12743,7 @@ f_type(typval_T *argvars, typval_T *rettv)
|
||||
case VAR_JOB: n = VAR_TYPE_JOB; break;
|
||||
case VAR_CHANNEL: n = VAR_TYPE_CHANNEL; break;
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "f_type(UNKNOWN)");
|
||||
internal_error("f_type(UNKNOWN)");
|
||||
n = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -4577,7 +4577,7 @@ ex_z(exarg_T *eap)
|
||||
if (eap->forceit)
|
||||
bigness = curwin->w_height;
|
||||
#ifdef FEAT_WINDOWS
|
||||
else if (firstwin != lastwin)
|
||||
else if (!ONE_WINDOW)
|
||||
bigness = curwin->w_height - 3;
|
||||
#endif
|
||||
else
|
||||
|
||||
+5
-5
@@ -391,10 +391,10 @@ EX(CMD_cquit, "cquit", ex_cquit,
|
||||
EX(CMD_crewind, "crewind", ex_cc,
|
||||
RANGE|NOTADR|COUNT|TRLBAR|BANG,
|
||||
ADDR_LINES),
|
||||
EX(CMD_cscope, "cscope", do_cscope,
|
||||
EX(CMD_cscope, "cscope", ex_cscope,
|
||||
EXTRA|NOTRLCOM|XFILE,
|
||||
ADDR_LINES),
|
||||
EX(CMD_cstag, "cstag", do_cstag,
|
||||
EX(CMD_cstag, "cstag", ex_cstag,
|
||||
BANG|TRLBAR|WORD1,
|
||||
ADDR_LINES),
|
||||
EX(CMD_cunmap, "cunmap", ex_unmap,
|
||||
@@ -623,7 +623,7 @@ EX(CMD_highlight, "highlight", ex_highlight,
|
||||
BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_hide, "hide", ex_hide,
|
||||
BANG|RANGE|NOTADR|COUNT|EXTRA|NOTRLCOM,
|
||||
BANG|RANGE|NOTADR|COUNT|EXTRA|TRLBAR,
|
||||
ADDR_WINDOWS),
|
||||
EX(CMD_history, "history", ex_history,
|
||||
EXTRA|TRLBAR|CMDWIN,
|
||||
@@ -745,7 +745,7 @@ EX(CMD_lchdir, "lchdir", ex_cd,
|
||||
EX(CMD_lclose, "lclose", ex_cclose,
|
||||
RANGE|NOTADR|COUNT|TRLBAR,
|
||||
ADDR_LINES),
|
||||
EX(CMD_lcscope, "lcscope", do_cscope,
|
||||
EX(CMD_lcscope, "lcscope", ex_cscope,
|
||||
EXTRA|NOTRLCOM|XFILE,
|
||||
ADDR_LINES),
|
||||
EX(CMD_ldo, "ldo", ex_listdo,
|
||||
@@ -1255,7 +1255,7 @@ EX(CMD_scriptnames, "scriptnames", ex_scriptnames,
|
||||
EX(CMD_scriptencoding, "scriptencoding", ex_scriptencoding,
|
||||
WORD1|TRLBAR|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_scscope, "scscope", do_scscope,
|
||||
EX(CMD_scscope, "scscope", ex_scscope,
|
||||
EXTRA|NOTRLCOM,
|
||||
ADDR_LINES),
|
||||
EX(CMD_set, "set", ex_set,
|
||||
|
||||
+32
-39
@@ -245,9 +245,9 @@ static void ex_popup(exarg_T *eap);
|
||||
# define ex_helpfind ex_ni
|
||||
#endif
|
||||
#ifndef FEAT_CSCOPE
|
||||
# define do_cscope ex_ni
|
||||
# define do_scscope ex_ni
|
||||
# define do_cstag ex_ni
|
||||
# define ex_cscope ex_ni
|
||||
# define ex_scscope ex_ni
|
||||
# define ex_cstag ex_ni
|
||||
#endif
|
||||
#ifndef FEAT_SYN_HL
|
||||
# define ex_syntax ex_ni
|
||||
@@ -1395,8 +1395,6 @@ do_cmdline(
|
||||
break;
|
||||
case ET_INTERRUPT:
|
||||
break;
|
||||
default:
|
||||
p = vim_strsave((char_u *)_(e_internal));
|
||||
}
|
||||
|
||||
saved_sourcing_name = sourcing_name;
|
||||
@@ -5651,15 +5649,16 @@ find_nextcmd(char_u *p)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check if *p is a separator between Ex commands.
|
||||
* Return NULL if it isn't, (p + 1) if it is.
|
||||
* Check if *p is a separator between Ex commands, skipping over white space.
|
||||
* Return NULL if it isn't, the following character if it is.
|
||||
*/
|
||||
char_u *
|
||||
check_nextcmd(char_u *p)
|
||||
{
|
||||
p = skipwhite(p);
|
||||
if (*p == '|' || *p == '\n')
|
||||
return (p + 1);
|
||||
char_u *s = skipwhite(p);
|
||||
|
||||
if (*s == '|' || *s == '\n')
|
||||
return (s + 1);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -7256,7 +7255,7 @@ ex_quit(exarg_T *eap)
|
||||
* :h|wincmd w|1q - don't quit
|
||||
* :h|wincmd w|q - quit
|
||||
*/
|
||||
if (only_one_window() && (firstwin == lastwin || eap->addr_count == 0))
|
||||
if (only_one_window() && (ONE_WINDOW || eap->addr_count == 0))
|
||||
#endif
|
||||
getout(0);
|
||||
#ifdef FEAT_WINDOWS
|
||||
@@ -7505,9 +7504,9 @@ tabpage_close(int forceit)
|
||||
{
|
||||
/* First close all the windows but the current one. If that worked then
|
||||
* close the last window in this tab, that will close it. */
|
||||
if (lastwin != firstwin)
|
||||
if (!ONE_WINDOW)
|
||||
close_others(TRUE, forceit);
|
||||
if (lastwin == firstwin)
|
||||
if (ONE_WINDOW)
|
||||
ex_win_close(forceit, curwin, NULL);
|
||||
# ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
@@ -7591,38 +7590,32 @@ ex_all(exarg_T *eap)
|
||||
static void
|
||||
ex_hide(exarg_T *eap)
|
||||
{
|
||||
if (*eap->arg != NUL && check_nextcmd(eap->arg) == NULL)
|
||||
eap->errmsg = e_invarg;
|
||||
else
|
||||
{
|
||||
/* ":hide" or ":hide | cmd": hide current window */
|
||||
eap->nextcmd = check_nextcmd(eap->arg);
|
||||
/* ":hide" or ":hide | cmd": hide current window */
|
||||
#ifdef FEAT_WINDOWS
|
||||
if (!eap->skip)
|
||||
{
|
||||
if (!eap->skip)
|
||||
{
|
||||
# ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
need_mouse_correct = TRUE;
|
||||
# endif
|
||||
if (eap->addr_count == 0)
|
||||
win_close(curwin, FALSE); /* don't free buffer */
|
||||
else
|
||||
{
|
||||
int winnr = 0;
|
||||
win_T *win;
|
||||
if (eap->addr_count == 0)
|
||||
win_close(curwin, FALSE); /* don't free buffer */
|
||||
else
|
||||
{
|
||||
int winnr = 0;
|
||||
win_T *win;
|
||||
|
||||
FOR_ALL_WINDOWS(win)
|
||||
{
|
||||
winnr++;
|
||||
if (winnr == eap->line2)
|
||||
break;
|
||||
}
|
||||
if (win == NULL)
|
||||
win = lastwin;
|
||||
win_close(win, FALSE);
|
||||
FOR_ALL_WINDOWS(win)
|
||||
{
|
||||
winnr++;
|
||||
if (winnr == eap->line2)
|
||||
break;
|
||||
}
|
||||
if (win == NULL)
|
||||
win = lastwin;
|
||||
win_close(win, FALSE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -10456,7 +10449,7 @@ ex_tag_cmd(exarg_T *eap, char_u *name)
|
||||
#ifdef FEAT_CSCOPE
|
||||
if (p_cst && *eap->arg != NUL)
|
||||
{
|
||||
do_cstag(eap);
|
||||
ex_cstag(eap);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
+7
-7
@@ -16,7 +16,7 @@
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
|
||||
static void free_msglist(struct msglist *l);
|
||||
static int throw_exception(void *, int, char_u *);
|
||||
static int throw_exception(void *, except_type_T, char_u *);
|
||||
static char_u *get_end_emsg(struct condstack *cstack);
|
||||
|
||||
/*
|
||||
@@ -422,7 +422,7 @@ do_intthrow(struct condstack *cstack)
|
||||
char_u *
|
||||
get_exception_string(
|
||||
void *value,
|
||||
int type,
|
||||
except_type_T type,
|
||||
char_u *cmdname,
|
||||
int *should_free)
|
||||
{
|
||||
@@ -503,7 +503,7 @@ get_exception_string(
|
||||
* error exception.
|
||||
*/
|
||||
static int
|
||||
throw_exception(void *value, int type, char_u *cmdname)
|
||||
throw_exception(void *value, except_type_T type, char_u *cmdname)
|
||||
{
|
||||
except_T *excp;
|
||||
int should_free;
|
||||
@@ -595,7 +595,7 @@ discard_exception(except_T *excp, int was_finished)
|
||||
|
||||
if (excp == NULL)
|
||||
{
|
||||
EMSG(_(e_internal));
|
||||
internal_error("discard_exception()");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -700,7 +700,7 @@ catch_exception(except_T *excp)
|
||||
finish_exception(except_T *excp)
|
||||
{
|
||||
if (excp != caught_stack)
|
||||
EMSG(_(e_internal));
|
||||
internal_error("finish_exception()");
|
||||
caught_stack = caught_stack->caught;
|
||||
if (caught_stack != NULL)
|
||||
{
|
||||
@@ -1603,7 +1603,7 @@ ex_catch(exarg_T *eap)
|
||||
* ":break", ":return", ":finish", error, interrupt, or another
|
||||
* exception. */
|
||||
if (cstack->cs_exception[cstack->cs_idx] != current_exception)
|
||||
EMSG(_(e_internal));
|
||||
internal_error("ex_catch()");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1737,7 +1737,7 @@ ex_finally(exarg_T *eap)
|
||||
* exception will be discarded. */
|
||||
if (did_throw && cstack->cs_exception[cstack->cs_idx]
|
||||
!= current_exception)
|
||||
EMSG(_(e_internal));
|
||||
internal_error("ex_finally()");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+4
-4
@@ -250,7 +250,7 @@ add_buff(
|
||||
}
|
||||
else if (buf->bh_curr == NULL) /* buffer has already been read */
|
||||
{
|
||||
EMSG(_("E222: Add to read buffer"));
|
||||
IEMSG(_("E222: Add to read buffer"));
|
||||
return;
|
||||
}
|
||||
else if (buf->bh_index != 0)
|
||||
@@ -1321,11 +1321,11 @@ alloc_typebuf(void)
|
||||
free_typebuf(void)
|
||||
{
|
||||
if (typebuf.tb_buf == typebuf_init)
|
||||
EMSG2(_(e_intern2), "Free typebuf 1");
|
||||
internal_error("Free typebuf 1");
|
||||
else
|
||||
vim_free(typebuf.tb_buf);
|
||||
if (typebuf.tb_noremap == noremapbuf_init)
|
||||
EMSG2(_(e_intern2), "Free typebuf 2");
|
||||
internal_error("Free typebuf 2");
|
||||
else
|
||||
vim_free(typebuf.tb_noremap);
|
||||
}
|
||||
@@ -4868,7 +4868,7 @@ makemap(
|
||||
c1 = 'l';
|
||||
break;
|
||||
default:
|
||||
EMSG(_("E228: makemap: Illegal mode"));
|
||||
IEMSG(_("E228: makemap: Illegal mode"));
|
||||
return FAIL;
|
||||
}
|
||||
do /* do this twice if c2 is set, 3 times with c3 */
|
||||
|
||||
+5
-1
@@ -546,6 +546,7 @@ EXTERN int clip_unnamed_saved INIT(= 0);
|
||||
EXTERN win_T *firstwin; /* first window */
|
||||
EXTERN win_T *lastwin; /* last window */
|
||||
EXTERN win_T *prevwin INIT(= NULL); /* previous window */
|
||||
# define ONE_WINDOW (firstwin == lastwin)
|
||||
# define W_NEXT(wp) ((wp)->w_next)
|
||||
# define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
||||
# define FOR_ALL_TABPAGES(tp) for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
||||
@@ -563,6 +564,7 @@ EXTERN win_T *prevwin INIT(= NULL); /* previous window */
|
||||
#else
|
||||
# define firstwin curwin
|
||||
# define lastwin curwin
|
||||
# define ONE_WINDOW 1
|
||||
# define W_NEXT(wp) NULL
|
||||
# define FOR_ALL_WINDOWS(wp) wp = curwin;
|
||||
# define FOR_ALL_TABPAGES(tp) for (;FALSE;)
|
||||
@@ -641,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
|
||||
@@ -1442,6 +1446,7 @@ EXTERN char_u e_font[] INIT(= N_("E235: Unknown font: %s"));
|
||||
EXTERN char_u e_fontwidth[] INIT(= N_("E236: Font \"%s\" is not fixed-width"));
|
||||
#endif
|
||||
EXTERN char_u e_internal[] INIT(= N_("E473: Internal error"));
|
||||
EXTERN char_u e_intern2[] INIT(= N_("E685: Internal error: %s"));
|
||||
EXTERN char_u e_interr[] INIT(= N_("Interrupted"));
|
||||
EXTERN char_u e_invaddr[] INIT(= N_("E14: Invalid address"));
|
||||
EXTERN char_u e_invarg[] INIT(= N_("E474: Invalid argument"));
|
||||
@@ -1591,7 +1596,6 @@ EXTERN char_u e_invexprmsg[] INIT(= N_("E449: Invalid expression received"));
|
||||
EXTERN char_u e_guarded[] INIT(= N_("E463: Region is guarded, cannot modify"));
|
||||
EXTERN char_u e_nbreadonly[] INIT(= N_("E744: NetBeans does not allow changes in read-only files"));
|
||||
#endif
|
||||
EXTERN char_u e_intern2[] INIT(= N_("E685: Internal error: %s"));
|
||||
EXTERN char_u e_maxmempat[] INIT(= N_("E363: pattern uses more memory than 'maxmempattern'"));
|
||||
EXTERN char_u e_emptybuf[] INIT(= N_("E749: empty buffer"));
|
||||
EXTERN char_u e_nobufnr[] INIT(= N_("E86: Buffer %ld does not exist"));
|
||||
|
||||
+12
-1
@@ -218,7 +218,7 @@ gui_mch_create_beval_area(
|
||||
|
||||
if (mesg != NULL && mesgCB != NULL)
|
||||
{
|
||||
EMSG(_("E232: Cannot create BalloonEval with both message and callback"));
|
||||
IEMSG(_("E232: Cannot create BalloonEval with both message and callback"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1178,12 +1178,23 @@ drawBalloon(BalloonEval *beval)
|
||||
int y_offset = EVAL_OFFSET_Y;
|
||||
PangoLayout *layout;
|
||||
# ifdef HAVE_GTK_MULTIHEAD
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkRectangle rect;
|
||||
GdkMonitor * const mon = gdk_display_get_monitor_at_window(
|
||||
gtk_widget_get_display(beval->balloonShell),
|
||||
gtk_widget_get_window(beval->balloonShell));
|
||||
gdk_monitor_get_geometry(mon, &rect);
|
||||
|
||||
screen_w = rect.width;
|
||||
screen_h = rect.height;
|
||||
# else
|
||||
GdkScreen *screen;
|
||||
|
||||
screen = gtk_widget_get_screen(beval->target);
|
||||
gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
|
||||
screen_w = gdk_screen_get_width(screen);
|
||||
screen_h = gdk_screen_get_height(screen);
|
||||
# endif
|
||||
# else
|
||||
screen_w = gdk_screen_width();
|
||||
screen_h = gdk_screen_height();
|
||||
|
||||
@@ -1881,10 +1881,36 @@ gui_mch_show_popupmenu(vimmenu_T *menu)
|
||||
# endif
|
||||
# endif /* FEAT_XIM */
|
||||
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
{
|
||||
GdkEventButton trigger;
|
||||
|
||||
/* A pseudo event to have gtk_menu_popup_at_pointer() work. Since the
|
||||
* function calculates the popup menu position on the basis of the
|
||||
* actual pointer position when it is invoked, the fields x, y, x_root
|
||||
* and y_root are set to zero for convenience. */
|
||||
trigger.type = GDK_BUTTON_PRESS;
|
||||
trigger.window = gtk_widget_get_window(gui.drawarea);
|
||||
trigger.send_event = FALSE;
|
||||
trigger.time = gui.event_time;
|
||||
trigger.x = 0.0;
|
||||
trigger.y = 0.0;
|
||||
trigger.axes = NULL;
|
||||
trigger.state = 0;
|
||||
trigger.button = 3;
|
||||
trigger.device = NULL;
|
||||
trigger.x_root = 0.0;
|
||||
trigger.y_root = 0.0;
|
||||
|
||||
gtk_menu_popup_at_pointer(GTK_MENU(menu->submenu_id),
|
||||
(GdkEvent *)&trigger);
|
||||
}
|
||||
#else
|
||||
gtk_menu_popup(GTK_MENU(menu->submenu_id),
|
||||
NULL, NULL,
|
||||
(GtkMenuPositionFunc)NULL, NULL,
|
||||
3U, gui.event_time);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to
|
||||
@@ -1942,10 +1968,55 @@ gui_make_popup(char_u *path_name, int mouse_pos)
|
||||
|
||||
if (menu != NULL && menu->submenu_id != NULL)
|
||||
{
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkWindow * const win = gtk_widget_get_window(gui.drawarea);
|
||||
GdkEventButton trigger;
|
||||
|
||||
/* A pseudo event to have gtk_menu_popup_at_*() functions work. Since
|
||||
* the position where the menu pops up is automatically adjusted by
|
||||
* the functions, none of the fields x, y, x_root and y_root has to be
|
||||
* set to a specific value here; therefore, they are set to zero for
|
||||
* convenience.*/
|
||||
trigger.type = GDK_BUTTON_PRESS;
|
||||
trigger.window = win;
|
||||
trigger.send_event = FALSE;
|
||||
trigger.time = GDK_CURRENT_TIME;
|
||||
trigger.x = 0.0;
|
||||
trigger.y = 0.0;
|
||||
trigger.axes = NULL;
|
||||
trigger.state = 0;
|
||||
trigger.button = 0;
|
||||
trigger.device = NULL;
|
||||
trigger.x_root = 0.0;
|
||||
trigger.y_root = 0.0;
|
||||
|
||||
if (mouse_pos)
|
||||
gtk_menu_popup_at_pointer(GTK_MENU(menu->submenu_id),
|
||||
(GdkEvent *)&trigger);
|
||||
else
|
||||
{
|
||||
gint origin_x, origin_y;
|
||||
GdkRectangle rect = { 0, 0, 0, 0 };
|
||||
|
||||
gdk_window_get_origin(win, &origin_x, &origin_y);
|
||||
popup_menu_position_func(NULL, &rect.x, &rect.y, NULL, NULL);
|
||||
|
||||
rect.x -= origin_x;
|
||||
rect.y -= origin_y;
|
||||
|
||||
gtk_menu_popup_at_rect(GTK_MENU(menu->submenu_id),
|
||||
win,
|
||||
&rect,
|
||||
GDK_GRAVITY_SOUTH_EAST,
|
||||
GDK_GRAVITY_NORTH_WEST,
|
||||
(GdkEvent *)&trigger);
|
||||
}
|
||||
# else
|
||||
gtk_menu_popup(GTK_MENU(menu->submenu_id),
|
||||
NULL, NULL,
|
||||
&popup_menu_position_func, NULL,
|
||||
0U, (guint32)GDK_CURRENT_TIME);
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+112
-2
@@ -3076,10 +3076,16 @@ drawarea_unrealize_cb(GtkWidget *widget UNUSED, gpointer data UNUSED)
|
||||
gui.blank_pointer = NULL;
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION(3,22,2)
|
||||
static void
|
||||
drawarea_style_updated_cb(GtkWidget *widget UNUSED,
|
||||
gpointer data UNUSED)
|
||||
#else
|
||||
static void
|
||||
drawarea_style_set_cb(GtkWidget *widget UNUSED,
|
||||
GtkStyle *previous_style UNUSED,
|
||||
gpointer data UNUSED)
|
||||
#endif
|
||||
{
|
||||
gui_mch_new_colors();
|
||||
}
|
||||
@@ -3096,6 +3102,35 @@ 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) && !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).
|
||||
*
|
||||
* As can be seen from the implementation of move_native_children() and
|
||||
* configure_native_child() in gdkwindow.c, those functions actually
|
||||
* propagate configure events to every child, failing to distinguish
|
||||
* "native" one from non-native one.
|
||||
*
|
||||
* Naturally, configure events propagated to here like that are fallacious
|
||||
* and, as a matter of fact, they trigger a geometric collapse of
|
||||
* gui.drawarea in fullscreen and miximized modes.
|
||||
*
|
||||
* To filter out such nuisance events, we are making use of the fact that
|
||||
* the field send_event of such GdkEventConfigures is set to FALSE in
|
||||
* configure_native_child().
|
||||
*
|
||||
* Obviously, this is a terrible hack making GVim depend on GTK's
|
||||
* 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
|
||||
|
||||
if (event->width == cur_width && event->height == cur_height)
|
||||
return TRUE;
|
||||
|
||||
@@ -3519,8 +3554,12 @@ on_tabline_menu(GtkWidget *widget, GdkEvent *event)
|
||||
/* If the event was generated for 3rd button popup the menu. */
|
||||
if (bevent->button == 3)
|
||||
{
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
gtk_menu_popup_at_pointer(GTK_MENU(widget), event);
|
||||
# else
|
||||
gtk_menu_popup(GTK_MENU(widget), NULL, NULL, NULL, NULL,
|
||||
bevent->button, bevent->time);
|
||||
# endif
|
||||
/* We handled the event. */
|
||||
return TRUE;
|
||||
}
|
||||
@@ -4116,6 +4155,9 @@ gui_mch_init(void)
|
||||
#endif
|
||||
|
||||
gui.drawarea = gtk_drawing_area_new();
|
||||
#if GTK_CHECK_VERSION(3,22,2)
|
||||
gtk_widget_set_name(gui.drawarea, "vim-gui-drawarea");
|
||||
#endif
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
gui.surface = NULL;
|
||||
gui.by_signal = FALSE;
|
||||
@@ -4167,8 +4209,13 @@ gui_mch_init(void)
|
||||
G_CALLBACK(drawarea_unrealize_cb), NULL);
|
||||
g_signal_connect(G_OBJECT(gui.drawarea), "configure-event",
|
||||
G_CALLBACK(drawarea_configure_event_cb), NULL);
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
g_signal_connect_after(G_OBJECT(gui.drawarea), "style-updated",
|
||||
G_CALLBACK(&drawarea_style_updated_cb), NULL);
|
||||
# else
|
||||
g_signal_connect_after(G_OBJECT(gui.drawarea), "style-set",
|
||||
G_CALLBACK(&drawarea_style_set_cb), NULL);
|
||||
# endif
|
||||
#else
|
||||
gtk_signal_connect(GTK_OBJECT(gui.drawarea), "realize",
|
||||
GTK_SIGNAL_FUNC(drawarea_realize_cb), NULL);
|
||||
@@ -4384,14 +4431,34 @@ set_cairo_source_rgba_from_color(cairo_t *cr, guicolor_T color)
|
||||
gui_mch_new_colors(void)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
# if !GTK_CHECK_VERSION(3,22,2)
|
||||
GdkWindow * const da_win = gtk_widget_get_window(gui.drawarea);
|
||||
# endif
|
||||
|
||||
if (gui.drawarea != NULL && gtk_widget_get_window(gui.drawarea) != NULL)
|
||||
#else
|
||||
if (gui.drawarea != NULL && gui.drawarea->window != NULL)
|
||||
#endif
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,4,0)
|
||||
#if GTK_CHECK_VERSION(3,22,2)
|
||||
GtkStyleContext * const context
|
||||
= gtk_widget_get_style_context(gui.drawarea);
|
||||
GtkCssProvider * const provider = gtk_css_provider_new();
|
||||
gchar * const css = g_strdup_printf(
|
||||
"widget#vim-gui-drawarea {\n"
|
||||
" background-color: #%.2lx%.2lx%.2lx;\n"
|
||||
"}\n",
|
||||
(gui.back_pixel >> 16) & 0xff,
|
||||
(gui.back_pixel >> 8) & 0xff,
|
||||
gui.back_pixel & 0xff);
|
||||
|
||||
gtk_css_provider_load_from_data(provider, css, -1, NULL);
|
||||
gtk_style_context_add_provider(context,
|
||||
GTK_STYLE_PROVIDER(provider), G_MAXUINT);
|
||||
|
||||
g_free(css);
|
||||
g_object_unref(provider);
|
||||
#elif GTK_CHECK_VERSION(3,4,0) /* !GTK_CHECK_VERSION(3,22,2) */
|
||||
GdkRGBA rgba;
|
||||
|
||||
rgba = color_to_rgba(gui.back_pixel);
|
||||
@@ -4415,7 +4482,7 @@ gui_mch_new_colors(void)
|
||||
# else
|
||||
gdk_window_set_background(gui.drawarea->window, &color);
|
||||
# endif
|
||||
#endif /* !GTK_CHECK_VERSION(3,4,0) */
|
||||
#endif /* !GTK_CHECK_VERSION(3,22,2) */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4429,6 +4496,30 @@ form_configure_event(GtkWidget *widget UNUSED,
|
||||
{
|
||||
int usable_height = event->height;
|
||||
|
||||
#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).
|
||||
*
|
||||
* As can be seen from the implementation of move_native_children() and
|
||||
* configure_native_child() in gdkwindow.c, those functions actually
|
||||
* propagate configure events to every child, failing to distinguish
|
||||
* "native" one from non-native one.
|
||||
*
|
||||
* Naturally, configure events propagated to here like that are fallacious
|
||||
* and, as a matter of fact, they trigger a geometric collapse of
|
||||
* gui.formwin.
|
||||
*
|
||||
* 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
|
||||
|
||||
/* When in a GtkPlug, we can't guarantee valid heights (as a round
|
||||
* no. of char-heights), so we have to manually sanitise them.
|
||||
* Widths seem to sort themselves out, don't ask me why.
|
||||
@@ -4890,6 +4981,16 @@ gui_mch_set_shellsize(int width, int height,
|
||||
gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
|
||||
{
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkRectangle rect;
|
||||
GdkMonitor * const mon = gdk_display_get_monitor_at_window(
|
||||
gtk_widget_get_display(gui.mainwin),
|
||||
gtk_widget_get_window(gui.mainwin));
|
||||
gdk_monitor_get_geometry(mon, &rect);
|
||||
|
||||
*screen_w = rect.width;
|
||||
*screen_h = rect.height - p_ghr;
|
||||
# else
|
||||
GdkScreen* screen;
|
||||
|
||||
if (gui.mainwin != NULL && gtk_widget_has_screen(gui.mainwin))
|
||||
@@ -4899,6 +5000,7 @@ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
|
||||
|
||||
*screen_w = gdk_screen_get_width(screen);
|
||||
*screen_h = gdk_screen_get_height(screen) - p_ghr;
|
||||
# endif
|
||||
#else
|
||||
*screen_w = gdk_screen_width();
|
||||
/* Subtract 'guiheadroom' from the height to allow some room for the
|
||||
@@ -6626,11 +6728,15 @@ gui_mch_clear_block(int row1, int col1, int row2, int col2)
|
||||
};
|
||||
GdkWindow * const win = gtk_widget_get_window(gui.drawarea);
|
||||
cairo_t * const cr = cairo_create(gui.surface);
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
set_cairo_source_rgba_from_color(cr, gui.back_pixel);
|
||||
# else
|
||||
cairo_pattern_t * const pat = gdk_window_get_background_pattern(win);
|
||||
if (pat != NULL)
|
||||
cairo_set_source(cr, pat);
|
||||
else
|
||||
set_cairo_source_rgba_from_color(cr, gui.back_pixel);
|
||||
# endif
|
||||
gdk_cairo_rectangle(cr, &rect);
|
||||
cairo_fill(cr);
|
||||
cairo_destroy(cr);
|
||||
@@ -6659,11 +6765,15 @@ gui_gtk_window_clear(GdkWindow *win)
|
||||
0, 0, gdk_window_get_width(win), gdk_window_get_height(win)
|
||||
};
|
||||
cairo_t * const cr = cairo_create(gui.surface);
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
set_cairo_source_rgba_from_color(cr, gui.back_pixel);
|
||||
# else
|
||||
cairo_pattern_t * const pat = gdk_window_get_background_pattern(win);
|
||||
if (pat != NULL)
|
||||
cairo_set_source(cr, pat);
|
||||
else
|
||||
set_cairo_source_rgba_from_color(cr, gui.back_pixel);
|
||||
# endif
|
||||
gdk_cairo_rectangle(cr, &rect);
|
||||
cairo_fill(cr);
|
||||
cairo_destroy(cr);
|
||||
|
||||
+40
-28
@@ -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);
|
||||
@@ -8620,7 +8632,7 @@ gui_mch_create_beval_area(
|
||||
|
||||
if (mesg != NULL && mesgCB != NULL)
|
||||
{
|
||||
EMSG(_("E232: Cannot create BalloonEval with both message and callback"));
|
||||
IEMSG(_("E232: Cannot create BalloonEval with both message and callback"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -590,7 +590,7 @@ hangul_automata2(char_u *buf, int_u *c)
|
||||
return AUTOMATA_CORRECT_NEW;
|
||||
|
||||
default:
|
||||
EMSG(_("E256: Hangul automata ERROR"));
|
||||
IEMSG(_("E256: Hangul automata ERROR"));
|
||||
break;
|
||||
}
|
||||
return AUTOMATA_ERROR; /* RrEeAaLlLlYy EeRrRrOoRr */
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ hash_add(hashtab_T *ht, char_u *key)
|
||||
hi = hash_lookup(ht, key, hash);
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
EMSG2(_(e_intern2), "hash_add()");
|
||||
internal_error("hash_add()");
|
||||
return FAIL;
|
||||
}
|
||||
return hash_add_item(ht, hi, key, hash);
|
||||
|
||||
+38
-101
@@ -201,8 +201,6 @@ set_context_in_cscope_cmd(
|
||||
#endif /* FEAT_CMDL_COMPL */
|
||||
|
||||
/*
|
||||
* PRIVATE: do_cscope_general
|
||||
*
|
||||
* Find the command, print help if invalid, and then call the corresponding
|
||||
* command function.
|
||||
*/
|
||||
@@ -242,31 +240,28 @@ do_cscope_general(
|
||||
}
|
||||
|
||||
/*
|
||||
* PUBLIC: do_cscope
|
||||
* Implementation of ":cscope" and ":lcscope"
|
||||
*/
|
||||
void
|
||||
do_cscope(exarg_T *eap)
|
||||
ex_cscope(exarg_T *eap)
|
||||
{
|
||||
do_cscope_general(eap, FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* PUBLIC: do_scscope
|
||||
*
|
||||
* same as do_cscope, but splits window, too.
|
||||
* Implementation of ":scscope". Same as ex_cscope(), but splits window, too.
|
||||
*/
|
||||
void
|
||||
do_scscope(exarg_T *eap)
|
||||
ex_scscope(exarg_T *eap)
|
||||
{
|
||||
do_cscope_general(eap, TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* PUBLIC: do_cstag
|
||||
*
|
||||
* Implementation of ":cstag"
|
||||
*/
|
||||
void
|
||||
do_cstag(exarg_T *eap)
|
||||
ex_cstag(exarg_T *eap)
|
||||
{
|
||||
int ret = FALSE;
|
||||
|
||||
@@ -336,13 +331,11 @@ do_cstag(exarg_T *eap)
|
||||
#endif
|
||||
}
|
||||
|
||||
} /* do_cscope */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* PUBLIC: cs_find
|
||||
*
|
||||
* this simulates a vim_fgets(), but for cscope, returns the next line
|
||||
* This simulates a vim_fgets(), but for cscope, returns the next line
|
||||
* from the cscope output. should only be called from find_tags()
|
||||
*
|
||||
* returns TRUE if eof, FALSE otherwise
|
||||
@@ -361,9 +354,7 @@ cs_fgets(char_u *buf, int size)
|
||||
|
||||
|
||||
/*
|
||||
* PUBLIC: cs_free_tags
|
||||
*
|
||||
* called only from do_tag(), when popping the tag stack
|
||||
* Called only from do_tag(), when popping the tag stack.
|
||||
*/
|
||||
void
|
||||
cs_free_tags(void)
|
||||
@@ -373,9 +364,7 @@ cs_free_tags(void)
|
||||
|
||||
|
||||
/*
|
||||
* PUBLIC: cs_print_tags
|
||||
*
|
||||
* called from do_tag()
|
||||
* Called from do_tag().
|
||||
*/
|
||||
void
|
||||
cs_print_tags(void)
|
||||
@@ -467,12 +456,8 @@ cs_connection(int num, char_u *dbpath, char_u *ppath)
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_add
|
||||
*
|
||||
* add cscope database or a directory name (to look for cscope.out)
|
||||
* to the cscope connection list
|
||||
*
|
||||
* MAXPATHL 256
|
||||
* Add cscope database or a directory name (to look for cscope.out)
|
||||
* to the cscope connection list.
|
||||
*/
|
||||
static int
|
||||
cs_add(exarg_T *eap UNUSED)
|
||||
@@ -508,10 +493,8 @@ cs_stat_emsg(char *fname)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_add_common
|
||||
*
|
||||
* the common routine to add a new cscope connection. called by
|
||||
* cs_add() and cs_reset(). i really don't like to do this, but this
|
||||
* The common routine to add a new cscope connection. Called by
|
||||
* cs_add() and cs_reset(). I really don't like to do this, but this
|
||||
* routine uses a number of goto statements.
|
||||
*/
|
||||
static int
|
||||
@@ -666,9 +649,7 @@ cs_check_for_tags(void)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_cnt_connections
|
||||
*
|
||||
* count the number of cscope connections
|
||||
* Count the number of cscope connections.
|
||||
*/
|
||||
static int
|
||||
cs_cnt_connections(void)
|
||||
@@ -693,9 +674,7 @@ cs_reading_emsg(
|
||||
|
||||
#define CSREAD_BUFSIZE 2048
|
||||
/*
|
||||
* PRIVATE: cs_cnt_matches
|
||||
*
|
||||
* count the number of matches for a given cscope connection.
|
||||
* Count the number of matches for a given cscope connection.
|
||||
*/
|
||||
static int
|
||||
cs_cnt_matches(int idx)
|
||||
@@ -754,8 +733,6 @@ cs_cnt_matches(int idx)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_create_cmd
|
||||
*
|
||||
* Creates the actual cscope command query from what the user entered.
|
||||
*/
|
||||
static char *
|
||||
@@ -817,8 +794,6 @@ cs_create_cmd(char *csoption, char *pattern)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_create_connection
|
||||
*
|
||||
* This piece of code was taken/adapted from nvi. do we need to add
|
||||
* the BSD license notice?
|
||||
*/
|
||||
@@ -1056,8 +1031,6 @@ err_closing:
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_find
|
||||
*
|
||||
* Query cscope using command line interface. Parse the output and use tselect
|
||||
* to allow choices. Like Nvi, creates a pipe to send to/from query/cscope.
|
||||
*
|
||||
@@ -1102,9 +1075,7 @@ cs_find(exarg_T *eap)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_find_common
|
||||
*
|
||||
* common code for cscope find, shared by cs_find() and do_cstag()
|
||||
* Common code for cscope find, shared by cs_find() and ex_cstag().
|
||||
*/
|
||||
static int
|
||||
cs_find_common(
|
||||
@@ -1178,12 +1149,12 @@ cs_find_common(
|
||||
}
|
||||
|
||||
# ifdef FEAT_AUTOCMD
|
||||
if (*qfpos != '0')
|
||||
if (*qfpos != '0'
|
||||
&& apply_autocmds(EVENT_QUICKFIXCMDPRE, (char_u *)"cscope",
|
||||
curbuf->b_fname, TRUE, curbuf))
|
||||
{
|
||||
apply_autocmds(EVENT_QUICKFIXCMDPRE, (char_u *)"cscope",
|
||||
curbuf->b_fname, TRUE, curbuf);
|
||||
# ifdef FEAT_EVAL
|
||||
if (did_throw || force_abort)
|
||||
if (aborting())
|
||||
return FALSE;
|
||||
# endif
|
||||
}
|
||||
@@ -1323,9 +1294,7 @@ cs_find_common(
|
||||
} /* cs_find_common */
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_help
|
||||
*
|
||||
* print help
|
||||
* Print help.
|
||||
*/
|
||||
static int
|
||||
cs_help(exarg_T *eap UNUSED)
|
||||
@@ -1408,9 +1377,7 @@ GetWin32Error(void)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_insert_filelist
|
||||
*
|
||||
* insert a new cscope database filename into the filelist
|
||||
* Insert a new cscope database filename into the filelist.
|
||||
*/
|
||||
static int
|
||||
cs_insert_filelist(
|
||||
@@ -1551,9 +1518,7 @@ cs_insert_filelist(
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_lookup_cmd
|
||||
*
|
||||
* find cscope command in command table
|
||||
* Find cscope command in command table.
|
||||
*/
|
||||
static cscmd_T *
|
||||
cs_lookup_cmd(exarg_T *eap)
|
||||
@@ -1582,9 +1547,7 @@ cs_lookup_cmd(exarg_T *eap)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_kill
|
||||
*
|
||||
* nuke em
|
||||
* Nuke em.
|
||||
*/
|
||||
static int
|
||||
cs_kill(exarg_T *eap UNUSED)
|
||||
@@ -1639,8 +1602,6 @@ cs_kill(exarg_T *eap UNUSED)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_kill_execute
|
||||
*
|
||||
* Actually kills a specific cscope connection.
|
||||
*/
|
||||
static void
|
||||
@@ -1659,22 +1620,20 @@ cs_kill_execute(
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_make_vim_style_matches
|
||||
*
|
||||
* convert the cscope output into a ctags style entry (as might be found
|
||||
* Convert the cscope output into a ctags style entry (as might be found
|
||||
* in a ctags tags file). there's one catch though: cscope doesn't tell you
|
||||
* the type of the tag you are looking for. for example, in Darren Hiebert's
|
||||
* ctags (the one that comes with vim), #define's use a line number to find the
|
||||
* tag in a file while function definitions use a regexp search pattern.
|
||||
*
|
||||
* i'm going to always use the line number because cscope does something
|
||||
* I'm going to always use the line number because cscope does something
|
||||
* quirky (and probably other things i don't know about):
|
||||
*
|
||||
* if you have "# define" in your source file, which is
|
||||
* perfectly legal, cscope thinks you have "#define". this
|
||||
* will result in a failed regexp search. :(
|
||||
*
|
||||
* besides, even if this particular case didn't happen, the search pattern
|
||||
* Besides, even if this particular case didn't happen, the search pattern
|
||||
* would still have to be modified to escape all the special regular expression
|
||||
* characters to comply with ctags formatting.
|
||||
*/
|
||||
@@ -1721,9 +1680,7 @@ cs_make_vim_style_matches(
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_manage_matches
|
||||
*
|
||||
* this is kind of hokey, but i don't see an easy way round this..
|
||||
* This is kind of hokey, but i don't see an easy way round this.
|
||||
*
|
||||
* Store: keep a ptr to the (malloc'd) memory of matches originally
|
||||
* generated from cs_find(). the matches are originally lines directly
|
||||
@@ -1792,7 +1749,7 @@ cs_manage_matches(
|
||||
cs_print_tags_priv(mp, cp, cnt);
|
||||
break;
|
||||
default: /* should not reach here */
|
||||
(void)EMSG(_("E570: fatal error in cs_manage_matches"));
|
||||
IEMSG(_("E570: fatal error in cs_manage_matches"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1801,9 +1758,7 @@ cs_manage_matches(
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_parse_results
|
||||
*
|
||||
* parse cscope output
|
||||
* Parse cscope output.
|
||||
*/
|
||||
static char *
|
||||
cs_parse_results(
|
||||
@@ -1864,9 +1819,7 @@ cs_parse_results(
|
||||
|
||||
#ifdef FEAT_QUICKFIX
|
||||
/*
|
||||
* PRIVATE: cs_file_results
|
||||
*
|
||||
* write cscope find results to file
|
||||
* Write cscope find results to file.
|
||||
*/
|
||||
static void
|
||||
cs_file_results(FILE *f, int *nummatches_a)
|
||||
@@ -1919,10 +1872,8 @@ cs_file_results(FILE *f, int *nummatches_a)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_fill_results
|
||||
*
|
||||
* get parsed cscope output and calls cs_make_vim_style_matches to convert
|
||||
* into ctags format
|
||||
* Get parsed cscope output and calls cs_make_vim_style_matches to convert
|
||||
* into ctags format.
|
||||
* When there are no matches sets "*matches_p" to NULL.
|
||||
*/
|
||||
static void
|
||||
@@ -2032,9 +1983,7 @@ cs_pathcomponents(char *path)
|
||||
}
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_print_tags_priv
|
||||
*
|
||||
* called from cs_manage_matches()
|
||||
* Called from cs_manage_matches().
|
||||
*/
|
||||
static void
|
||||
cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
|
||||
@@ -2182,9 +2131,7 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_read_prompt
|
||||
*
|
||||
* read a cscope prompt (basically, skip over the ">> ")
|
||||
* Read a cscope prompt (basically, skip over the ">> ").
|
||||
*/
|
||||
static int
|
||||
cs_read_prompt(int i)
|
||||
@@ -2280,8 +2227,6 @@ sig_handler SIGDEFARG(sigarg)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_release_csp
|
||||
*
|
||||
* Does the actual free'ing for the cs ptr with an optional flag of whether
|
||||
* or not to free the filename. Called by cs_kill and cs_reset.
|
||||
*/
|
||||
@@ -2408,9 +2353,7 @@ cs_release_csp(int i, int freefnpp)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_reset
|
||||
*
|
||||
* calls cs_kill on all cscope connections then reinits
|
||||
* Calls cs_kill on all cscope connections then reinits.
|
||||
*/
|
||||
static int
|
||||
cs_reset(exarg_T *eap UNUSED)
|
||||
@@ -2474,8 +2417,6 @@ cs_reset(exarg_T *eap UNUSED)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_resolve_file
|
||||
*
|
||||
* Construct the full pathname to a file found in the cscope database.
|
||||
* (Prepends ppath, if there is one and if it's not already prepended,
|
||||
* otherwise just uses the name found.)
|
||||
@@ -2544,9 +2485,7 @@ cs_resolve_file(int i, char *name)
|
||||
|
||||
|
||||
/*
|
||||
* PRIVATE: cs_show
|
||||
*
|
||||
* show all cscope connections
|
||||
* Show all cscope connections.
|
||||
*/
|
||||
static int
|
||||
cs_show(exarg_T *eap UNUSED)
|
||||
@@ -2579,8 +2518,6 @@ cs_show(exarg_T *eap UNUSED)
|
||||
|
||||
|
||||
/*
|
||||
* PUBLIC: cs_end
|
||||
*
|
||||
* Only called when VIM exits to quit any cscope sessions.
|
||||
*/
|
||||
void
|
||||
|
||||
+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);
|
||||
|
||||
+1
-1
@@ -328,7 +328,7 @@ json_encode_item(garray_T *gap, typval_T *val, int copyID, int options)
|
||||
break;
|
||||
#endif
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "json_encode_item()");
|
||||
internal_error("json_encode_item()");
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
|
||||
+6
-1
@@ -177,6 +177,7 @@
|
||||
# define mch_fstat(n, p) fstat(vms_fixfilename(n), (p))
|
||||
/* VMS does not have lstat() */
|
||||
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
|
||||
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
|
||||
#else
|
||||
# ifndef WIN32
|
||||
# define mch_access(n, p) access((n), (p))
|
||||
@@ -344,7 +345,11 @@
|
||||
# endif
|
||||
# if !defined(INFINITY)
|
||||
# if defined(DBL_MAX)
|
||||
# define INFINITY (DBL_MAX+DBL_MAX)
|
||||
# ifdef VMS
|
||||
# define INFINITY DBL_MAX
|
||||
# else
|
||||
# define INFINITY (DBL_MAX+DBL_MAX)
|
||||
# endif
|
||||
# else
|
||||
# define INFINITY (1.0 / 0.0)
|
||||
# endif
|
||||
|
||||
+2
-2
@@ -22,11 +22,11 @@
|
||||
# A U T O C O N F
|
||||
#
|
||||
|
||||
# Run autoconf when configure.in has been changed since it was last run.
|
||||
# Run autoconf when configure.ac has been changed since it was last run.
|
||||
# This is skipped when the signatures in "mysign" are up-to-date. When
|
||||
# there is no autoconf program skip this (the signature is often the only
|
||||
# thing that's outdated)
|
||||
auto/configure {signfile = mysign} : configure.in
|
||||
auto/configure {signfile = mysign} : configure.ac
|
||||
@if not program_path("autoconf"):
|
||||
:print Can't find autoconf, using existing configure script.
|
||||
@else:
|
||||
|
||||
+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
|
||||
|
||||
|
||||
+1
-1
@@ -482,7 +482,7 @@ mf_put(
|
||||
flags = hp->bh_flags;
|
||||
|
||||
if ((flags & BH_LOCKED) == 0)
|
||||
EMSG(_("E293: block was not locked"));
|
||||
IEMSG(_("E293: block was not locked"));
|
||||
flags &= ~BH_LOCKED;
|
||||
if (dirty)
|
||||
{
|
||||
|
||||
+14
-14
@@ -333,7 +333,7 @@ ml_open(buf_T *buf)
|
||||
goto error;
|
||||
if (hp->bh_bnum != 0)
|
||||
{
|
||||
EMSG(_("E298: Didn't get block nr 0?"));
|
||||
IEMSG(_("E298: Didn't get block nr 0?"));
|
||||
goto error;
|
||||
}
|
||||
b0p = (ZERO_BL *)(hp->bh_data);
|
||||
@@ -383,7 +383,7 @@ ml_open(buf_T *buf)
|
||||
goto error;
|
||||
if (hp->bh_bnum != 1)
|
||||
{
|
||||
EMSG(_("E298: Didn't get block nr 1?"));
|
||||
IEMSG(_("E298: Didn't get block nr 1?"));
|
||||
goto error;
|
||||
}
|
||||
pp = (PTR_BL *)(hp->bh_data);
|
||||
@@ -401,7 +401,7 @@ ml_open(buf_T *buf)
|
||||
goto error;
|
||||
if (hp->bh_bnum != 2)
|
||||
{
|
||||
EMSG(_("E298: Didn't get block nr 2?"));
|
||||
IEMSG(_("E298: Didn't get block nr 2?"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -950,7 +950,7 @@ ml_upd_block0(buf_T *buf, upd_block0_T what)
|
||||
|
||||
b0p = (ZERO_BL *)(hp->bh_data);
|
||||
if (ml_check_b0_id(b0p) == FAIL)
|
||||
EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
|
||||
IEMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
|
||||
else
|
||||
{
|
||||
if (what == UB_FNAME)
|
||||
@@ -2450,7 +2450,7 @@ ml_get_buf(
|
||||
/* Avoid giving this message for a recursive call, may happen when
|
||||
* the GUI redraws part of the text. */
|
||||
++recursive;
|
||||
EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
|
||||
IEMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
|
||||
--recursive;
|
||||
}
|
||||
errorret:
|
||||
@@ -2485,7 +2485,7 @@ errorret:
|
||||
/* Avoid giving this message for a recursive call, may happen
|
||||
* when the GUI redraws part of the text. */
|
||||
++recursive;
|
||||
EMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
|
||||
IEMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
|
||||
--recursive;
|
||||
}
|
||||
goto errorret;
|
||||
@@ -2900,7 +2900,7 @@ ml_append_int(
|
||||
pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
|
||||
if (pp->pb_id != PTR_ID)
|
||||
{
|
||||
EMSG(_("E317: pointer block id wrong 3"));
|
||||
IEMSG(_("E317: pointer block id wrong 3"));
|
||||
mf_put(mfp, hp, FALSE, FALSE);
|
||||
return FAIL;
|
||||
}
|
||||
@@ -3042,7 +3042,7 @@ ml_append_int(
|
||||
*/
|
||||
if (stack_idx < 0)
|
||||
{
|
||||
EMSG(_("E318: Updated too many blocks?"));
|
||||
IEMSG(_("E318: Updated too many blocks?"));
|
||||
buf->b_ml.ml_stack_top = 0; /* invalidate stack */
|
||||
}
|
||||
}
|
||||
@@ -3220,7 +3220,7 @@ ml_delete_int(buf_T *buf, linenr_T lnum, int message)
|
||||
pp = (PTR_BL *)(hp->bh_data); /* must be pointer block */
|
||||
if (pp->pb_id != PTR_ID)
|
||||
{
|
||||
EMSG(_("E317: pointer block id wrong 4"));
|
||||
IEMSG(_("E317: pointer block id wrong 4"));
|
||||
mf_put(mfp, hp, FALSE, FALSE);
|
||||
return FAIL;
|
||||
}
|
||||
@@ -3432,7 +3432,7 @@ ml_flush_line(buf_T *buf)
|
||||
|
||||
hp = ml_find_line(buf, lnum, ML_FIND);
|
||||
if (hp == NULL)
|
||||
EMSGN(_("E320: Cannot find line %ld"), lnum);
|
||||
IEMSGN(_("E320: Cannot find line %ld"), lnum);
|
||||
else
|
||||
{
|
||||
dp = (DATA_BL *)(hp->bh_data);
|
||||
@@ -3674,7 +3674,7 @@ ml_find_line(buf_T *buf, linenr_T lnum, int action)
|
||||
pp = (PTR_BL *)(dp); /* must be pointer block */
|
||||
if (pp->pb_id != PTR_ID)
|
||||
{
|
||||
EMSG(_("E317: pointer block id wrong"));
|
||||
IEMSG(_("E317: pointer block id wrong"));
|
||||
goto error_block;
|
||||
}
|
||||
|
||||
@@ -3719,11 +3719,11 @@ ml_find_line(buf_T *buf, linenr_T lnum, int action)
|
||||
if (idx >= (int)pp->pb_count) /* past the end: something wrong! */
|
||||
{
|
||||
if (lnum > buf->b_ml.ml_line_count)
|
||||
EMSGN(_("E322: line number out of range: %ld past the end"),
|
||||
IEMSGN(_("E322: line number out of range: %ld past the end"),
|
||||
lnum - buf->b_ml.ml_line_count);
|
||||
|
||||
else
|
||||
EMSGN(_("E323: line count wrong in block %ld"), bnum);
|
||||
IEMSGN(_("E323: line count wrong in block %ld"), bnum);
|
||||
goto error_block;
|
||||
}
|
||||
if (action == ML_DELETE)
|
||||
@@ -3817,7 +3817,7 @@ ml_lineadd(buf_T *buf, int count)
|
||||
if (pp->pb_id != PTR_ID)
|
||||
{
|
||||
mf_put(mfp, hp, FALSE, FALSE);
|
||||
EMSG(_("E317: pointer block id wrong 2"));
|
||||
IEMSG(_("E317: pointer block id wrong 2"));
|
||||
break;
|
||||
}
|
||||
pp->pb_pointer[ip->ip_index].pe_line_count += count;
|
||||
|
||||
+103
-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,9 +677,15 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Print an error message with one "%s" and one string argument.
|
||||
*/
|
||||
@@ -671,6 +695,84 @@ emsg2(char_u *s, char_u *a1)
|
||||
return emsg3(s, a1, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print an error message with one or two "%s" and one or two string arguments.
|
||||
* This is not in message.c to avoid a warning for prototypes.
|
||||
*/
|
||||
int
|
||||
emsg3(char_u *s, char_u *a1, char_u *a2)
|
||||
{
|
||||
if (emsg_not_now())
|
||||
return TRUE; /* no error messages at the moment */
|
||||
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2);
|
||||
return emsg(IObuff);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print an error message with one "%ld" and one long int argument.
|
||||
* This is not in message.c to avoid a warning for prototypes.
|
||||
*/
|
||||
int
|
||||
emsgn(char_u *s, long n)
|
||||
{
|
||||
if (emsg_not_now())
|
||||
return TRUE; /* no error messages at the moment */
|
||||
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n);
|
||||
return emsg(IObuff);
|
||||
}
|
||||
|
||||
/*
|
||||
* Same as emsg(...), but abort on error when ABORT_ON_INTERNAL_ERROR is
|
||||
* defined. It is used for internal errors only, so that they can be
|
||||
* detected when fuzzing vim.
|
||||
*/
|
||||
void
|
||||
iemsg(char_u *s)
|
||||
{
|
||||
msg(s);
|
||||
#ifdef ABORT_ON_INTERNAL_ERROR
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Same as emsg2(...) but abort on error when ABORT_ON_INTERNAL_ERROR is
|
||||
* defined. It is used for internal errors only, so that they can be
|
||||
* detected when fuzzing vim.
|
||||
*/
|
||||
void
|
||||
iemsg2(char_u *s, char_u *a1)
|
||||
{
|
||||
emsg2(s, a1);
|
||||
#ifdef ABORT_ON_INTERNAL_ERROR
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Same as emsgn(...) but abort on error when ABORT_ON_INTERNAL_ERROR is
|
||||
* defined. It is used for internal errors only, so that they can be
|
||||
* detected when fuzzing vim.
|
||||
*/
|
||||
void
|
||||
iemsgn(char_u *s, long n)
|
||||
{
|
||||
emsgn(s, n);
|
||||
#ifdef ABORT_ON_INTERNAL_ERROR
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Give an "Internal error" message.
|
||||
*/
|
||||
void
|
||||
internal_error(char *where)
|
||||
{
|
||||
IEMSG2(_(e_intern2), where);
|
||||
}
|
||||
|
||||
/* emsg3() and emsgn() are in misc2.c to avoid warnings for the prototypes. */
|
||||
|
||||
void
|
||||
|
||||
@@ -5768,6 +5768,7 @@ cin_is_cpp_namespace(char_u *s)
|
||||
{
|
||||
char_u *p;
|
||||
int has_name = FALSE;
|
||||
int has_name_start = FALSE;
|
||||
|
||||
s = cin_skipcomment(s);
|
||||
if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9])))
|
||||
@@ -5786,10 +5787,18 @@ cin_is_cpp_namespace(char_u *s)
|
||||
}
|
||||
else if (vim_iswordc(*p))
|
||||
{
|
||||
has_name_start = TRUE;
|
||||
if (has_name)
|
||||
return FALSE; /* word character after skipping past name */
|
||||
++p;
|
||||
}
|
||||
else if (p[0] == ':' && p[1] == ':' && vim_iswordc(p[2]))
|
||||
{
|
||||
if (!has_name_start || has_name)
|
||||
return FALSE;
|
||||
/* C++ 17 nested namespace */
|
||||
p += 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
|
||||
+33
-49
@@ -918,7 +918,7 @@ lalloc(long_u size, int message)
|
||||
{
|
||||
/* Don't hide this message */
|
||||
emsg_silent = 0;
|
||||
EMSGN(_("E341: Internal error: lalloc(%ld, )"), size);
|
||||
IEMSGN(_("E341: Internal error: lalloc(%ld, )"), size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1075,7 +1075,7 @@ free_all_mem(void)
|
||||
p_ea = FALSE;
|
||||
if (first_tabpage->tp_next != NULL)
|
||||
do_cmdline_cmd((char_u *)"tabonly!");
|
||||
if (firstwin != lastwin)
|
||||
if (!ONE_WINDOW)
|
||||
do_cmdline_cmd((char_u *)"only!");
|
||||
# endif
|
||||
|
||||
@@ -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
|
||||
/*
|
||||
@@ -6046,32 +6025,6 @@ filewritable(char_u *fname)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Print an error message with one or two "%s" and one or two string arguments.
|
||||
* This is not in message.c to avoid a warning for prototypes.
|
||||
*/
|
||||
int
|
||||
emsg3(char_u *s, char_u *a1, char_u *a2)
|
||||
{
|
||||
if (emsg_not_now())
|
||||
return TRUE; /* no error messages at the moment */
|
||||
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2);
|
||||
return emsg(IObuff);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print an error message with one "%ld" and one long int argument.
|
||||
* This is not in message.c to avoid a warning for prototypes.
|
||||
*/
|
||||
int
|
||||
emsgn(char_u *s, long n)
|
||||
{
|
||||
if (emsg_not_now())
|
||||
return TRUE; /* no error messages at the moment */
|
||||
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n);
|
||||
return emsg(IObuff);
|
||||
}
|
||||
|
||||
#if defined(FEAT_SPELL) || defined(FEAT_PERSISTENT_UNDO) || defined(PROTO)
|
||||
/*
|
||||
* Read 2 bytes from "fd" and turn them into an int, MSB first.
|
||||
@@ -6262,6 +6215,7 @@ has_non_ascii(char_u *s)
|
||||
#if defined(MESSAGE_QUEUE) || defined(PROTO)
|
||||
/*
|
||||
* Process messages that have been queued for netbeans or clientserver.
|
||||
* Also check if any jobs have ended.
|
||||
* These functions can call arbitrary vimscript and should only be called when
|
||||
* it is safe to do so.
|
||||
*/
|
||||
@@ -6294,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
|
||||
|
||||
+2
-2
@@ -2340,7 +2340,7 @@ onepage(int dir, long count)
|
||||
#endif
|
||||
if (dir == FORWARD)
|
||||
{
|
||||
if (firstwin == lastwin && p_window > 0 && p_window < Rows - 1)
|
||||
if (ONE_WINDOW && p_window > 0 && p_window < Rows - 1)
|
||||
{
|
||||
/* Vi compatible scrolling */
|
||||
if (p_window <= 2)
|
||||
@@ -2390,7 +2390,7 @@ onepage(int dir, long count)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (firstwin == lastwin && p_window > 0 && p_window < Rows - 1)
|
||||
if (ONE_WINDOW && p_window > 0 && p_window < Rows - 1)
|
||||
{
|
||||
/* Vi compatible scrolling (sort of) */
|
||||
if (p_window <= 2)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
=auto/configure-lastupdate=1178970549.78-@buildcheck=dfc15c059b7ce88a951584995c49a201=configure.in@md5=e0d6e9a7d7b986d63ce4e8e7362fd0b9
|
||||
=auto/configure-lastupdate=1178970549.78-@buildcheck=dfc15c059b7ce88a951584995c49a201=configure.ac@md5=e0d6e9a7d7b986d63ce4e8e7362fd0b9
|
||||
|
||||
+11
-2
@@ -1995,6 +1995,11 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
|
||||
break;
|
||||
|
||||
case OP_FUNCTION:
|
||||
#ifdef FEAT_LINEBREAK
|
||||
/* Restore linebreak, so that when the user edits it looks as
|
||||
* before. */
|
||||
curwin->w_p_lbr = lbr_saved;
|
||||
#endif
|
||||
op_function(oap); /* call 'operatorfunc' */
|
||||
break;
|
||||
|
||||
@@ -5747,9 +5752,13 @@ nv_ident(cmdarg_T *cap)
|
||||
*/
|
||||
if (cmdchar == 'K' && !kp_help)
|
||||
{
|
||||
/* Escape the argument properly for a shell command */
|
||||
ptr = vim_strnsave(ptr, n);
|
||||
p = vim_strsave_shellescape(ptr, TRUE, TRUE);
|
||||
if (kp_ex)
|
||||
/* Escape the argument properly for an Ex command */
|
||||
p = vim_strsave_fnameescape(ptr, FALSE);
|
||||
else
|
||||
/* Escape the argument properly for a shell command */
|
||||
p = vim_strsave_shellescape(ptr, TRUE, TRUE);
|
||||
vim_free(ptr);
|
||||
if (p == NULL)
|
||||
{
|
||||
|
||||
+82
-28
@@ -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
|
||||
@@ -5700,7 +5710,7 @@ was_set_insecurely(char_u *opt, int opt_flags)
|
||||
flagp = insecure_flag(idx, opt_flags);
|
||||
return (*flagp & P_INSECURE) != 0;
|
||||
}
|
||||
EMSG2(_(e_intern2), "was_set_insecurely()");
|
||||
internal_error("was_set_insecurely()");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -5781,7 +5791,7 @@ set_string_option_direct(
|
||||
if (idx < 0) /* not found (should not happen) */
|
||||
{
|
||||
EMSG2(_(e_intern2), "set_string_option_direct()");
|
||||
EMSG2(_("For option %s"), name);
|
||||
IEMSG2(_("For option %s"), name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -5907,6 +5917,23 @@ set_string_option(
|
||||
return r;
|
||||
}
|
||||
|
||||
#if defined(FEAT_KEYMAP) || defined(FEAT_AUTOCMD) || defined(FEAT_SYN_HL)
|
||||
/*
|
||||
* Return TRUE if "val" is a valid 'filetype' name.
|
||||
* Also used for 'syntax' and 'keymap'.
|
||||
*/
|
||||
static int
|
||||
valid_filetype(char_u *val)
|
||||
{
|
||||
char_u *s;
|
||||
|
||||
for (s = val; *s != NUL; ++s)
|
||||
if (!ASCII_ISALNUM(*s) && vim_strchr((char_u *)".-_", *s) == NULL)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Handle string options that need some action to perform when changed.
|
||||
* Returns NULL for success, or an error message for an error.
|
||||
@@ -5944,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;
|
||||
}
|
||||
@@ -6324,8 +6355,11 @@ did_set_string_option(
|
||||
#ifdef FEAT_KEYMAP
|
||||
else if (varp == &curbuf->b_p_keymap)
|
||||
{
|
||||
/* load or unload key mapping tables */
|
||||
errmsg = keymap_init();
|
||||
if (!valid_filetype(*varp))
|
||||
errmsg = e_invarg;
|
||||
else
|
||||
/* load or unload key mapping tables */
|
||||
errmsg = keymap_init();
|
||||
|
||||
if (errmsg == NULL)
|
||||
{
|
||||
@@ -7091,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,
|
||||
@@ -7315,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))
|
||||
@@ -7322,23 +7358,39 @@ did_set_string_option(
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
else if (gvarp == &p_ft)
|
||||
{
|
||||
if (!valid_filetype(*varp))
|
||||
errmsg = e_invarg;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_SYN_HL
|
||||
else if (gvarp == &p_syn)
|
||||
{
|
||||
if (!valid_filetype(*varp))
|
||||
errmsg = e_invarg;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Options that are a list of flags. */
|
||||
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;
|
||||
@@ -7348,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)
|
||||
@@ -8663,7 +8715,7 @@ set_num_option(
|
||||
}
|
||||
|
||||
/* Change window height NOW */
|
||||
if (lastwin != firstwin)
|
||||
if (!ONE_WINDOW)
|
||||
{
|
||||
if (pp == &p_wh && curwin->w_height < p_wh)
|
||||
win_setheight((int)p_wh);
|
||||
@@ -8703,7 +8755,7 @@ set_num_option(
|
||||
}
|
||||
|
||||
/* Change window width NOW */
|
||||
if (lastwin != firstwin && curwin->w_width < p_wiw)
|
||||
if (!ONE_WINDOW && curwin->w_width < p_wiw)
|
||||
win_setwidth((int)p_wiw);
|
||||
}
|
||||
|
||||
@@ -9187,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)
|
||||
@@ -9514,7 +9568,7 @@ option_iter_next(void **option, int opt_type)
|
||||
ret = NULL;
|
||||
break;
|
||||
default:
|
||||
EMSG2(_(e_intern2), "option_iter_next()");
|
||||
internal_error("option_iter_next()");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -10214,7 +10268,7 @@ istermoption(struct vimoption *p)
|
||||
comp_col(void)
|
||||
{
|
||||
#if defined(FEAT_CMDL_INFO) && defined(FEAT_WINDOWS)
|
||||
int last_has_status = (p_ls == 2 || (p_ls == 1 && firstwin != lastwin));
|
||||
int last_has_status = (p_ls == 2 || (p_ls == 1 && !ONE_WINDOW));
|
||||
|
||||
sc_col = 0;
|
||||
ru_col = 0;
|
||||
@@ -10638,7 +10692,7 @@ get_varp(struct vimoption *p)
|
||||
#ifdef FEAT_SIGNS
|
||||
case PV_SCL: return (char_u *)&(curwin->w_p_scl);
|
||||
#endif
|
||||
default: EMSG(_("E356: get_varp ERROR"));
|
||||
default: IEMSG(_("E356: get_varp ERROR"));
|
||||
}
|
||||
/* always return a valid pointer to avoid a crash! */
|
||||
return (char_u *)&(curbuf->b_p_wm);
|
||||
|
||||
@@ -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' */
|
||||
|
||||
+5
-3
@@ -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;
|
||||
}
|
||||
@@ -2893,7 +2895,7 @@ get_logfont(
|
||||
*/
|
||||
for (p = name; *p && *p != ':'; p++)
|
||||
{
|
||||
if (p - name + 1 > LF_FACESIZE)
|
||||
if (p - name + 1 >= LF_FACESIZE)
|
||||
goto theend; /* Name too long */
|
||||
lf->lfFaceName[p - name] = *p;
|
||||
}
|
||||
|
||||
+61
-52
@@ -238,6 +238,10 @@ static volatile int deadly_signal = 0; /* The signal we caught */
|
||||
/* volatile because it is used in signal handler deathtrap(). */
|
||||
static volatile int in_mch_delay = FALSE; /* sleeping in mch_delay() */
|
||||
|
||||
#if defined(FEAT_JOB_CHANNEL) && !defined(USE_SYSTEM)
|
||||
static int dont_check_job_ended = 0;
|
||||
#endif
|
||||
|
||||
static int curr_tmode = TMODE_COOK; /* contains current terminal mode */
|
||||
|
||||
#ifdef USE_XSMP
|
||||
@@ -261,7 +265,7 @@ static xsmp_config_T xsmp;
|
||||
* that describe the signals. That is nearly what we want here. But
|
||||
* autoconf does only check for sys_siglist (without the underscore), I
|
||||
* do not want to change everything today.... jw.
|
||||
* This is why AC_DECL_SYS_SIGLIST is commented out in configure.in
|
||||
* This is why AC_DECL_SYS_SIGLIST is commented out in configure.ac.
|
||||
*/
|
||||
#endif
|
||||
|
||||
@@ -372,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.
|
||||
@@ -407,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 */
|
||||
@@ -434,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)
|
||||
@@ -473,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
|
||||
|
||||
/*
|
||||
@@ -501,7 +494,7 @@ mch_inchar(
|
||||
/* no character available */
|
||||
#if !(defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H))
|
||||
/* estimate the elapsed time */
|
||||
elapsed += wait_time;
|
||||
elapsed_time += wait_time;
|
||||
#endif
|
||||
|
||||
if (do_resize /* interrupted by SIGWINCH signal */
|
||||
@@ -1550,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
|
||||
@@ -1860,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
|
||||
@@ -2646,7 +2637,7 @@ fname_case(
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
|
||||
if (lstat((char *)name, &st) >= 0)
|
||||
if (mch_lstat((char *)name, &st) >= 0)
|
||||
{
|
||||
/* Open the directory where the file is located. */
|
||||
slash = vim_strrchr(name, '/');
|
||||
@@ -2679,7 +2670,7 @@ fname_case(
|
||||
vim_strncpy(newname, name, MAXPATHL);
|
||||
vim_strncpy(newname + (tail - name), (char_u *)dp->d_name,
|
||||
MAXPATHL - (tail - name));
|
||||
if (lstat((char *)newname, &st2) >= 0
|
||||
if (mch_lstat((char *)newname, &st2) >= 0
|
||||
&& st.st_ino == st2.st_ino
|
||||
&& st.st_dev == st2.st_dev)
|
||||
{
|
||||
@@ -3042,7 +3033,7 @@ mch_isrealdir(char_u *name)
|
||||
|
||||
if (*name == NUL) /* Some stat()s don't flag "" as an error. */
|
||||
return FALSE;
|
||||
if (lstat((char *)name, &statb))
|
||||
if (mch_lstat((char *)name, &statb))
|
||||
return FALSE;
|
||||
#ifdef _POSIX_SOURCE
|
||||
return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
|
||||
@@ -4104,6 +4095,7 @@ mch_call_shell(
|
||||
int tmode = cur_tmode;
|
||||
#ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */
|
||||
char_u *newcmd; /* only needed for unix */
|
||||
int x;
|
||||
|
||||
out_flush();
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
@@ -4502,7 +4494,9 @@ mch_call_shell(
|
||||
catch_signals(SIG_IGN, SIG_ERR);
|
||||
catch_int_signal();
|
||||
UNBLOCK_SIGNALS(&curset);
|
||||
|
||||
# ifdef FEAT_JOB_CHANNEL
|
||||
++dont_check_job_ended;
|
||||
# endif
|
||||
/*
|
||||
* For the GUI we redirect stdin, stdout and stderr to our window.
|
||||
* This is also used to pipe stdin/stdout to/from the external
|
||||
@@ -4641,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 (;;)
|
||||
{
|
||||
@@ -4677,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);
|
||||
}
|
||||
@@ -4901,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
|
||||
@@ -5051,6 +5045,10 @@ finished:
|
||||
wait4pid(wpid, NULL);
|
||||
}
|
||||
|
||||
# ifdef FEAT_JOB_CHANNEL
|
||||
--dont_check_job_ended;
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Set to raw mode right now, otherwise a CTRL-C after
|
||||
* catch_signals() will kill Vim.
|
||||
@@ -5365,7 +5363,7 @@ mch_job_status(job_T *job)
|
||||
return "run";
|
||||
|
||||
return_dead:
|
||||
if (job->jv_status != JOB_ENDED)
|
||||
if (job->jv_status < JOB_ENDED)
|
||||
{
|
||||
ch_log(job->jv_channel, "Job ended");
|
||||
job->jv_status = JOB_ENDED;
|
||||
@@ -5384,6 +5382,14 @@ mch_detect_ended_job(job_T *job_list)
|
||||
pid_t wait_pid = 0;
|
||||
job_T *job;
|
||||
|
||||
# ifndef USE_SYSTEM
|
||||
/* Do not do this when waiting for a shell command to finish, we would get
|
||||
* the exit value here (and discard it), the exit value obtained there
|
||||
* would then be wrong. */
|
||||
if (dont_check_job_ended > 0)
|
||||
return NULL;
|
||||
# endif
|
||||
|
||||
# ifdef __NeXT__
|
||||
wait_pid = wait4(-1, &status, WNOHANG, (struct rusage *)0);
|
||||
# else
|
||||
@@ -5401,7 +5407,7 @@ mch_detect_ended_job(job_T *job_list)
|
||||
job->jv_exitval = WEXITSTATUS(status);
|
||||
else if (WIFSIGNALED(status))
|
||||
job->jv_exitval = -1;
|
||||
if (job->jv_status != JOB_ENDED)
|
||||
if (job->jv_status < JOB_ENDED)
|
||||
{
|
||||
ch_log(job->jv_channel, "Job ended");
|
||||
job->jv_status = JOB_ENDED;
|
||||
@@ -5412,6 +5418,10 @@ mch_detect_ended_job(job_T *job_list)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a (deadly) signal to "job".
|
||||
* Return FAIL if "how" is not a valid name.
|
||||
*/
|
||||
int
|
||||
mch_stop_job(job_T *job, char_u *how)
|
||||
{
|
||||
@@ -5631,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
|
||||
@@ -5946,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;
|
||||
@@ -7045,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 */
|
||||
@@ -7091,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
|
||||
|
||||
@@ -75,10 +75,6 @@
|
||||
# ifdef VMS
|
||||
# define mch_remove(x) delete((char *)(x))
|
||||
# define vim_mkdir(x, y) mkdir((char *)(x), y)
|
||||
# ifdef VAX
|
||||
# else
|
||||
# define mch_rmdir(x) rmdir((char *)(x))
|
||||
# endif
|
||||
# else
|
||||
# define vim_mkdir(x, y) mkdir((char *)(x), y)
|
||||
# define mch_rmdir(x) rmdir((char *)(x))
|
||||
|
||||
+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
|
||||
|
||||
|
||||
+2
-1
@@ -726,7 +726,8 @@ struct typeahead_st {
|
||||
RealWaitForChar(
|
||||
int fd UNUSED, /* always read from iochan */
|
||||
long msec,
|
||||
int *check_for_gpm UNUSED)
|
||||
int *check_for_gpm UNUSED,
|
||||
int *interrupted)
|
||||
{
|
||||
int status;
|
||||
struct _generic_64 time_curr;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user