mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
294 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4cefe0c276 | |||
| 97ed4ba2f8 | |||
| ba47b51ff8 | |||
| 6a717f17ec | |||
| b031c4ea04 | |||
| 941c12da3c | |||
| bff6ad1331 | |||
| 48c9f3b123 | |||
| 076e502199 | |||
| 915350edec | |||
| 24a2d416ec | |||
| e80371bfbb | |||
| 43ac38d613 | |||
| abbc448bc0 | |||
| 2aa5f696b9 | |||
| 1695f99d08 | |||
| 9957a10d0f | |||
| 7a2699e868 | |||
| fffbf308dd | |||
| 831e48f10b | |||
| e091a4b25c | |||
| c81299684b | |||
| 6a8ede99dd | |||
| 15eedf1d62 | |||
| 7a40ea2138 | |||
| 2b2207ba69 | |||
| e2d74dbe19 | |||
| e2c6037da3 | |||
| e362c3d2c3 | |||
| d7a96151e0 | |||
| ca24e2cfcf | |||
| 423977d3ce | |||
| 88c8df3f81 | |||
| 560379d7ae | |||
| 33ed6029da | |||
| ec2da36ca4 | |||
| 41baa7983a | |||
| bf5eddebf1 | |||
| 25b0e6b701 | |||
| 23c9e8b3bc | |||
| a5f2cc0333 | |||
| 8822744b4d | |||
| 5e4e1b1299 | |||
| eb46f8fa14 | |||
| 6e78e27b8a | |||
| 4007ed4a5e | |||
| d61e8aaae5 | |||
| 58f60ca2fc | |||
| 6d721c7e10 | |||
| de318c5c35 | |||
| 369b6f57c4 | |||
| 97d62d4321 | |||
| c011a3d083 | |||
| a9d23c2087 | |||
| e32bbded64 | |||
| 1b9750d805 | |||
| 42b8d916c7 | |||
| 4f391796b7 | |||
| 810f9c361c | |||
| 296b1f28ca | |||
| 9506cad7a1 | |||
| d5069d644e | |||
| fe6ce331d9 | |||
| 5869cf060e | |||
| fad609d067 | |||
| 2b7bc567b9 | |||
| 7173b47958 | |||
| e47683a091 | |||
| 519d7785f4 | |||
| 83381f7129 | |||
| 9be7c04e6c | |||
| 40bc4e9b8d | |||
| 9b73c4a215 | |||
| e13b9afe12 | |||
| 0bdef250b2 | |||
| 70bcd7336f | |||
| 972c3b8f1b | |||
| b8f7bd68f6 | |||
| a1fa892939 | |||
| 220f000f59 | |||
| 9c4147192a | |||
| 1d669c233c | |||
| ee142add22 | |||
| e32abbe42c | |||
| 8b2f19536f | |||
| 872004132f | |||
| 08243d26d2 | |||
| 03c60c1573 | |||
| f446b48ff0 | |||
| caa55b65c2 | |||
| 68563937f5 | |||
| 8be81c4e3b | |||
| 6abda995a5 | |||
| 009c7b2640 | |||
| 4d0504019c | |||
| acc11d1692 | |||
| de33011ec6 | |||
| c695cec469 | |||
| 6247361101 | |||
| 2d02839050 | |||
| 453b576ee5 | |||
| a216255a4f | |||
| 31f19ce0a0 | |||
| 9d9c356517 | |||
| 04e94c7881 | |||
| 12c4492dd3 | |||
| 386ade3ae2 | |||
| 7069bf18e1 | |||
| cbd4de44e8 | |||
| c6aa475a27 | |||
| 1b14651629 | |||
| 6e450a5754 | |||
| 287266527a | |||
| 29891c4ed4 | |||
| aaeabfbca5 | |||
| 14a612fa2e | |||
| 7034a83743 | |||
| a4ce25bd98 | |||
| 294740d2ac | |||
| 9269315f63 | |||
| f845b87f2b | |||
| 4374735576 | |||
| 1e3514c02e | |||
| 8133aa23f0 | |||
| 290ed88c0b | |||
| f9ed667087 | |||
| 263115a528 | |||
| 6127f5c9eb | |||
| 921d522f70 | |||
| a1a2788ffa | |||
| 0cdb72aa38 | |||
| bc2eada542 | |||
| c6e15ba8e7 | |||
| 269aec7e61 | |||
| f8eb9c51e5 | |||
| 5e1e6d265d | |||
| b094ff4b2b | |||
| 777b30f827 | |||
| 54b2bfa399 | |||
| ded2782783 | |||
| 4bf9153e6d | |||
| c4bfedabe0 | |||
| 7c0d06c170 | |||
| fe38b494ff | |||
| 4c8980b717 | |||
| 73b484c4da | |||
| f5464c4b19 | |||
| 63de19e805 | |||
| 0df3c7f2a0 | |||
| 7089237885 | |||
| 73fd498886 | |||
| 6270660611 | |||
| eaaa9bbda6 | |||
| e61a091ac1 | |||
| 7c7e807cb3 | |||
| 1d88ecc753 | |||
| 5ff38b0d07 | |||
| e3f9841f59 | |||
| 1de4548643 | |||
| fd114bd289 | |||
| b115d75a66 | |||
| 4f653a19c5 | |||
| 2fb08d3456 | |||
| 675446da32 | |||
| 3421566376 | |||
| 079c0c9d4a | |||
| a899e6ecc4 | |||
| 3fad98e8af | |||
| a2477fd349 | |||
| 5643db84c6 | |||
| 21efc3633e | |||
| d96d409df8 | |||
| 99c5eb4fd7 | |||
| 5162822914 | |||
| cf49790443 | |||
| 327054df45 | |||
| 6dbf66aa3e | |||
| e3af763d5e | |||
| b04a98f6c3 | |||
| 87f3d202a9 | |||
| eca626fcdb | |||
| eebd84eb94 | |||
| 5a030a540f | |||
| b129a447f3 | |||
| 65e08ee1d2 | |||
| 958dc6923d | |||
| 5cc2a2b8f8 | |||
| 34d4c9f566 | |||
| d05258ea2a | |||
| 0945eaface | |||
| 4b785f69c0 | |||
| 1b15a7159b | |||
| e3e3a15159 | |||
| 16974f80f9 | |||
| f9248a4311 | |||
| f422bcc7f9 | |||
| 8a8199e4a1 | |||
| 7554da4033 | |||
| 031cb743ae | |||
| 319afe3804 | |||
| 73095288da | |||
| 58c358753e | |||
| 833eb1d752 | |||
| 2cab0e1910 | |||
| f7c4ef23fa | |||
| 182707ac10 | |||
| c8b6fd59f0 | |||
| 235364e825 | |||
| 362a5c0b39 | |||
| ca82514bff | |||
| 414abe65f1 | |||
| 6cfc463126 | |||
| 031dd64ad7 | |||
| c85f864c35 | |||
| 75c997049e | |||
| 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.
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ env:
|
||||
vi_cv_path_plain_lua=/usr/local/bin/lua
|
||||
vi_cv_dll_name_perl=/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE/libperl.dylib
|
||||
vi_cv_dll_name_python=/System/Library/Frameworks/Python.framework/Versions/2.7/Python
|
||||
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.5/Python
|
||||
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.6/Python
|
||||
VIMCMD=src/MacVim/build/Release/MacVim.app/Contents/MacOS/Vim
|
||||
"CONFOPT='--with-features=huge --enable-multibyte --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --enable-luainterp=dynamic --with-lua-prefix=/usr/local --enable-gui=macvim'"
|
||||
|
||||
|
||||
@@ -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 @@
|
||||
*autocmd.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
*autocmd.txt* For Vim version 8.0. Last change: 2017 Jan 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -33,7 +33,7 @@ files matching *.c. You can also use autocommands to implement advanced
|
||||
features, such as editing compressed files (see |gzip-example|). The usual
|
||||
place to put autocommands is in your .vimrc or .exrc file.
|
||||
|
||||
*E203* *E204* *E143* *E855*
|
||||
*E203* *E204* *E143* *E855* *E937*
|
||||
WARNING: Using autocommands is very powerful, and may lead to unexpected side
|
||||
effects. Be careful not to destroy your text.
|
||||
- It's a good idea to do some testing on an expendable copy of a file first.
|
||||
|
||||
@@ -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 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -155,7 +155,13 @@ Use |ch_status()| to see if the channel could be opened.
|
||||
func MyCloseHandler(channel)
|
||||
< Vim will invoke callbacks that handle data before invoking
|
||||
close_cb, thus when this function is called no more data will
|
||||
be received.
|
||||
be passed to the callbacks.
|
||||
*channel-drop*
|
||||
"drop" Specifies when to drop messages:
|
||||
"auto" When there is no callback to handle a message.
|
||||
The "close_cb" is also considered for this.
|
||||
"never" All messages will be kept.
|
||||
|
||||
*waittime*
|
||||
"waittime" The time to wait for the connection to be made in
|
||||
milliseconds. A negative number waits forever.
|
||||
@@ -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.
|
||||
|
||||
@@ -595,12 +605,17 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
*job-close_cb*
|
||||
"close_cb": handler Callback for when the channel is closed. Same as
|
||||
"close_cb" on |ch_open()|, see |close_cb|.
|
||||
*job-drop*
|
||||
"drop" Specifies when to drop messages. Same as "drop" on
|
||||
|ch_open()|, see |channel-drop|. For "auto" the
|
||||
exit_cb is not considered.
|
||||
*job-exit_cb*
|
||||
"exit_cb": handler Callback for when the job ends. The arguments are the
|
||||
job and the exit status.
|
||||
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
|
||||
@@ -1057,10 +1060,10 @@ There are several ways to leave the command-line window:
|
||||
Insert and in Normal mode.
|
||||
CTRL-C Continue in Command-line mode. The command-line under the
|
||||
cursor is used as the command-line. Works both in Insert and
|
||||
in Normal mode. ":close" also works. There is no redraw,
|
||||
thus the window will remain visible.
|
||||
in Normal mode. There is no redraw, thus the window will
|
||||
remain visible.
|
||||
:quit Discard the command line and go back to Normal mode.
|
||||
":exit", ":xit" and CTRL-\ CTRL-N also work.
|
||||
":close", ":exit", ":xit" and CTRL-\ CTRL-N also work.
|
||||
:qall Quit Vim, unless there are changes in some buffer.
|
||||
:qall! Quit Vim, discarding changes to any buffer.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 8.0. Last change: 2016 Jan 31
|
||||
*develop.txt* For Vim version 8.0. Last change: 2017 Jan 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -177,7 +177,7 @@ The basic steps to make changes to the code:
|
||||
5. Make a patch with "git diff". You can also create a pull request on
|
||||
github, but it's the diff that matters.
|
||||
6. Make a note about what changed, preferably mentioning the problem and the
|
||||
solution. Send an email to the vim-dev maillist with an explanation and
|
||||
solution. Send an email to the |vim-dev| maillist with an explanation and
|
||||
include the diff. Or create a pull request on github.
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+37
-15
@@ -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: 2017 Jan 14
|
||||
|
||||
|
||||
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()|.
|
||||
|
||||
@@ -5216,6 +5229,7 @@ join({list} [, {sep}]) *join()*
|
||||
js_decode({string}) *js_decode()*
|
||||
This is similar to |json_decode()| with these differences:
|
||||
- Object key names do not have to be in quotes.
|
||||
- Strings can be in single quotes.
|
||||
- Empty items in an array (between two commas) are allowed and
|
||||
result in v:none items.
|
||||
|
||||
@@ -5242,6 +5256,7 @@ json_decode({string}) *json_decode()*
|
||||
- A trailing comma in an array and object is ignored.
|
||||
- More floating point numbers are recognized, e.g. "1." for
|
||||
"1.0".
|
||||
However, a duplicate key in an object is not allowed. *E938*
|
||||
The result must be a valid Vim type:
|
||||
- An empty object member name is not allowed.
|
||||
- Duplicate object member names are not allowed.
|
||||
@@ -7235,7 +7250,7 @@ strcharpart({src}, {start}[, {len}]) *strcharpart()*
|
||||
Like |strpart()| but using character index and length instead
|
||||
of byte index and length.
|
||||
When a character index is used where a character does not
|
||||
exist it is assumed to be one byte. For example: >
|
||||
exist it is assumed to be one character. For example: >
|
||||
strcharpart('abc', -1, 2)
|
||||
< results in 'a'.
|
||||
|
||||
@@ -7548,7 +7563,11 @@ system({expr} [, {input}]) *system()* *E677*
|
||||
If {input} is given and is a |List| it is written to the file
|
||||
in a way |writefile()| does with {binary} set to "b" (i.e.
|
||||
with a newline between each list item with newlines inside
|
||||
list items converted to NULs).
|
||||
list items converted to NULs).
|
||||
When {input} is given and is a number that is a valid id for
|
||||
an existing buffer then the content of the buffer is written
|
||||
to the file line by line, each line terminated by a NL and
|
||||
NULs characters where the text has a NL.
|
||||
|
||||
Pipes are not used, the 'shelltemp' option is not used.
|
||||
|
||||
@@ -7598,7 +7617,8 @@ systemlist({expr} [, {input}]) *systemlist()*
|
||||
Same as |system()|, but returns a |List| with lines (parts of
|
||||
output separated by NL) with NULs transformed into NLs. Output
|
||||
is the same as |readfile()| will output with {binary} argument
|
||||
set to "b".
|
||||
set to "b". Note that on MS-Windows you may get trailing CR
|
||||
characters.
|
||||
|
||||
Returns an empty string on error.
|
||||
|
||||
@@ -8420,6 +8440,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 @@
|
||||
*filetype.txt* For Vim version 8.0. Last change: 2016 Sep 09
|
||||
*filetype.txt* For Vim version 8.0. Last change: 2017 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -573,6 +573,8 @@ Man {number} {name}
|
||||
|
||||
Global mapping:
|
||||
<Leader>K Displays the manual page for the word under the cursor.
|
||||
<Plug>ManPreGetPage idem, allows for using a mapping: >
|
||||
nmap <F1> <Plug>ManPreGetPage<CR>
|
||||
|
||||
Local mappings:
|
||||
CTRL-] Jump to the manual page for the word under the cursor.
|
||||
|
||||
@@ -96,21 +96,18 @@ mention that.
|
||||
|
||||
*mail-list* *maillist*
|
||||
There are several mailing lists for Vim:
|
||||
<vim@vim.org>
|
||||
<vim@vim.org> *vim-use* *vim_use*
|
||||
For discussions about using existing versions of Vim: Useful mappings,
|
||||
questions, answers, where to get a specific version, etc. There are
|
||||
quite a few people watching this list and answering questions, also
|
||||
for beginners. Don't hesitate to ask your question here.
|
||||
<vim-dev@vim.org> *vim-dev* *vimdev*
|
||||
<vim-dev@vim.org> *vim-dev* *vim_dev* *vimdev*
|
||||
For discussions about changing Vim: New features, porting, patches,
|
||||
beta-test versions, etc.
|
||||
<vim-announce@vim.org> *vim-announce*
|
||||
<vim-announce@vim.org> *vim-announce* *vim_announce*
|
||||
Announcements about new versions of Vim; also for beta-test versions
|
||||
and ports to different systems. This is a read-only list.
|
||||
<vim-multibyte@vim.org> *vim-multibyte*
|
||||
For discussions about using and improving the multi-byte aspects of
|
||||
Vim.
|
||||
<vim-mac@vim.org> *vim-mac*
|
||||
<vim-mac@vim.org> *vim-mac* *vim_mac*
|
||||
For discussions about using and improving the Macintosh version of
|
||||
Vim.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 8.0. Last change: 2016 Sep 01
|
||||
*message.txt* For Vim version 8.0. Last change: 2017 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -129,8 +129,9 @@ closed properly. Mostly harmless.
|
||||
Command too recursive
|
||||
|
||||
This happens when an Ex command executes an Ex command that executes an Ex
|
||||
command, etc. This is only allowed 200 times. When it's more there probably
|
||||
is an endless loop. Probably a |:execute| or |:source| command is involved.
|
||||
command, etc. The limit is 200 or the value of 'maxfuncdepth', whatever is
|
||||
larger. When it's more there probably is an endless loop. Probably a
|
||||
|:execute| or |:source| command is involved.
|
||||
|
||||
*E254* >
|
||||
Cannot allocate color {name}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 8.0. Last change: 2016 Jul 12
|
||||
*motion.txt* For Vim version 8.0. Last change: 2016 Nov 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -915,6 +915,7 @@ was made yet in the current file.
|
||||
then the position can be near the end of what the
|
||||
command changed. For example when inserting a word,
|
||||
the position will be on the last character.
|
||||
To jump to older changes use |g;|.
|
||||
{not in Vi}
|
||||
|
||||
*'(* *`(*
|
||||
|
||||
+42
-5
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2016 Oct 12
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Jan 15
|
||||
|
||||
|
||||
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.
|
||||
|
||||
@@ -3430,7 +3430,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'formatprg'* *'fp'*
|
||||
'formatprg' 'fp' string (default "")
|
||||
global
|
||||
global or local to buffer |global-local|
|
||||
{not in Vi}
|
||||
The name of an external program that will be used to format the lines
|
||||
selected with the |gq| operator. The program must take the input on
|
||||
@@ -3984,6 +3984,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
The format of this option is like that of 'statusline'.
|
||||
'guitabtooltip' is used for the tooltip, see below.
|
||||
The expression will be evaluated in the |sandbox| when set from a
|
||||
modeline, see |sandbox-option|.
|
||||
|
||||
Only used when the GUI tab pages line is displayed. 'e' must be
|
||||
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
|
||||
@@ -5171,6 +5173,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
catches endless recursion. When using a recursive function with
|
||||
more depth, set 'maxfuncdepth' to a bigger number. But this will use
|
||||
more memory, there is the danger of failing when memory is exhausted.
|
||||
Increasing this limit above 200 also changes the maximum for Ex
|
||||
command resursion, see |E169|.
|
||||
See also |:function|.
|
||||
|
||||
*'maxmapdepth'* *'mmd'* *E223*
|
||||
@@ -5292,7 +5296,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi} *E21*
|
||||
When off the buffer contents cannot be changed. The 'fileformat' and
|
||||
'fileencoding' options also can't be changed.
|
||||
Can be reset with the |-M| command line argument.
|
||||
Can be reset on startup with the |-M| command line argument.
|
||||
|
||||
*'modified'* *'mod'* *'nomodified'* *'nomod'*
|
||||
'modified' 'mod' boolean (default off)
|
||||
@@ -5851,6 +5855,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
and |+postscript| features}
|
||||
Expression used to print the PostScript produced with |:hardcopy|.
|
||||
See |pexpr-option|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'printfont'* *'pfn'*
|
||||
'printfont' 'pfn' string (default "courier")
|
||||
@@ -5921,6 +5927,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
DYNAMIC_PYTHON_DLL, which was specified at compile time.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonhome'*
|
||||
'pythonhome' string (default "")
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+python/dyn|
|
||||
feature}
|
||||
Note: EXPERIMENTAL. It may be changed or removed in the future.
|
||||
Specifies the name of the Python 2.x home directory. When 'pythonhome'
|
||||
and the PYTHONHOME environment variable are not set, PYTHON_HOME,
|
||||
which was specified at compile time, will be used for the Python 2.x
|
||||
home directory.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonthreedll'*
|
||||
@@ -5933,6 +5954,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
DYNAMIC_PYTHON3_DLL, which was specified at compile time.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonthreehome'*
|
||||
'pythonthreehome' string (default "")
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+python3/dyn|
|
||||
feature}
|
||||
Note: EXPERIMENTAL. It may be changed or removed in the future.
|
||||
Specifies the name of the Python 3 home directory. When
|
||||
'pythonthreehome' and the PYTHONHOME environment variable are not set,
|
||||
PYTHON3_HOME, which was specified at compile time, will be used for
|
||||
the Python 3 home directory.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'quoteescape'* *'qe'*
|
||||
@@ -5955,6 +5991,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
buffer, unless the 'Z' flag is in 'cpoptions'.
|
||||
{not in Vi:} When using the ":view" command the 'readonly' option is
|
||||
set for the newly edited buffer.
|
||||
See 'modifiable' for disallowing changes to the buffer.
|
||||
|
||||
*'redrawtime'* *'rdt'*
|
||||
'redrawtime' 'rdt' number (default 2000)
|
||||
@@ -7973,7 +8010,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 @@
|
||||
*logiPat.txt* Logical Patterns Jun 22, 2015
|
||||
*pi_logipat.txt* Logical Patterns Jun 22, 2015
|
||||
|
||||
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
|
||||
Copyright: (c) 2004-2015 by Charles E. Campbell *logiPat-copyright*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 8.0. Last change: 2016 Aug 21
|
||||
*quickref.txt* For Vim version 8.0. Last change: 2016 Dec 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -840,7 +840,9 @@ Short explanation of each option: *option-list*
|
||||
'prompt' 'prompt' enable prompt in Ex mode
|
||||
'pumheight' 'ph' maximum height of the popup menu
|
||||
'pythondll' name of the Python 2 dynamic library
|
||||
'pythonhome' name of the Python 2 home directory
|
||||
'pythonthreedll' name of the Python 3 dynamic library
|
||||
'pythonthreehome' name of the Python 3 home directory
|
||||
'quoteescape' 'qe' escape characters used in a string
|
||||
'readonly' 'ro' disallow writing the buffer
|
||||
'redrawtime' 'rdt' timeout for 'hlsearch' and |:match| highlighting
|
||||
@@ -1074,6 +1076,8 @@ Short explanation of each option: *option-list*
|
||||
|c_<Up>| <Up>/<Down> recall older/newer command-line that starts
|
||||
with current command
|
||||
|c_<S-Up>| <S-Up>/<S-Down> recall older/newer command-line from history
|
||||
|c_CTRL-G| CTRL-G next match when 'incsearch' is active
|
||||
|c_CTRL-T| CTRL-T previous match when 'incsearch' is active
|
||||
|:history| :his[tory] show older command-lines
|
||||
|
||||
Context-sensitive completion on the command-line:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*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: 2017 Jan 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -230,6 +230,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
the executable "view" has the same effect as the -R argument.
|
||||
The 'updatecount' option will be set to 10000, meaning that
|
||||
the swap file will not be updated automatically very often.
|
||||
See |-M| for disallowing modifications.
|
||||
|
||||
*-m*
|
||||
-m Modifications not allowed to be written. The 'write' option
|
||||
@@ -421,6 +422,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|
|
||||
@@ -1216,7 +1221,7 @@ There are several ways to exit Vim:
|
||||
- Use `:cquit`. Also when there are changes.
|
||||
|
||||
When using `:cquit` or when there was an error message Vim exits with exit
|
||||
code 1. Errors can be avoided by using `:silent!`.
|
||||
code 1. Errors can be avoided by using `:silent!` or with `:catch`.
|
||||
|
||||
==============================================================================
|
||||
8. Saving settings *save-settings*
|
||||
|
||||
@@ -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
|
||||
|
||||
+12
-2
@@ -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 /*:.*
|
||||
@@ -4537,6 +4539,8 @@ E933 eval.txt /*E933*
|
||||
E934 sign.txt /*E934*
|
||||
E935 eval.txt /*E935*
|
||||
E936 autocmd.txt /*E936*
|
||||
E937 autocmd.txt /*E937*
|
||||
E938 eval.txt /*E938*
|
||||
E94 windows.txt /*E94*
|
||||
E95 message.txt /*E95*
|
||||
E96 diff.txt /*E96*
|
||||
@@ -5302,6 +5306,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 +5354,7 @@ channel-close channel.txt /*channel-close*
|
||||
channel-close-in channel.txt /*channel-close-in*
|
||||
channel-commands channel.txt /*channel-commands*
|
||||
channel-demo channel.txt /*channel-demo*
|
||||
channel-drop channel.txt /*channel-drop*
|
||||
channel-functions usr_41.txt /*channel-functions*
|
||||
channel-mode channel.txt /*channel-mode*
|
||||
channel-more channel.txt /*channel-more*
|
||||
@@ -7021,6 +7027,7 @@ job-callback channel.txt /*job-callback*
|
||||
job-channel-overview channel.txt /*job-channel-overview*
|
||||
job-close_cb channel.txt /*job-close_cb*
|
||||
job-control channel.txt /*job-control*
|
||||
job-drop channel.txt /*job-drop*
|
||||
job-err_cb channel.txt /*job-err_cb*
|
||||
job-err_io channel.txt /*job-err_io*
|
||||
job-exit_cb channel.txt /*job-exit_cb*
|
||||
@@ -7156,7 +7163,6 @@ logiPat-man pi_logipat.txt /*logiPat-man*
|
||||
logiPat-manual pi_logipat.txt /*logiPat-manual*
|
||||
logiPat-operators pi_logipat.txt /*logiPat-operators*
|
||||
logiPat-pattern pi_logipat.txt /*logiPat-pattern*
|
||||
logiPat.txt pi_logipat.txt /*logiPat.txt*
|
||||
long-lines version5.txt /*long-lines*
|
||||
love intro.txt /*love*
|
||||
lowercase change.txt /*lowercase*
|
||||
@@ -7873,6 +7879,7 @@ php3.vim syntax.txt /*php3.vim*
|
||||
phtml.vim syntax.txt /*phtml.vim*
|
||||
pi_getscript.txt pi_getscript.txt /*pi_getscript.txt*
|
||||
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
|
||||
pi_logipat.txt pi_logipat.txt /*pi_logipat.txt*
|
||||
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
|
||||
pi_paren.txt pi_paren.txt /*pi_paren.txt*
|
||||
pi_spec.txt pi_spec.txt /*pi_spec.txt*
|
||||
@@ -9215,16 +9222,19 @@ vim-dev intro.txt /*vim-dev*
|
||||
vim-mac intro.txt /*vim-mac*
|
||||
vim-modes intro.txt /*vim-modes*
|
||||
vim-modes-intro intro.txt /*vim-modes-intro*
|
||||
vim-multibyte intro.txt /*vim-multibyte*
|
||||
vim-script-intro usr_41.txt /*vim-script-intro*
|
||||
vim-use intro.txt /*vim-use*
|
||||
vim-variable eval.txt /*vim-variable*
|
||||
vim.vim syntax.txt /*vim.vim*
|
||||
vim7 version7.txt /*vim7*
|
||||
vim8 version8.txt /*vim8*
|
||||
vim: options.txt /*vim:*
|
||||
vim_announce intro.txt /*vim_announce*
|
||||
vim_dev intro.txt /*vim_dev*
|
||||
vim_did_enter-variable eval.txt /*vim_did_enter-variable*
|
||||
vim_mac gui_mac.txt /*vim_mac*
|
||||
vim_starting eval.txt /*vim_starting*
|
||||
vim_use intro.txt /*vim_use*
|
||||
vimball pi_vimball.txt /*vimball*
|
||||
vimball-contents pi_vimball.txt /*vimball-contents*
|
||||
vimball-extract pi_vimball.txt /*vimball-extract*
|
||||
|
||||
@@ -89,6 +89,18 @@ an external command (e.g., "!!"), the terminal will be put into Normal mode
|
||||
for a moment. This means that you can stop the output to the screen by
|
||||
hitting a printing key. Output resumes when you hit <BS>.
|
||||
|
||||
*xterm-bracketed-paste*
|
||||
When the 't_BE' option is set then 't_BE' will be sent to the
|
||||
terminal when entering "raw" mode and 't_BD' when leaving "raw" mode. The
|
||||
terminal is then expected to put 't_PS' before pasted text and 't_PE' after
|
||||
pasted text. This way Vim can separate text that is pasted from characters
|
||||
that are typed. The pasted text is handled like when the middle mouse button
|
||||
is used.
|
||||
|
||||
Note that in some situations Vim will not recognize the bracketed paste and
|
||||
you will get the raw text. In other situations Vim will only get the first
|
||||
pasted character and drop the rest, e.g. when using the "r" command.
|
||||
|
||||
*cs7-problem*
|
||||
Note: If the terminal settings are changed after running Vim, you might have
|
||||
an illegal combination of settings. This has been reported on Solaris 2.5
|
||||
@@ -306,6 +318,10 @@ Added by Vim (there are no standard codes for these):
|
||||
|xterm-true-color|
|
||||
t_8b set background color (R, G, B) *t_8b* *'t_8b'*
|
||||
|xterm-true-color|
|
||||
t_BE enable bracketed paste mode *t_BE* *'t_BE'*
|
||||
|xterm-bracketed-paste|
|
||||
t_BD disable bracketed paste mode *t_BD* *'t_BD'*
|
||||
|xterm-bracketed-paste|
|
||||
|
||||
KEY CODES
|
||||
Note: Use the <> form if possible
|
||||
@@ -398,6 +414,8 @@ Note: Use the <> form if possible
|
||||
t_KK <k8> keypad 8 *<k8>* *t_KK* *'t_KK'*
|
||||
t_KL <k9> keypad 9 *<k9>* *t_KL* *'t_KL'*
|
||||
<Mouse> leader of mouse code *<Mouse>*
|
||||
t_PS start of brackted paste |xterm-bracketed-paste| *t_PS* 't_PS'
|
||||
t_PE end of bracketed paste |xterm-bracketed-paste| *t_PE* 't_PE'
|
||||
|
||||
Note about t_so and t_mr: When the termcap entry "so" is not present the
|
||||
entry for "mr" is used. And vice versa. The same is done for "se" and "me".
|
||||
|
||||
+141
-48
@@ -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: 2017 Jan 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -28,18 +28,24 @@ 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 -----------------------
|
||||
|
||||
get_syn_options() does not respect skip in else part. (Zyx)
|
||||
|
||||
+channel:
|
||||
- Check for job cleanup more often? Patch from Ozaki Kiichi, 2016 Oct 22.
|
||||
- Try out background make plugin:
|
||||
https://github.com/AndrewVos/vim-make-background
|
||||
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
|
||||
- Add 'cwd' argument to start_job(): directory to change to in the child.
|
||||
check for valid directory before forking.
|
||||
Part of patch for environment, Yasuhiro Matsumoto, #1160
|
||||
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
|
||||
2016 Dec 11, #1320)
|
||||
- Implement |job-term| ?
|
||||
- Channel test fails with Motif. Sometimes kills the X11 server.
|
||||
- When a message in the queue but there is no callback, drop it after a while?
|
||||
@@ -70,8 +76,8 @@ Regexp problems:
|
||||
- Issue 164: freeze on regexp search.
|
||||
- Ignorecase not handled properly for multi-byte characters. (Axel Bender,
|
||||
2013 Dec 11)
|
||||
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski
|
||||
Remark from Brett 2014 Jan 6 and 7.
|
||||
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin
|
||||
Szamotulski; Remark from Brett 2014 Jan 6 and 7.
|
||||
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
|
||||
- Does not work with NFA regexp engine:
|
||||
\%u, \%x, \%o, \%d followed by a composing character
|
||||
@@ -97,38 +103,96 @@ 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
|
||||
|
||||
Concatenation with null string causes an error: 'a'[1:0] .. 'b'
|
||||
Might as well handle it like an empty string.
|
||||
|
||||
When using symbolic links, a package path will not be inserted at the right
|
||||
position in 'runtimepath'. (Dugan Chen, 2016 Nov 18)
|
||||
|
||||
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
|
||||
What if there is an invalid character?
|
||||
|
||||
Bug: Json with same key should not give internal error. (Lcd, 2016 Oct 26)
|
||||
Make dict_add give a duplicate key error.
|
||||
|
||||
Should json_encode()/json_decode() restrict recursiveness?
|
||||
Or avoid recursiveness.
|
||||
Include rust files. (Klabnik, #1356)
|
||||
|
||||
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.
|
||||
|
||||
Multi-byte bug: dv} splits char. (Urtica Dioica, 2017 Jan 9)
|
||||
|
||||
Patch to change order of compiler flags. (Yousong Zhou, 2016 Sep 19, #1100)
|
||||
|
||||
Patch to add command line completion for :cexpr commands. (Yegappan
|
||||
Lakshmanan, 2016 Dec 13)
|
||||
|
||||
Patch for :pyx, run python commands depending on the supported version.
|
||||
(Marc Weber, update from Ken Takata, 2016 Sep 19, 2017 Jan 6)
|
||||
|
||||
Patch to avoid warnings for overflow. (Mike Williams, 2016 Dec 16)
|
||||
Update Dec 19.
|
||||
|
||||
When an item in the quickfix list has a file name that does not exist, behave
|
||||
like the item was not a match for :cnext.
|
||||
|
||||
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
|
||||
Also get E749 on exit.
|
||||
Another example in #1309
|
||||
|
||||
Patch to fix vim_iswordp() works differently on chars <256 that are two bytes.
|
||||
Ozaki Kiichi, 2016 Dec 11.
|
||||
|
||||
When deleting a mark or register, leave a tombstone, so that it's also deleted
|
||||
when writing viminfo (and the delete was the most recent action). #1339
|
||||
|
||||
Relevant neovim patch:
|
||||
https://github.com/neovim/neovim/pull/5717
|
||||
test case:
|
||||
https://github.com/neovim/neovim/pull/5717#issuecomment-264845481
|
||||
Others:
|
||||
https://github.com/neovim/neovim/issues/5713#issuecomment-265136186
|
||||
https://github.com/neovim/neovim/pull/5737#issuecomment-266055165
|
||||
|
||||
Patch for better explanation of 'compatible' side effects.
|
||||
https://github.com/vim/vim/pull/1161/files
|
||||
|
||||
Patch to add 'makeencoding', useful when the system encoding differs from
|
||||
Vim's 'encoding' setting. (Ken Takata, 2017 Jan 6)
|
||||
|
||||
Patch to adjust marks when adding a new line to the end of buffer in diff
|
||||
mode. (James McCoy, 2016 Dec 14, #1329)
|
||||
|
||||
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
|
||||
#1330)
|
||||
|
||||
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
|
||||
Rule to use "^" for statusline does not work if a space is defined with
|
||||
highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11)
|
||||
|
||||
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
|
||||
Patch by Christian Wellenbrock, 2013 Jul 5.
|
||||
|
||||
Screen updated delayed when using CTRL-O u in Insert mode.
|
||||
(Barlik, #1191) Perhaps because status message?
|
||||
|
||||
Patch to add buffer name argument to taglist().
|
||||
Ordering of tags in result of taglist call. (Duncan McDougall, #1194)
|
||||
|
||||
Patch to fix that empty first tab is not in session.
|
||||
(Hirohito Higashi, 2016 Nov 25, #1282)
|
||||
|
||||
Patch for restoring wide characters in the console buffer.
|
||||
(Ken Takata, 2016 Jun 7)
|
||||
|
||||
@@ -146,7 +210,22 @@ Use ADDR_OTHER instead of ADDR_LINES for many more commands.
|
||||
Add tests for using number larger than number of lines in buffer.
|
||||
|
||||
Patch to make v:shell_error writable. (Christian Brabandt, 2016 Sep 27)
|
||||
Is there another solution?
|
||||
Useful to restore it. Is there another solution?
|
||||
|
||||
"ci[" does not look for next [ like ci" does look for next ".
|
||||
(J.F. 2017 Jan 7)
|
||||
|
||||
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)
|
||||
|
||||
When adding an item to a new quickfix list make ":cnext" jump to that item.
|
||||
Make a difference being at the first item and not having used :cnext at all.
|
||||
(Afanasiy Fet, 2017 Jan 3)
|
||||
|
||||
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
|
||||
E.g. deepcopy(test_null_list())
|
||||
@@ -156,6 +235,16 @@ 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 new regexp classes :ident:, :keyword:, :fname:.
|
||||
(ichizok, 2016 Jan 12, #1373)
|
||||
|
||||
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)
|
||||
|
||||
@@ -173,6 +262,9 @@ sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
|
||||
|
||||
Patch to add "cmdline" completion to getcompletion(). (Shougo, Oct 1, #1140)
|
||||
|
||||
Feature request: Complete members of a dictionary. (Luc Hermitte, 2017 Jan 4,
|
||||
#1350)
|
||||
|
||||
Patch for systemlist(), add empty item. (thinca, Sep 30, #1135)
|
||||
Add an argument to choose binary or non-binary (like readfile()), when omitted
|
||||
use the current behavior.
|
||||
@@ -181,6 +273,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.
|
||||
@@ -192,12 +287,10 @@ execute() cannot be used with command completeion. (Daniel Hahler, 2016 Oct 1,
|
||||
|
||||
cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983)
|
||||
|
||||
Patch to change order of compiler flags. (Yousong Zhou, 2016 Sep 19, #1100)
|
||||
|
||||
Patch to order results from taglist(). (Duncan McDougall, 2016 Oct 25)
|
||||
|
||||
Patch for :pyx, run python commands depending on the supported version.
|
||||
(Marc Weber, update from Ken Takata, 2016 Sep 19)
|
||||
patch for 'spellcamelcase' option: spellcheck each CamelCased word.
|
||||
(Ben Tucker, 2016 Dec 2)
|
||||
|
||||
When using ":diffput" through a mapping, undo in the target buffer isn't
|
||||
synced. (Ryan Carney, 2016 Sep 14)
|
||||
@@ -222,14 +315,30 @@ Jul 25, #948)
|
||||
Patch to fix wrong encoding of error message on Cygwin/MSYS terminal.
|
||||
(Ken Takata, 2016 Oct 4)
|
||||
|
||||
Patch to introduce 'cmdencoding'. (Ken Takata, Aug 18?)
|
||||
Better help Aug 19.
|
||||
Problem: applies to too many commands, such as :cbuffer.
|
||||
Updated patch with three options, 2016 Sep 8.
|
||||
Win32: When running ":make" and 'encoding' differs from the system locale,
|
||||
the output should be converted. Esp. when 'encoding' is "utf-8". (Yongwei
|
||||
Wu) Should we use 'termencoding' for this?
|
||||
|
||||
Patch to add 'systemencoding', convert between 'encoding' and this for file
|
||||
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
|
||||
Assume the system converts between the actual encoding of the filesystem to
|
||||
the system encoding (usually utf-8).
|
||||
|
||||
'hlsearch' interferes with a Conceal match. (Rom Grk, 2016 Aug 9)
|
||||
|
||||
Patch to add context information to quickfix/location list. (Yegappan
|
||||
Lakshmanan, 2016 Aug 25)
|
||||
Lakshmanan, 2016 Aug 25, #1012)
|
||||
|
||||
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
|
||||
Otherwise task flickers in taskbar.
|
||||
|
||||
Bogus characters inserted when triggering indent while changing test.
|
||||
(Vitor Antunes, 2016 Nov 22, #1269)
|
||||
|
||||
Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26)
|
||||
Also for ":@.".
|
||||
|
||||
@@ -238,6 +347,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 +402,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)
|
||||
|
||||
@@ -353,13 +462,8 @@ Should use /usr/local/share/applications or /usr/share/applications.
|
||||
Or use $XDG_DATA_DIRS.
|
||||
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
|
||||
|
||||
Patch to introduce 'cmdencoding'. (Ken Takata, Aug 18?)
|
||||
Better help Aug 19.
|
||||
Problem: applies to too many commands, such as :cbuffer.
|
||||
Updated patch with three options, 2016 Sep 8.
|
||||
Win32: When running ":make" and 'encoding' differs from the system locale,
|
||||
the output should be converted. Esp. when 'encoding' is "utf-8". (Yongwei
|
||||
Wu) Should we use 'termencoding' for this?
|
||||
Test object i{ and it do not behave the same. #1379
|
||||
Do not include the linebreak at the start?
|
||||
|
||||
Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
@@ -374,6 +478,9 @@ Access to uninitialized memory in match_backref() regexp_nda.c:4882
|
||||
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
|
||||
directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
|
||||
In debug mode one can inspect variables, but not the function parameters
|
||||
(starting with a:). (Luc Hermitte, 2017 Jan 4, #1352)
|
||||
|
||||
7 Add a watchpoint in the debug mode: An expression that breaks execution
|
||||
when evaluating to non-zero. Add the "watchadd expr" command, stop when
|
||||
the value of the expression changes. ":watchdel" deletes an item,
|
||||
@@ -855,11 +962,6 @@ highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4)
|
||||
|
||||
Two highlighting bugs. (ZyX, 2013 Aug 18)
|
||||
|
||||
Patch to add the bufferlist() function. (Yegappan Lakshmanan, 2013 May 5)
|
||||
May 17: with winlist() and tabpagelist().
|
||||
May 19: with local variables.
|
||||
May 28: with options
|
||||
|
||||
Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
|
||||
28) With tests: Oct 9.
|
||||
|
||||
@@ -935,9 +1037,6 @@ Szamotulski, 2012 Nov 8)
|
||||
Session file creation: 'autochdir' causes trouble. Keep it off until after
|
||||
loading all files.
|
||||
|
||||
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
|
||||
Patch by Christian Wellenbrock, 2013 Jul 5.
|
||||
|
||||
MS-Windows resizing problems:
|
||||
- Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun
|
||||
20. Uses getWindowRect() instead of GetWindowPlacement()
|
||||
@@ -1105,8 +1204,6 @@ right type.
|
||||
string() can't parse back "inf" and "nan". Fix documentation or fix code?
|
||||
(ZyX, 2010 Aug 23)
|
||||
|
||||
Make 'formatprg' global-local. (Sung Pae)
|
||||
|
||||
When doing "redir => s:foo" in a script and then "redir END" somewhere else
|
||||
(e.g. in a function) it can't find s:foo.
|
||||
When a script contains "redir => s:foo" but doesn't end redirection, a
|
||||
@@ -1244,11 +1341,6 @@ Regexp engine performance:
|
||||
7.2.274. (Christian Brabandt, 2010 May 27) Generally, folding with
|
||||
'foldmethod' set to "syntax" is slow. Do profiling to find out why.
|
||||
|
||||
Patch to add 'systemencoding', convert between 'encoding' and this for file
|
||||
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
|
||||
Assume the system converts between the actual encoding of the filesystem to
|
||||
the system encoding (usually utf-8).
|
||||
|
||||
Problem producing tags file when hebrew.frx is present. It has a BOM.
|
||||
Results in E670. (Tony Mechelynck, 2010 May 2)
|
||||
|
||||
@@ -1267,6 +1359,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 +3917,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 +5639,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_22.txt* For Vim version 8.0. Last change: 2012 Nov 15
|
||||
*usr_22.txt* For Vim version 8.0. Last change: 2016 Dec 13
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -93,7 +93,7 @@ browser. This is what you get: >
|
||||
o................Browsing with a Horizontal Split...........|netrw-o|
|
||||
p................Use Preview Window.........................|netrw-p|
|
||||
P................Edit in Previous Window....................|netrw-p|
|
||||
q................Listing Bookmarks and History..............|netrw-q|
|
||||
q................Listing Bookmarks and History..............|netrw-qb|
|
||||
r................Reversing Sorting Order....................|netrw-r|
|
||||
< (etc)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2016 Sep 01
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2016 Nov 29
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -930,6 +930,7 @@ Testing: *test-functions*
|
||||
test_null_string() return a null String
|
||||
|
||||
Inter-process communication: *channel-functions*
|
||||
ch_canread() check if there is something to read
|
||||
ch_open() open a channel
|
||||
ch_close() close a channel
|
||||
ch_close_in() close the in part of a channel
|
||||
|
||||
+424
-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: 2017 Jan 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -181,6 +181,12 @@ Insert mode commands: ~
|
||||
|i_CTRL-G_U| CTRL-G U don't break undo with next cursor movement
|
||||
|
||||
|
||||
Cmdline mode commands: ~
|
||||
|
||||
|/_CTRL-G| CTRL-G move to the next match in 'incsearch' mode
|
||||
|/_CTRL-T| CTRL-T move to the previous match in 'incsearch' mode
|
||||
|
||||
|
||||
Options: ~
|
||||
|
||||
'belloff' do not ring the bell for these reasons
|
||||
@@ -224,6 +230,7 @@ Ex commands: ~
|
||||
Ex command modifiers: ~
|
||||
|
||||
|:keeppatterns| following command keeps search pattern history
|
||||
|<mods>| supply command modifiers to user defined commands
|
||||
|
||||
|
||||
New and extended functions: ~
|
||||
@@ -14507,4 +14514,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.
|
||||
|
||||
+20
-5
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Oct 15
|
||||
" Last Change: 2017 Jan 06
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -309,7 +309,10 @@ au BufNewFile,BufRead *.bl setf blank
|
||||
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
|
||||
|
||||
" Bazel (http://bazel.io)
|
||||
autocmd BufRead,BufNewFile *.bzl,BUILD,WORKSPACE setfiletype bzl
|
||||
autocmd BufRead,BufNewFile *.bzl,WORKSPACE setfiletype bzl
|
||||
if has("fname_case")
|
||||
autocmd BufRead,BufNewFile BUILD setfiletype bzl
|
||||
endif
|
||||
|
||||
" C or lpc
|
||||
au BufNewFile,BufRead *.c call s:FTlpc()
|
||||
@@ -673,8 +676,14 @@ au BufNewFile,BufRead *.dtd setf dtd
|
||||
" DTS/DSTI (device tree files)
|
||||
au BufNewFile,BufRead *.dts,*.dtsi setf dts
|
||||
|
||||
" EDIF (*.edf,*.edif,*.edn,*.edo)
|
||||
au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif
|
||||
" EDIF (*.edf,*.edif,*.edn,*.edo) or edn
|
||||
au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif
|
||||
au BufNewFile,BufRead *.edn
|
||||
\ if getline(1) =~ '^\s*(\s*edif\>' |
|
||||
\ setf edif |
|
||||
\ else |
|
||||
\ setf clojure |
|
||||
\ endif
|
||||
|
||||
" EditorConfig (close enough to dosini)
|
||||
au BufNewFile,BufRead .editorconfig setf dosini
|
||||
@@ -862,7 +871,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 +1769,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 +2680,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 filetype plugin file
|
||||
" Language: man
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2016 Jun 20
|
||||
" Last Change: 2017 Jan 04
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@@ -47,6 +47,7 @@ endif
|
||||
if exists(":Man") != 2
|
||||
com -nargs=+ Man call s:GetPage(<f-args>)
|
||||
nmap <Leader>K :call <SID>PreGetPage(0)<CR>
|
||||
nmap <Plug>ManPreGetPage :call <SID>PreGetPage(0)<CR>
|
||||
endif
|
||||
|
||||
" Define functions only once.
|
||||
|
||||
@@ -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()
|
||||
|
||||
+283
-113
@@ -2,7 +2,7 @@
|
||||
" Language: Javascript
|
||||
" Maintainer: Chris Paul ( https://github.com/bounceme )
|
||||
" URL: https://github.com/pangloss/vim-javascript
|
||||
" Last Change: August 25, 2016
|
||||
" Last Change: December 31, 2016
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
@@ -12,11 +12,10 @@ let b:did_indent = 1
|
||||
|
||||
" Now, set up our indentation expression and keys that trigger it.
|
||||
setlocal indentexpr=GetJavascriptIndent()
|
||||
setlocal nolisp noautoindent nosmartindent
|
||||
setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e
|
||||
setlocal cinoptions+=j1,J1
|
||||
setlocal autoindent nolisp nosmartindent
|
||||
setlocal indentkeys+=0],0)
|
||||
|
||||
let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys< cinoptions<'
|
||||
let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<'
|
||||
|
||||
" Only define the function once.
|
||||
if exists('*GetJavascriptIndent')
|
||||
@@ -37,158 +36,329 @@ else
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:line_pre = '^\s*\%(\%(\%(\/\*.\{-}\)\=\*\+\/\s*\)\=\)\@>'
|
||||
let s:expr_case = s:line_pre . '\%(\%(case\>.\+\)\|default\)\s*:'
|
||||
" searchpair() wrapper
|
||||
if has('reltime')
|
||||
function s:GetPair(start,end,flags,skip,time,...)
|
||||
return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 2000,0] + a:000),a:time)
|
||||
endfunction
|
||||
else
|
||||
function s:GetPair(start,end,flags,skip,...)
|
||||
return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 1000,get(a:000,1)]))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Regex of syntax group names that are or delimit string or are comments.
|
||||
let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)'
|
||||
|
||||
" Regex of syntax group names that are strings or documentation.
|
||||
let s:syng_comment = '\%(comment\|doc\)'
|
||||
|
||||
let s:syng_strcom = 'string\|comment\|regex\|special\|doc\|template'
|
||||
let s:syng_str = 'string\|template'
|
||||
let s:syng_com = 'comment\|doc'
|
||||
" Expression used to check whether we should skip a match with searchpair().
|
||||
let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
|
||||
|
||||
if has('reltime')
|
||||
function s:GetPair(start,end,flags,time)
|
||||
return searchpair(a:start,'',a:end,a:flags,s:skip_expr,max([prevnonblank(v:lnum) - 2000,0]),a:time)
|
||||
endfunction
|
||||
else
|
||||
function s:GetPair(start,end,flags,n)
|
||||
return searchpair(a:start,'',a:end,a:flags,0,max([prevnonblank(v:lnum) - 2000,0]))
|
||||
endfunction
|
||||
endif
|
||||
function s:skip_func()
|
||||
if !s:free || search('\m`\|\*\/','nW',s:looksyn)
|
||||
let s:free = !eval(s:skip_expr)
|
||||
let s:looksyn = s:free ? line('.') : s:looksyn
|
||||
return !s:free
|
||||
endif
|
||||
let s:looksyn = line('.')
|
||||
return (search('\m\/','nbW',s:looksyn) || search('\m[''"]\|\\$','nW',s:looksyn)) && eval(s:skip_expr)
|
||||
endfunction
|
||||
|
||||
let s:line_term = '\s*\%(\%(\/\%(\%(\*.\{-}\*\/\)\|\%(\*\+\)\)\)\s*\)\=$'
|
||||
function s:alternatePair(stop)
|
||||
let pos = getpos('.')[1:2]
|
||||
while search('\m[][(){}]','bW',a:stop)
|
||||
if !s:skip_func()
|
||||
let idx = stridx('])}',s:looking_at())
|
||||
if idx + 1
|
||||
if !s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000,a:stop)
|
||||
break
|
||||
endif
|
||||
else
|
||||
return
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
call call('cursor',pos)
|
||||
endfunction
|
||||
|
||||
function s:save_pos(f,...)
|
||||
let l:pos = getpos('.')[1:2]
|
||||
let ret = call(a:f,a:000)
|
||||
call call('cursor',l:pos)
|
||||
return ret
|
||||
endfunction
|
||||
|
||||
function s:syn_at(l,c)
|
||||
return synIDattr(synID(a:l,a:c,0),'name')
|
||||
endfunction
|
||||
|
||||
function s:looking_at()
|
||||
return getline('.')[col('.')-1]
|
||||
endfunction
|
||||
|
||||
function s:token()
|
||||
return s:looking_at() =~ '\k' ? expand('<cword>') : s:looking_at()
|
||||
endfunction
|
||||
|
||||
function s:b_token()
|
||||
if s:looking_at() =~ '\k'
|
||||
call search('\m\<','cbW')
|
||||
endif
|
||||
return search('\m\S','bW')
|
||||
endfunction
|
||||
|
||||
function s:previous_token()
|
||||
let l:n = line('.')
|
||||
while s:b_token()
|
||||
if (s:looking_at() == '/' || line('.') != l:n && search('\m\/\/','nbW',
|
||||
\ line('.'))) && s:syn_at(line('.'),col('.')) =~? s:syng_com
|
||||
call search('\m\_[^/]\zs\/[/*]','bW')
|
||||
else
|
||||
return s:token()
|
||||
endif
|
||||
endwhile
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function s:others(p)
|
||||
return "((line2byte(line('.')) + col('.')) <= ".(line2byte(a:p[0]) + a:p[1]).") || ".s:skip_expr
|
||||
endfunction
|
||||
|
||||
function s:tern_skip(p)
|
||||
return s:GetPair('{','}','nbW',s:others(a:p),200,a:p[0]) > 0
|
||||
endfunction
|
||||
|
||||
function s:tern_col(p)
|
||||
return s:GetPair('?',':\@<!::\@!','nbW',s:others(a:p)
|
||||
\ .' || s:tern_skip('.string(a:p).')',200,a:p[0]) > 0
|
||||
endfunction
|
||||
|
||||
function s:label_col()
|
||||
let pos = getpos('.')[1:2]
|
||||
let [s:looksyn,s:free] = pos
|
||||
call s:alternatePair(0)
|
||||
if s:save_pos('s:IsBlock')
|
||||
let poss = getpos('.')[1:2]
|
||||
return call('cursor',pos) || !s:tern_col(poss)
|
||||
elseif s:looking_at() == ':'
|
||||
return !s:tern_col([0,0])
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" configurable regexes that define continuation lines, not including (, {, or [.
|
||||
if !exists('g:javascript_opfirst')
|
||||
let g:javascript_opfirst = '\%([<>,:?^%|*&]\|\/[^/*]\|\([-.+]\)\1\@!\|=>\@!\|in\%(stanceof\)\=\>\)'
|
||||
endif
|
||||
if !exists('g:javascript_continuation')
|
||||
let g:javascript_continuation = '\%([<=,.?/*:^%|&]\|+\@<!+\|-\@<!-\|=\@<!>\|\<in\%(stanceof\)\=\)'
|
||||
endif
|
||||
let s:opfirst = '^' . get(g:,'javascript_opfirst',
|
||||
\ '\%([<>=,?^%|*/&]\|\([-.:+]\)\1\@!\|!=\|in\%(stanceof\)\=\>\)')
|
||||
let s:continuation = get(g:,'javascript_continuation',
|
||||
\ '\%([<=,.~!?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<\%(typeof\|delete\|void\|in\|instanceof\)\)') . '$'
|
||||
|
||||
let g:javascript_opfirst = s:line_pre . g:javascript_opfirst
|
||||
let g:javascript_continuation .= s:line_term
|
||||
|
||||
function s:OneScope(lnum,text,add)
|
||||
return a:text =~# '\%(\<else\|\<do\|=>\)' . s:line_term ? 'no b' :
|
||||
\ ((a:add && a:text =~ s:line_pre . '$' && search('\%' . s:PrevCodeLine(a:lnum - 1) . 'l.)' . s:line_term)) ||
|
||||
\ cursor(a:lnum, match(a:text, ')' . s:line_term)) > -1) &&
|
||||
\ s:GetPair('(', ')', 'cbW', 100) > 0 && search('\C\l\+\_s*\%#','bW') &&
|
||||
\ (a:add || ((expand('<cword>') !=# 'while' || !s:GetPair('\C\<do\>', '\C\<while\>','nbW',100)) &&
|
||||
\ (expand('<cword>') !=# 'each' || search('\C\<for\_s\+\%#','nbW')))) ? expand('<cword>') : ''
|
||||
function s:continues(ln,con)
|
||||
return !cursor(a:ln, match(' '.a:con,s:continuation)) &&
|
||||
\ eval((['s:syn_at(line("."),col(".")) !~? "regex"'] +
|
||||
\ repeat(['s:previous_token() != "."'],5) + [1])[
|
||||
\ index(split('/ typeof in instanceof void delete'),s:token())])
|
||||
endfunction
|
||||
|
||||
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
|
||||
function s:IsBlock()
|
||||
return getline(line('.'))[col('.')-1] == '{' && !search(
|
||||
\ '\C\%(\<return\s*\|\%([-=~!<*+,.?^%|&\[(]\|=\@<!>\|\*\@<!\/\|\<\%(var\|const\|let\|import\|export\%(\_s\+default\)\=\|yield\|delete\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\)\_s*\)\%#','bnW') &&
|
||||
\ (!search(':\_s*\%#','bW') || (!s:GetPair('[({[]','[])}]','bW',200) || s:IsBlock()))
|
||||
" get the line of code stripped of comments and move cursor to the last
|
||||
" non-comment char.
|
||||
function s:Trim(ln)
|
||||
let pline = substitute(getline(a:ln),'\s*$','','')
|
||||
let l:max = max([match(pline,'.*[^/]\zs\/[/*]'),0])
|
||||
while l:max && s:syn_at(a:ln, strlen(pline)) =~? s:syng_com
|
||||
let pline = substitute(strpart(pline, 0, l:max),'\s*$','','')
|
||||
let l:max = max([match(pline,'.*[^/]\zs\/[/*]'),0])
|
||||
endwhile
|
||||
return cursor(a:ln,strlen(pline)) ? pline : pline
|
||||
endfunction
|
||||
|
||||
" Auxiliary Functions {{{2
|
||||
|
||||
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
|
||||
" Find line above 'lnum' that isn't empty or in a comment
|
||||
function s:PrevCodeLine(lnum)
|
||||
let l:lnum = prevnonblank(a:lnum)
|
||||
while l:lnum
|
||||
if synIDattr(synID(l:lnum,matchend(getline(l:lnum), '^\s*[^''"]'),0),'name') !~? s:syng_strcom
|
||||
return l:lnum
|
||||
let l:n = prevnonblank(a:lnum)
|
||||
while l:n
|
||||
if getline(l:n) =~ '^\s*\/[/*]'
|
||||
if (stridx(getline(l:n),'`') > 0 || getline(l:n-1)[-1:] == '\') &&
|
||||
\ s:syn_at(l:n,1) =~? s:syng_str
|
||||
return l:n
|
||||
endif
|
||||
let l:n = prevnonblank(l:n-1)
|
||||
elseif s:syn_at(l:n,1) =~? s:syng_com
|
||||
let l:n = s:save_pos('eval',
|
||||
\ 'cursor('.l:n.',1) + search(''\m\/\*'',"bW")')
|
||||
else
|
||||
return l:n
|
||||
endif
|
||||
let l:lnum = prevnonblank(l:lnum - 1)
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" Check if line 'lnum' has a balanced amount of parentheses.
|
||||
function s:Balanced(lnum)
|
||||
let [open_0,open_2,open_4] = [0,0,0]
|
||||
let l:open = 0
|
||||
let l:line = getline(a:lnum)
|
||||
let pos = match(l:line, '[][(){}]', 0)
|
||||
while pos != -1
|
||||
if synIDattr(synID(a:lnum,pos + 1,0),'name') !~? s:syng_strcom
|
||||
let idx = stridx('(){}[]', l:line[pos])
|
||||
if idx % 2 == 0
|
||||
let open_{idx} = open_{idx} + 1
|
||||
else
|
||||
let open_{idx - 1} = open_{idx - 1} - 1
|
||||
if s:syn_at(a:lnum,pos + 1) !~? s:syng_strcom
|
||||
let l:open += match(' ' . l:line[pos],'[[({]')
|
||||
if l:open < 0
|
||||
return
|
||||
endif
|
||||
endif
|
||||
let pos = match(l:line, '[][(){}]', pos + 1)
|
||||
endwhile
|
||||
return (!open_4 + !open_2 + !open_0) - 2
|
||||
return !l:open
|
||||
endfunction
|
||||
|
||||
function s:OneScope(lnum)
|
||||
let pline = s:Trim(a:lnum)
|
||||
let kw = 'else do'
|
||||
if pline[-1:] == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0
|
||||
call s:previous_token()
|
||||
let kw = 'for if let while with'
|
||||
if index(split('await each'),s:token()) + 1
|
||||
call s:previous_token()
|
||||
let kw = 'for'
|
||||
endif
|
||||
endif
|
||||
return pline[-2:] == '=>' || index(split(kw),s:token()) + 1 &&
|
||||
\ s:save_pos('s:previous_token') != '.'
|
||||
endfunction
|
||||
|
||||
" returns braceless levels started by 'i' and above lines * &sw. 'num' is the
|
||||
" lineNr which encloses the entire context, 'cont' if whether line 'i' + 1 is
|
||||
" a continued expression, which could have started in a braceless context
|
||||
function s:iscontOne(i,num,cont)
|
||||
let [l:i, l:num, bL] = [a:i, a:num + !a:num, 0]
|
||||
let pind = a:num ? indent(l:num) + s:W : 0
|
||||
let ind = indent(l:i) + (a:cont ? 0 : s:W)
|
||||
while l:i >= l:num && (ind > pind || l:i == l:num)
|
||||
if indent(l:i) < ind && s:OneScope(l:i)
|
||||
let bL += s:W
|
||||
let l:i = line('.')
|
||||
elseif !a:cont || bL || ind < indent(a:i)
|
||||
break
|
||||
endif
|
||||
let ind = min([ind, indent(l:i)])
|
||||
let l:i = s:PrevCodeLine(l:i - 1)
|
||||
endwhile
|
||||
return bL
|
||||
endfunction
|
||||
|
||||
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
|
||||
function s:IsBlock()
|
||||
if s:looking_at() == '{'
|
||||
let l:n = line('.')
|
||||
let char = s:previous_token()
|
||||
let syn = char =~ '[{>/]' ? s:syn_at(line('.'),col('.')-(char == '{')) : ''
|
||||
if syn =~? 'xml\|jsx'
|
||||
return char != '{'
|
||||
elseif char =~ '\k'
|
||||
return index(split('return const let import export yield default delete var await void typeof throw case new in instanceof')
|
||||
\ ,char) < (line('.') != l:n) || s:previous_token() == '.'
|
||||
elseif char == '>'
|
||||
return getline('.')[col('.')-2] == '=' || syn =~? '^jsflow'
|
||||
elseif char == ':'
|
||||
return getline('.')[col('.')-2] != ':' && s:label_col()
|
||||
endif
|
||||
return syn =~? 'regex' || char !~ '[-=~!<*+,/?^%|&([]'
|
||||
endif
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function GetJavascriptIndent()
|
||||
if !exists('b:js_cache')
|
||||
let b:js_cache = [0,0,0]
|
||||
endif
|
||||
let b:js_cache = get(b:,'js_cache',[0,0,0])
|
||||
" Get the current line.
|
||||
let l:line = getline(v:lnum)
|
||||
let syns = synIDattr(synID(v:lnum, 1, 0), 'name')
|
||||
call cursor(v:lnum,1)
|
||||
let l:line = getline('.')
|
||||
let syns = s:syn_at(v:lnum, 1)
|
||||
|
||||
" start with strings,comments,etc.{{{2
|
||||
if (l:line !~ '^[''"`]' && syns =~? '\%(string\|template\)') ||
|
||||
\ (l:line !~ '^\s*[/*]' && syns =~? s:syng_comment)
|
||||
" start with strings,comments,etc.
|
||||
if syns =~? s:syng_com
|
||||
if l:line =~ '^\s*\*'
|
||||
return cindent(v:lnum)
|
||||
elseif l:line !~ '^\s*\/[/*]'
|
||||
return -1
|
||||
endif
|
||||
elseif syns =~? s:syng_str && l:line !~ '^[''"]'
|
||||
if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1)
|
||||
let b:js_cache[0] = v:lnum
|
||||
endif
|
||||
return -1
|
||||
endif
|
||||
if l:line !~ '^\%(\/\*\|\s*\/\/\)' && syns =~? s:syng_comment
|
||||
return cindent(v:lnum)
|
||||
endif
|
||||
let l:lnum = s:PrevCodeLine(v:lnum - 1)
|
||||
if l:lnum == 0
|
||||
return 0
|
||||
if !l:lnum
|
||||
return
|
||||
endif
|
||||
|
||||
if (l:line =~# s:expr_case)
|
||||
let cpo_switch = &cpo
|
||||
set cpo+=%
|
||||
let ind = cindent(v:lnum)
|
||||
let &cpo = cpo_switch
|
||||
return ind
|
||||
let l:line = substitute(l:line,'^\s*','','')
|
||||
if l:line[:1] == '/*'
|
||||
let l:line = substitute(l:line,'^\%(\/\*.\{-}\*\/\s*\)*','','')
|
||||
endif
|
||||
if l:line =~ '^\/[/*]'
|
||||
let l:line = ''
|
||||
endif
|
||||
"}}}
|
||||
|
||||
" the containing paren, bracket, curly. Memoize, last lineNr either has the
|
||||
" same scope or starts a new one, unless if it closed a scope.
|
||||
call cursor(v:lnum,1)
|
||||
if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum && b:js_cache[0] &&
|
||||
\ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum) > 0)
|
||||
let num = b:js_cache[1]
|
||||
elseif syns != '' && l:line[0] =~ '\s'
|
||||
let pattern = syns =~? 'block' ? ['{','}'] : syns =~? 'jsparen' ? ['(',')'] :
|
||||
\ syns =~? 'jsbracket'? ['\[','\]'] : ['[({[]','[])}]']
|
||||
let num = s:GetPair(pattern[0],pattern[1],'bW',2000)
|
||||
" the containing paren, bracket, or curly. Many hacks for performance
|
||||
let idx = strlen(l:line) ? stridx('])}',l:line[0]) : -1
|
||||
if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum &&
|
||||
\ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum))
|
||||
call call('cursor',b:js_cache[1:])
|
||||
else
|
||||
let num = s:GetPair('[({[]','[])}]','bW',2000)
|
||||
endif
|
||||
let b:js_cache = [v:lnum,num,line('.') == v:lnum ? b:js_cache[2] : col('.')]
|
||||
|
||||
if l:line =~ s:line_pre . '[])}]'
|
||||
return indent(num)
|
||||
let [s:looksyn, s:free, top] = [v:lnum - 1, 1, (!indent(l:lnum) &&
|
||||
\ s:syn_at(l:lnum,1) !~? s:syng_str) * l:lnum]
|
||||
if idx + 1
|
||||
call s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000,top)
|
||||
elseif indent(v:lnum) && syns =~? 'block'
|
||||
call s:GetPair('{','}','bW','s:skip_func()',2000,top)
|
||||
else
|
||||
call s:alternatePair(top)
|
||||
endif
|
||||
endif
|
||||
|
||||
call cursor(b:js_cache[1],b:js_cache[2])
|
||||
|
||||
let swcase = getline(l:lnum) =~# s:expr_case
|
||||
let pline = swcase ? getline(l:lnum) : substitute(getline(l:lnum), '\%(:\@<!\/\/.*\)$', '','')
|
||||
let inb = num == 0 || num < l:lnum && ((l:line !~ s:line_pre . ',' && pline !~ ',' . s:line_term) || s:IsBlock())
|
||||
let switch_offset = num == 0 || s:OneScope(num, strpart(getline(num),0,b:js_cache[2] - 1),1) !=# 'switch' ? 0 :
|
||||
\ &cino !~ ':' || !has('float') ? s:sw() :
|
||||
\ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (&cino =~# '.*:[^,]*s' ? s:sw() : 1))
|
||||
|
||||
" most significant, find the indent amount
|
||||
if inb && !swcase && ((l:line =~# g:javascript_opfirst || pline =~# g:javascript_continuation) ||
|
||||
\ num < l:lnum && s:OneScope(l:lnum,pline,0) =~# '\<\%(for\|each\|if\|let\|no\sb\|w\%(hile\|ith\)\)\>' &&
|
||||
\ l:line !~ s:line_pre . '{')
|
||||
return (num > 0 ? indent(num) : -s:sw()) + (s:sw() * 2) + switch_offset
|
||||
elseif num > 0
|
||||
return indent(num) + s:sw() + switch_offset
|
||||
if idx + 1 || l:line[:1] == '|}'
|
||||
if idx == 2 && search('\m\S','bW',line('.')) && s:looking_at() == ')'
|
||||
call s:GetPair('(',')','bW',s:skip_expr,200)
|
||||
endif
|
||||
return indent('.')
|
||||
endif
|
||||
|
||||
let b:js_cache = [v:lnum] + (line('.') == v:lnum ? [0,0] : getpos('.')[1:2])
|
||||
let num = b:js_cache[1]
|
||||
|
||||
let [s:W, isOp, bL, switch_offset] = [s:sw(),0,0,0]
|
||||
if !num || s:IsBlock()
|
||||
let pline = s:save_pos('s:Trim',l:lnum)
|
||||
if num && s:looking_at() == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0
|
||||
let num = line('.')
|
||||
if s:previous_token() ==# 'switch' && s:previous_token() != '.'
|
||||
if &cino !~ ':' || !has('float')
|
||||
let switch_offset = s:W
|
||||
else
|
||||
let cinc = matchlist(&cino,'.*:\(-\)\=\([0-9.]*\)\(s\)\=\C')
|
||||
let switch_offset = float2nr(str2float(cinc[1].(strlen(cinc[2]) ? cinc[2] : strlen(cinc[3])))
|
||||
\ * (strlen(cinc[3]) ? s:W : 1))
|
||||
endif
|
||||
if pline[-1:] != '.' && l:line =~# '^\%(default\|case\)\>'
|
||||
return indent(num) + switch_offset
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if pline[-1:] !~ '[{;]'
|
||||
if pline =~# ':\@<!:$'
|
||||
call cursor(l:lnum,strlen(pline))
|
||||
let isOp = s:tern_col(b:js_cache[1:2])
|
||||
else
|
||||
let isOp = l:line =~# s:opfirst || s:continues(l:lnum,pline)
|
||||
endif
|
||||
let bL = s:iscontOne(l:lnum,num,isOp)
|
||||
let bL -= (bL && l:line[0] == '{') * s:W
|
||||
endif
|
||||
endif
|
||||
|
||||
" main return
|
||||
if isOp
|
||||
return (num ? indent(num) : -s:W) + (s:W * 2) + switch_offset + bL
|
||||
elseif num
|
||||
return indent(num) + s:W + switch_offset + bL
|
||||
endif
|
||||
return bL
|
||||
endfunction
|
||||
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
|
||||
" Last Changed: 2016 July 20
|
||||
" Last Changed: 2016 December 5
|
||||
" URL: https://github.com/blinskey/vim-armenian-keymaps
|
||||
|
||||
let b:keymap_name = "hy"
|
||||
@@ -98,6 +98,8 @@ f ֆ
|
||||
7 .
|
||||
8 «
|
||||
9 »
|
||||
* (
|
||||
( )
|
||||
\\ '
|
||||
| ՞
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
|
||||
" Last Changed: 2016 July 20
|
||||
" Last Changed: 2016 December 5
|
||||
" URL: https://github.com/blinskey/vim-armenian-keymaps
|
||||
|
||||
let b:keymap_name = "hy"
|
||||
@@ -98,6 +98,8 @@ f ֆ
|
||||
7 .
|
||||
8 «
|
||||
9 »
|
||||
* (
|
||||
( )
|
||||
\\ '
|
||||
| ՞
|
||||
|
||||
|
||||
@@ -80,6 +80,9 @@ if has("gui_macvim")
|
||||
an <silent> 9998.350 Window.Select\ Previous\ Tab :tabprevious<CR>
|
||||
an 9998.360 Window.-SEP2- <Nop>
|
||||
an <silent> 9998.370 Window.Bring\ All\ To\ Front <Nop>
|
||||
an <silent> 9998.380 Window.Stay\ in\ Front <Nop>
|
||||
an <silent> 9998.390 Window.Stay\ in\ Back <Nop>
|
||||
an <silent> 9998.400 Window.Stay\ Level\ Normal <Nop>
|
||||
endif
|
||||
|
||||
" Help menu
|
||||
@@ -1255,6 +1258,9 @@ if has("gui_macvim")
|
||||
macm Window.Select\ Next\ Tab key=<D-}>
|
||||
macm Window.Select\ Previous\ Tab key=<D-{>
|
||||
macm Window.Bring\ All\ To\ Front action=arrangeInFront:
|
||||
macm Window.Stay\ in\ Front action=stayInFront:
|
||||
macm Window.Stay\ in\ Back action=stayInBack:
|
||||
macm Window.Stay\ Level\ Normal action=stayLevelNormal:
|
||||
|
||||
macm Help.MacVim\ Help key=<D-?>
|
||||
macm Help.MacVim\ Website action=openWebsite:
|
||||
|
||||
@@ -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++
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
" Nikolai Weibull (Add CSS2 support)
|
||||
" Maintainer: Jules Wang <w.jq0722@gmail.com>
|
||||
" URL: https://github.com/JulesWang/css.vim
|
||||
" Last Change: 2015 Apr.17
|
||||
" Last Change: 2017 Jan 14
|
||||
" cssClassName updated by Ryuichi Hayashida Jan 2016
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if !exists("main_syntax")
|
||||
@@ -56,7 +57,7 @@ syn match cssSelectorOp2 "[~|^$*]\?=" contained
|
||||
syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
|
||||
|
||||
" .class and #id
|
||||
syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+" contains=cssClassNameDot
|
||||
syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
|
||||
syn match cssClassNameDot contained '\.'
|
||||
|
||||
try
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2016 Aug 30
|
||||
" Last Change: 2016 Nov 12
|
||||
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -21,7 +21,7 @@ let binNMU='binary-only=yes'
|
||||
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
|
||||
exe 'syn match debchangelogFirstKV contained "; \('.urgency.'\|'.binNMU.'\)"'
|
||||
exe 'syn match debchangelogOtherKV contained ", \('.urgency.'\|'.binNMU.'\)"'
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
syn match debchangelogVersion contained "(.\{-})"
|
||||
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
|
||||
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
|
||||
|
||||
@@ -38,7 +38,7 @@ unlet s:kernels s:archs s:pairs
|
||||
syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)"
|
||||
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
|
||||
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
|
||||
syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
|
||||
syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|javascript|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
|
||||
syn match debcontrolPackageType contained "u\?deb"
|
||||
syn match debcontrolVariable contained "\${.\{-}}"
|
||||
syn match debcontrolDmUpload contained "\cyes"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2016 Sep 27
|
||||
" Last Change: 2016 Nov 12
|
||||
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -25,7 +25,7 @@ let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
||||
\ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'precise', 'trusty', 'xenial', 'yakkety', 'devel'
|
||||
\ 'precise', 'trusty', 'xenial', 'yakkety', 'zesty', 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+18
-5
@@ -1,9 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: HTML
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/html.vim
|
||||
" Last Change: 2015 Jan 07
|
||||
" included patch from David Felix
|
||||
" Language: HTML
|
||||
" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
|
||||
" Last Change: 2017 Jan 04
|
||||
" included patch from Jorge Maldonado Ventura
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
|
||||
@@ -53,6 +54,14 @@ syn keyword htmlTagName contained abbr acronym bdo button col label
|
||||
syn keyword htmlTagName contained colgroup del fieldset iframe ins legend
|
||||
syn keyword htmlTagName contained object optgroup q s tbody tfoot thead
|
||||
|
||||
" new html 5 tags
|
||||
syn keyword htmlTagName contained article aside audio bdi canvas datalist
|
||||
syn keyword htmlTagName contained details embed figcaption figure
|
||||
syn keyword htmlTagName contained footer header hgroup main mark
|
||||
syn keyword htmlTagName contained menuitem meter nav output picture
|
||||
syn keyword htmlTagName contained progress rb rp rt rtc ruby section
|
||||
syn keyword htmlTagName contained slot source template time track video wbr
|
||||
|
||||
" legal arg names
|
||||
syn keyword htmlArg contained action
|
||||
syn keyword htmlArg contained align alink alt archive background bgcolor
|
||||
@@ -87,6 +96,10 @@ syn keyword htmlArg contained multiple nohref nowrap object profile readonly
|
||||
syn keyword htmlArg contained rules scheme scope span standby style
|
||||
syn keyword htmlArg contained summary tabindex valuetype version
|
||||
|
||||
" html 5 arg names
|
||||
syn keyword htmlArg contained contenteditable contextmenu draggable dropzone
|
||||
syn keyword htmlArg contained hidden spellcheck title translate
|
||||
|
||||
" special characters
|
||||
syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
|
||||
|
||||
|
||||
+20
-20
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: php PHP 3/4/5/7
|
||||
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
|
||||
" Last Change: Jul 27, 2016
|
||||
" Last Change: Dec 11, 2016
|
||||
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
|
||||
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
|
||||
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
@@ -495,7 +495,7 @@ syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,
|
||||
" Highlighting for __autoload slightly different from line above
|
||||
syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
|
||||
\ __autoload
|
||||
highlight link phpSpecialFunction phpOperator
|
||||
hi def link phpSpecialFunction phpOperator
|
||||
|
||||
" Highlighting for PHP5's built-in classes
|
||||
" - built-in classes harvested from get_declared_classes() in 5.1.4
|
||||
@@ -518,14 +518,14 @@ syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStrin
|
||||
\ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler
|
||||
\ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity
|
||||
\ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath
|
||||
highlight link phpClasses phpFunctions
|
||||
hi def link phpClasses phpFunctions
|
||||
|
||||
" Highlighting for PHP5's built-in interfaces
|
||||
" - built-in classes harvested from get_declared_interfaces() in 5.1.4
|
||||
syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
|
||||
\ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator
|
||||
\ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector
|
||||
highlight link phpInterfaces phpConstant
|
||||
hi def link phpInterfaces phpConstant
|
||||
|
||||
" option defaults:
|
||||
if ! exists('php_special_functions')
|
||||
@@ -553,7 +553,7 @@ endif
|
||||
if php_alt_assignByReference
|
||||
" special highlighting for '=&' operator
|
||||
syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle
|
||||
highlight link phpAssignByRef Type
|
||||
hi def link phpAssignByRef Type
|
||||
endif
|
||||
|
||||
if php_alt_comparisons
|
||||
@@ -565,7 +565,7 @@ if php_alt_comparisons
|
||||
syntax case ignore
|
||||
syntax keyword phpComparison instanceof contained containedin=phpRegion
|
||||
|
||||
hi link phpComparison Statement
|
||||
hi def link phpComparison Statement
|
||||
endif
|
||||
|
||||
" ================================================================
|
||||
@@ -645,21 +645,21 @@ hi def link phpTodo Todo
|
||||
hi def link phpDocTodo Todo
|
||||
hi def link phpMemberSelector Structure
|
||||
if exists("php_oldStyle")
|
||||
hi phpIntVar guifg=Red ctermfg=DarkRed
|
||||
hi phpEnvVar guifg=Red ctermfg=DarkRed
|
||||
hi phpOperator guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi phpRelation guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi phpIdentifier guifg=DarkGray ctermfg=Brown
|
||||
hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown
|
||||
hi def phpIntVar guifg=Red ctermfg=DarkRed
|
||||
hi def phpEnvVar guifg=Red ctermfg=DarkRed
|
||||
hi def phpOperator guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi def phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi def phpRelation guifg=SeaGreen ctermfg=DarkGreen
|
||||
hi def phpIdentifier guifg=DarkGray ctermfg=Brown
|
||||
hi def phpIdentifierSimply guifg=DarkGray ctermfg=Brown
|
||||
else
|
||||
hi def link phpIntVar Identifier
|
||||
hi def link phpEnvVar Identifier
|
||||
hi def link phpOperator Operator
|
||||
hi def link phpVarSelector Operator
|
||||
hi def link phpRelation Operator
|
||||
hi def link phpIdentifier Identifier
|
||||
hi def link phpIdentifierSimply Identifier
|
||||
hi def link phpIntVar Identifier
|
||||
hi def link phpEnvVar Identifier
|
||||
hi def link phpOperator Operator
|
||||
hi def link phpVarSelector Operator
|
||||
hi def link phpRelation Operator
|
||||
hi def link phpIdentifier Identifier
|
||||
hi def link phpIdentifierSimply Identifier
|
||||
endif
|
||||
|
||||
|
||||
|
||||
+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
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
||||
" Contributor: Karsten Hopp <karsten@redhat.com>
|
||||
" Contributor: Dean, Adam Kenneth <adam.ken.dean@hpe.com>
|
||||
" Last Change: 2016 Aug 11
|
||||
" SSH Version: 7.3p1
|
||||
" Last Change: 2016 Dec 28
|
||||
" SSH Version: 7.4p1
|
||||
"
|
||||
|
||||
" Setup
|
||||
@@ -181,6 +181,7 @@ syn keyword sshconfigKeyword IPQoS
|
||||
syn keyword sshconfigKeyword IdentitiesOnly
|
||||
syn keyword sshconfigKeyword IdentityFile
|
||||
syn keyword sshconfigKeyword IgnoreUnknown
|
||||
syn keyword sshconfigKeyword Include
|
||||
syn keyword sshconfigKeyword IPQoS
|
||||
syn keyword sshconfigKeyword KbdInteractiveAuthentication
|
||||
syn keyword sshconfigKeyword KbdInteractiveDevices
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
||||
" Contributor: Karsten Hopp <karsten@redhat.com>
|
||||
" Originally: 2009-07-09
|
||||
" Last Change: 2016 Mar 1
|
||||
" SSH Version: 7.2
|
||||
" Last Change: 2016 Dec 28
|
||||
" SSH Version: 7.4p1
|
||||
"
|
||||
|
||||
" Setup
|
||||
@@ -161,6 +161,7 @@ syn keyword sshdconfigKeyword Compression
|
||||
syn keyword sshdconfigKeyword DebianBanner
|
||||
syn keyword sshdconfigKeyword DenyGroups
|
||||
syn keyword sshdconfigKeyword DenyUsers
|
||||
syn keyword sshdconfigKeyword DisableForwarding
|
||||
syn keyword sshdconfigKeyword ForceCommand
|
||||
syn keyword sshdconfigKeyword GSSAPIAuthentication
|
||||
syn keyword sshdconfigKeyword GSSAPICleanupCredentials
|
||||
|
||||
@@ -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'
|
||||
|
||||
+10
-10
@@ -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.
|
||||
@@ -123,7 +123,7 @@ NOTE : En avan
|
||||
Leçon 1.5 : ÉDITION DE TEXTE - AJOUTER
|
||||
|
||||
|
||||
** Appuyez A pour ajouter du text. **
|
||||
** Appuyez A pour ajouter du texte. **
|
||||
|
||||
1. Déplacez le curseur sur la première ligne ci-dessous marquée --->.
|
||||
Peu importe sur quel caractère se trouve le curseur sur cette ligne.
|
||||
@@ -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>
|
||||
@@ -574,7 +574,7 @@ NOTE : Quand la recherche atteint la fin du fichier, elle reprend au d
|
||||
|
||||
2. Puis tapez le caractère % .
|
||||
|
||||
3. Le curseur se déplacera sur la parenthèse out crochet correspondant.
|
||||
3. Le curseur se déplacera sur la parenthèse ou crochet correspondant.
|
||||
|
||||
4. Tapez % pour replacer le curseur sur la parenthèse ou crochet
|
||||
correspondant.
|
||||
@@ -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 !
|
||||
@@ -854,17 +854,17 @@ NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les
|
||||
5. Tapez p pour coller le texte. Puis tapez : un second <Échap> .
|
||||
|
||||
6. Utilisez le mode Visuel pour sélectionner "élément", copiez-le avec y ,
|
||||
déplacez-vous à la fin de la ligne suivant avec j$ et collez le texte
|
||||
déplacez-vous à la fin de la ligne suivante avec j$ et collez le texte
|
||||
à cet endroit avec p .
|
||||
|
||||
---> a) ceci est le premier élément.
|
||||
b)
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Leçon 6.4 : RÉGLAGE DES OPTIONS
|
||||
Leçon 6.5 : RÉGLAGE DES OPTIONS
|
||||
|
||||
|
||||
** Réglons une option afin que la recherche et la substitution ignore la
|
||||
** Réglons une option afin que la recherche et la substitution ignorent la
|
||||
casse des caractères. **
|
||||
|
||||
1. Recherchez 'ignore' en tapant : /ignore <Entrée>
|
||||
@@ -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 : 2017 Jan 16
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -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.
|
||||
@@ -123,7 +123,7 @@ NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par
|
||||
Leçon 1.5 : ÉDITION DE TEXTE - AJOUTER
|
||||
|
||||
|
||||
** Appuyez A pour ajouter du text. **
|
||||
** Appuyez A pour ajouter du texte. **
|
||||
|
||||
1. Déplacez le curseur sur la première ligne ci-dessous marquée --->.
|
||||
Peu importe sur quel caractère se trouve le curseur sur cette ligne.
|
||||
@@ -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>
|
||||
@@ -574,7 +574,7 @@ NOTE : Quand la recherche atteint la fin du fichier, elle reprend au début
|
||||
|
||||
2. Puis tapez le caractère % .
|
||||
|
||||
3. Le curseur se déplacera sur la parenthèse out crochet correspondant.
|
||||
3. Le curseur se déplacera sur la parenthèse ou crochet correspondant.
|
||||
|
||||
4. Tapez % pour replacer le curseur sur la parenthèse ou crochet
|
||||
correspondant.
|
||||
@@ -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 !
|
||||
@@ -854,17 +854,17 @@ NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les
|
||||
5. Tapez p pour coller le texte. Puis tapez : un second <Échap> .
|
||||
|
||||
6. Utilisez le mode Visuel pour sélectionner "élément", copiez-le avec y ,
|
||||
déplacez-vous à la fin de la ligne suivant avec j$ et collez le texte
|
||||
déplacez-vous à la fin de la ligne suivante avec j$ et collez le texte
|
||||
à cet endroit avec p .
|
||||
|
||||
---> a) ceci est le premier élément.
|
||||
b)
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Leçon 6.4 : RÉGLAGE DES OPTIONS
|
||||
Leçon 6.5 : RÉGLAGE DES OPTIONS
|
||||
|
||||
|
||||
** Réglons une option afin que la recherche et la substitution ignore la
|
||||
** Réglons une option afin que la recherche et la substitution ignorent la
|
||||
casse des caractères. **
|
||||
|
||||
1. Recherchez 'ignore' en tapant : /ignore <Entrée>
|
||||
@@ -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 : 2017 Jan 16
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
+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:
|
||||
|
||||
@@ -72,5 +72,11 @@
|
||||
<string></string>
|
||||
<key>zoomAll:</key>
|
||||
<string></string>
|
||||
<key>stayInFront:</key>
|
||||
<string></string>
|
||||
<key>stayInBack:</key>
|
||||
<string></string>
|
||||
<key>stayLevelNormal:</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>114</string>
|
||||
<string>124</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -53,5 +53,8 @@
|
||||
- (IBAction)openWebsite:(id)sender;
|
||||
- (IBAction)showVimHelp:(id)sender;
|
||||
- (IBAction)zoomAll:(id)sender;
|
||||
- (IBAction)stayInFront:(id)sender;
|
||||
- (IBAction)stayInBack:(id)sender;
|
||||
- (IBAction)stayLevelNormal:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@@ -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];
|
||||
@@ -1195,6 +1196,27 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
[NSApp makeWindowsPerform:@selector(performZoom:) inOrder:YES];
|
||||
}
|
||||
|
||||
- (IBAction)stayInFront:(id)sender
|
||||
{
|
||||
ASLogDebug(@"Stay in Front");
|
||||
NSWindow *keyWindow = [NSApp keyWindow];
|
||||
[keyWindow setLevel:NSFloatingWindowLevel];
|
||||
}
|
||||
|
||||
- (IBAction)stayInBack:(id)sender
|
||||
{
|
||||
ASLogDebug(@"Stay in Back");
|
||||
NSWindow *keyWindow = [NSApp keyWindow];
|
||||
[keyWindow setLevel:kCGDesktopIconWindowLevel +1];
|
||||
}
|
||||
|
||||
- (IBAction)stayLevelNormal:(id)sender
|
||||
{
|
||||
ASLogDebug(@"Stay level normal");
|
||||
NSWindow *keyWindow = [NSApp keyWindow];
|
||||
[keyWindow setLevel:NSNormalWindowLevel];
|
||||
}
|
||||
|
||||
- (IBAction)coreTextButtonClicked:(id)sender
|
||||
{
|
||||
ASLogDebug(@"Toggle CoreText renderer");
|
||||
|
||||
+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
|
||||
|
||||
+11
-3
@@ -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"
|
||||
@@ -1112,9 +1123,6 @@ clean:
|
||||
cd GvimExt
|
||||
$(MAKE) /NOLOGO -f Makefile clean
|
||||
cd ..
|
||||
cd GvimExt
|
||||
$(MAKE) /NOLOGO -f Makefile clean
|
||||
cd ..
|
||||
- if exist testdir\*.out del testdir\*.out
|
||||
|
||||
test:
|
||||
|
||||
+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 \
|
||||
|
||||
+66
-24
@@ -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".
|
||||
@@ -1691,27 +1695,42 @@ OBJ_COMMON = \
|
||||
$(WSDEBUG_OBJ)
|
||||
|
||||
# The files included by tests are not in OBJ_COMMON.
|
||||
OBJ = $(OBJ_COMMON) \
|
||||
OBJ_MAIN = \
|
||||
objects/json.o \
|
||||
objects/main.o \
|
||||
objects/memfile.o \
|
||||
objects/message.o
|
||||
|
||||
JSON_TEST_OBJ = $(OBJ_COMMON) \
|
||||
OBJ = $(OBJ_COMMON) $(OBJ_MAIN)
|
||||
|
||||
OBJ_JSON_TEST = \
|
||||
objects/memfile.o \
|
||||
objects/message.o \
|
||||
objects/json_test.o
|
||||
|
||||
MEMFILE_TEST_OBJ = $(OBJ_COMMON) \
|
||||
JSON_TEST_OBJ = $(OBJ_COMMON) $(OBJ_JSON_TEST)
|
||||
|
||||
OBJ_MEMFILE_TEST = \
|
||||
objects/json.o \
|
||||
objects/message.o \
|
||||
objects/memfile_test.o
|
||||
|
||||
MESSAGE_TEST_OBJ = $(OBJ_COMMON) \
|
||||
MEMFILE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MEMFILE_TEST)
|
||||
|
||||
OBJ_MESSAGE_TEST = \
|
||||
objects/json.o \
|
||||
objects/memfile.o \
|
||||
objects/message_test.o
|
||||
|
||||
MESSAGE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MESSAGE_TEST)
|
||||
|
||||
ALL_OBJ = $(OBJ_COMMON) \
|
||||
$(OBJ_MAIN) \
|
||||
$(OBJ_JSON_TEST) \
|
||||
$(OBJ_MEMFILE_TEST) \
|
||||
$(OBJ_MESSAGE_TEST)
|
||||
|
||||
|
||||
PRO_AUTO = \
|
||||
arabic.pro \
|
||||
blowfish.pro \
|
||||
@@ -1845,7 +1864,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:
|
||||
@@ -1875,7 +1894,9 @@ myself:
|
||||
|
||||
|
||||
# The normal command to compile a .c file to its .o file.
|
||||
CCC = $(CC) -c -I$(srcdir) $(ALL_CFLAGS)
|
||||
# Without or with ALL_CFLAGS.
|
||||
CCC_NF = $(CC) -c -I$(srcdir)
|
||||
CCC = $(CCC_NF) $(ALL_CFLAGS)
|
||||
|
||||
|
||||
# Link the target for normal use or debugging.
|
||||
@@ -2042,7 +2063,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 +2086,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 +2097,7 @@ test_arglist \
|
||||
test_autochdir \
|
||||
test_autocmd \
|
||||
test_backspace_opt \
|
||||
test_breakindent \
|
||||
test_bufwintabinfo \
|
||||
test_cdo \
|
||||
test_channel \
|
||||
@@ -2089,6 +2110,8 @@ test_arglist \
|
||||
test_delete \
|
||||
test_diffmode \
|
||||
test_digraph \
|
||||
test_functions \
|
||||
test_display \
|
||||
test_ex_undo \
|
||||
test_execute_func \
|
||||
test_expand \
|
||||
@@ -2101,8 +2124,10 @@ test_arglist \
|
||||
test_fileformat \
|
||||
test_filter_cmd \
|
||||
test_filter_map \
|
||||
test_float_func \
|
||||
test_fnameescape \
|
||||
test_fnamemodify \
|
||||
test_fold \
|
||||
test_glob2regpat \
|
||||
test_gf \
|
||||
test_gn \
|
||||
@@ -2110,6 +2135,7 @@ test_arglist \
|
||||
test_gui \
|
||||
test_hardcopy \
|
||||
test_help_tagjump \
|
||||
test_hide \
|
||||
test_history \
|
||||
test_hlsearch \
|
||||
test_increment \
|
||||
@@ -2130,26 +2156,32 @@ test_arglist \
|
||||
test_matchadd_conceal_utf8 \
|
||||
test_menu \
|
||||
test_messages \
|
||||
test_mksession \
|
||||
test_mksession_utf8 \
|
||||
test_nested_function \
|
||||
test_netbeans \
|
||||
test_normal \
|
||||
test_options \
|
||||
test_packadd \
|
||||
test_partial \
|
||||
test_paste \
|
||||
test_perl \
|
||||
test_popup \
|
||||
test_profile \
|
||||
test_put \
|
||||
test_quickfix \
|
||||
test_regexp_latin \
|
||||
test_regexp_utf8 \
|
||||
test_reltime \
|
||||
test_retab \
|
||||
test_ruby \
|
||||
test_search \
|
||||
test_searchpos \
|
||||
test_set \
|
||||
test_signs \
|
||||
test_smartindent \
|
||||
test_sort \
|
||||
test_source_utf8 \
|
||||
test_smartindent \
|
||||
test_startup \
|
||||
test_startup_utf8 \
|
||||
test_stat \
|
||||
@@ -2157,6 +2189,7 @@ test_arglist \
|
||||
test_substitute \
|
||||
test_syn_attr \
|
||||
test_syntax \
|
||||
test_system \
|
||||
test_tabline \
|
||||
test_tabpage \
|
||||
test_tagcase \
|
||||
@@ -2863,8 +2896,16 @@ auto/gui_gtk_gresources.h: gui_gtk_res.xml $(GUI_GTK_RES_INPUTS)
|
||||
# commands understand putting object files in another directory, it must be
|
||||
# specified for each file separately.
|
||||
|
||||
objects:
|
||||
mkdir objects
|
||||
objects: objects/.dirstamp
|
||||
|
||||
objects/.dirstamp:
|
||||
mkdir -p objects
|
||||
touch objects/.dirstamp
|
||||
|
||||
# All object files depend on the objects directory, so that parallel make
|
||||
# works. Can't depend on the directory itself, its timestamp changes all the
|
||||
# time.
|
||||
$(ALL_OBJ): objects/.dirstamp
|
||||
|
||||
objects/MMBackend.o: MacVim/MMBackend.m
|
||||
$(CCC) -fobjc-exceptions -o $@ MacVim/MMBackend.m
|
||||
@@ -2963,7 +3004,7 @@ objects/gui_gtk_f.o: gui_gtk_f.c
|
||||
$(CCC) -o $@ gui_gtk_f.c
|
||||
|
||||
objects/gui_gtk_gresources.o: auto/gui_gtk_gresources.c
|
||||
$(CCC) $(PERL_CFLAGS) -o $@ auto/gui_gtk_gresources.c
|
||||
$(CCC_NF) $(PERL_CFLAGS) $(ALL_CFLAGS) -o $@ auto/gui_gtk_gresources.c
|
||||
|
||||
objects/gui_gtk_x11.o: gui_gtk_x11.c
|
||||
$(CCC) -o $@ gui_gtk_x11.c
|
||||
@@ -2999,7 +3040,7 @@ objects/if_xcmdsrv.o: if_xcmdsrv.c
|
||||
$(CCC) -o $@ if_xcmdsrv.c
|
||||
|
||||
objects/if_lua.o: if_lua.c
|
||||
$(CCC) $(LUA_CFLAGS) -o $@ if_lua.c
|
||||
$(CCC_NF) $(LUA_CFLAGS) $(ALL_CFLAGS) -o $@ if_lua.c
|
||||
|
||||
objects/if_mzsch.o: if_mzsch.c $(MZSCHEME_EXTRA)
|
||||
$(CCC) -o $@ $(MZSCHEME_CFLAGS_EXTRA) if_mzsch.c
|
||||
@@ -3008,27 +3049,28 @@ mzscheme_base.c:
|
||||
$(MZSCHEME_MZC) --c-mods mzscheme_base.c ++lib scheme/base
|
||||
|
||||
objects/if_perl.o: auto/if_perl.c
|
||||
$(CCC) $(PERL_CFLAGS) -o $@ auto/if_perl.c
|
||||
$(CCC_NF) $(PERL_CFLAGS) $(ALL_CFLAGS) -o $@ auto/if_perl.c
|
||||
|
||||
objects/if_perlsfio.o: if_perlsfio.c
|
||||
$(CCC) $(PERL_CFLAGS) -o $@ if_perlsfio.c
|
||||
$(CCC_NF) $(PERL_CFLAGS) $(ALL_CFLAGS) -o $@ if_perlsfio.c
|
||||
|
||||
objects/py_getpath.o: $(PYTHON_CONFDIR)/getpath.c
|
||||
$(CCC) $(PYTHON_CFLAGS) -o $@ $(PYTHON_CONFDIR)/getpath.c \
|
||||
$(CCC_NF) $(PYTHON_CFLAGS) $(ALL_CFLAGS) -o $@ \
|
||||
$(PYTHON_CONFDIR)/getpath.c \
|
||||
-I$(PYTHON_CONFDIR) -DHAVE_CONFIG_H -DNO_MAIN \
|
||||
$(PYTHON_GETPATH_CFLAGS)
|
||||
|
||||
objects/if_python.o: if_python.c if_py_both.h
|
||||
$(CCC) $(PYTHON_CFLAGS) $(PYTHON_CFLAGS_EXTRA) -o $@ if_python.c
|
||||
$(CCC_NF) $(PYTHON_CFLAGS) $(PYTHON_CFLAGS_EXTRA) $(ALL_CFLAGS) -o $@ if_python.c
|
||||
|
||||
objects/if_python3.o: if_python3.c if_py_both.h
|
||||
$(CCC) $(PYTHON3_CFLAGS) $(PYTHON3_CFLAGS_EXTRA) -o $@ if_python3.c
|
||||
$(CCC_NF) $(PYTHON3_CFLAGS) $(PYTHON3_CFLAGS_EXTRA) $(ALL_CFLAGS) -o $@ if_python3.c
|
||||
|
||||
objects/if_ruby.o: if_ruby.c
|
||||
$(CCC) $(RUBY_CFLAGS) -o $@ if_ruby.c
|
||||
$(CCC_NF) $(RUBY_CFLAGS) $(ALL_CFLAGS) -o $@ if_ruby.c
|
||||
|
||||
objects/if_tcl.o: if_tcl.c
|
||||
$(CCC) $(TCL_CFLAGS) -o $@ if_tcl.c
|
||||
$(CCC_NF) $(TCL_CFLAGS) $(ALL_CFLAGS) -o $@ if_tcl.c
|
||||
|
||||
objects/integration.o: integration.c
|
||||
$(CCC) -o $@ integration.c
|
||||
@@ -3085,7 +3127,7 @@ objects/ops.o: ops.c
|
||||
$(CCC) -o $@ ops.c
|
||||
|
||||
objects/option.o: option.c
|
||||
$(CCC) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(PYTHON3_CFLAGS) $(RUBY_CFLAGS) $(TCL_CFLAGS) -o $@ option.c
|
||||
$(CCC_NF) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(PYTHON3_CFLAGS) $(RUBY_CFLAGS) $(TCL_CFLAGS) $(ALL_CFLAGS) -o $@ option.c
|
||||
|
||||
objects/os_beos.o: os_beos.c
|
||||
$(CCC) -o $@ os_beos.c
|
||||
|
||||
Vendored
+10
-4
@@ -7233,6 +7233,12 @@ $as_echo "$rubyhdrdir" >&6; }
|
||||
rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
|
||||
if test -d "$rubyarchdir"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
|
||||
else
|
||||
dnl rbconfig says darwin15 but 10.12 SDK has darwin16
|
||||
rubyarchdir=${rubyarchdir/darwin15/darwin16}
|
||||
if test -d "$rubyarchdir"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
|
||||
fi
|
||||
fi
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
|
||||
if test "X$rubyversion" = "X"; then
|
||||
@@ -7251,7 +7257,7 @@ $as_echo "$rubyhdrdir" >&6; }
|
||||
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
|
||||
elif test -d "/System/Library/Frameworks/Ruby.framework"; then
|
||||
RUBY_LIBS="-framework Ruby"
|
||||
RUBY_CFLAGS="-DRUBY_VERSION=$rubyversion"
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
|
||||
librubyarg=
|
||||
fi
|
||||
|
||||
@@ -7502,7 +7508,7 @@ $as_echo_n "checking whether compiling with process communication is possible...
|
||||
/* Check bitfields */
|
||||
struct nbbuf {
|
||||
unsigned int initDone:1;
|
||||
ushort signmaplen;
|
||||
unsigned short signmaplen;
|
||||
};
|
||||
|
||||
int
|
||||
@@ -12118,8 +12124,8 @@ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
|
||||
|
||||
fi
|
||||
|
||||
for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
|
||||
for ac_func in fchdir fchown fsync getcwd getpseudotty \
|
||||
getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
|
||||
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
|
||||
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
|
||||
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
|
||||
|
||||
+2
-2
@@ -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++)
|
||||
|
||||
+18
-13
@@ -113,16 +113,19 @@ read_buffer(
|
||||
* it can be changed there. */
|
||||
if (!readonlymode && !bufempty())
|
||||
changed();
|
||||
else if (retval != FAIL)
|
||||
else if (retval == OK)
|
||||
unchanged(curbuf, FALSE);
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (retval == OK)
|
||||
{
|
||||
# ifdef FEAT_EVAL
|
||||
apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE,
|
||||
apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE,
|
||||
curbuf, &retval);
|
||||
# else
|
||||
apply_autocmds(EVENT_STDINREADPOST, NULL, NULL, FALSE, curbuf);
|
||||
apply_autocmds(EVENT_STDINREADPOST, NULL, NULL, FALSE, curbuf);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return retval;
|
||||
@@ -294,7 +297,7 @@ open_buffer(
|
||||
#endif
|
||||
)
|
||||
changed();
|
||||
else if (retval != FAIL && !read_stdin && !read_fifo)
|
||||
else if (retval == OK && !read_stdin && !read_fifo)
|
||||
unchanged(curbuf, FALSE);
|
||||
save_file_ff(curbuf); /* keep this fileformat */
|
||||
|
||||
@@ -328,7 +331,7 @@ open_buffer(
|
||||
# endif
|
||||
#endif
|
||||
|
||||
if (retval != FAIL)
|
||||
if (retval == OK)
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/*
|
||||
@@ -451,7 +454,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 +1419,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 +1656,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
|
||||
@@ -2153,6 +2157,7 @@ free_buf_options(
|
||||
#if defined(FEAT_CRYPT)
|
||||
clear_string_option(&buf->b_p_cm);
|
||||
#endif
|
||||
clear_string_option(&buf->b_p_fp);
|
||||
#if defined(FEAT_EVAL)
|
||||
clear_string_option(&buf->b_p_fex);
|
||||
#endif
|
||||
@@ -4867,8 +4872,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 +4949,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 +5154,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
|
||||
|
||||
+255
-77
@@ -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... */
|
||||
@@ -731,7 +731,14 @@ channel_open(
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
}
|
||||
memcpy((char *)&server.sin_addr, host->h_addr, host->h_length);
|
||||
{
|
||||
char *p;
|
||||
|
||||
/* When using host->h_addr directly ubsan warns for it to not be
|
||||
* aligned. First copy the pointer to aviod that. */
|
||||
memcpy(&p, &host->h_addr, sizeof(p));
|
||||
memcpy((char *)&server.sin_addr, p, host->h_length);
|
||||
}
|
||||
|
||||
/* On Mac and Solaris a zero timeout almost never works. At least wait
|
||||
* one millisecond. Let's do it for all systems, because we don't know why
|
||||
@@ -1216,6 +1223,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 +1370,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);
|
||||
}
|
||||
|
||||
@@ -1587,7 +1595,7 @@ invoke_callback(channel_T *channel, char_u *callback, partial_T *partial,
|
||||
int dummy;
|
||||
|
||||
if (safe_to_invoke_callback == 0)
|
||||
EMSG("INTERNAL: Invoking callback when it is not safe");
|
||||
IEMSG("INTERNAL: Invoking callback when it is not safe");
|
||||
|
||||
argv[0].v_type = VAR_CHANNEL;
|
||||
argv[0].vval.v_channel = channel;
|
||||
@@ -1916,9 +1924,12 @@ channel_parse_json(channel_T *channel, ch_part_T part)
|
||||
|
||||
/* When a message is incomplete we wait for a short while for more to
|
||||
* arrive. After the delay drop the input, otherwise a truncated string
|
||||
* or list will make us hang. */
|
||||
* or list will make us hang.
|
||||
* Do not generate error messages, they will be written in a channel log. */
|
||||
++emsg_silent;
|
||||
status = json_decode(&reader, &listtv,
|
||||
chanpart->ch_mode == MODE_JS ? JSON_JS : 0);
|
||||
--emsg_silent;
|
||||
if (status == OK)
|
||||
{
|
||||
/* Only accept the response when it is a list with at least two
|
||||
@@ -1939,6 +1950,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 +2083,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 +2103,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 +2120,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 +2509,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 +2553,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 +2630,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 +2639,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 +2676,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 +2712,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 +2901,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 +3201,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 +3357,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 +3378,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 +3564,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 +3929,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 +3978,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 +4013,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 +4404,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 +4598,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 +4670,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 +4693,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 +4702,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 +4741,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 +4761,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 +4855,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 +4870,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 +5095,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)
|
||||
|
||||
+32
-6
@@ -887,7 +887,7 @@ vim_isIDc(int c)
|
||||
|
||||
/*
|
||||
* return TRUE if 'c' is a keyword character: Letters and characters from
|
||||
* 'iskeyword' option for current buffer.
|
||||
* 'iskeyword' option for the current buffer.
|
||||
* For multi-byte characters mb_get_class() is used (builtin rules).
|
||||
*/
|
||||
int
|
||||
@@ -1901,7 +1901,11 @@ vim_str2nr(
|
||||
n += 2; /* skip over "0b" */
|
||||
while ('0' <= *ptr && *ptr <= '1')
|
||||
{
|
||||
un = 2 * un + (unsigned long)(*ptr - '0');
|
||||
/* avoid ubsan error for overflow */
|
||||
if (un < UVARNUM_MAX / 2)
|
||||
un = 2 * un + (unsigned long)(*ptr - '0');
|
||||
else
|
||||
un = UVARNUM_MAX;
|
||||
++ptr;
|
||||
if (n++ == maxlen)
|
||||
break;
|
||||
@@ -1912,7 +1916,11 @@ vim_str2nr(
|
||||
/* octal */
|
||||
while ('0' <= *ptr && *ptr <= '7')
|
||||
{
|
||||
un = 8 * un + (uvarnumber_T)(*ptr - '0');
|
||||
/* avoid ubsan error for overflow */
|
||||
if (un < UVARNUM_MAX / 8)
|
||||
un = 8 * un + (uvarnumber_T)(*ptr - '0');
|
||||
else
|
||||
un = UVARNUM_MAX;
|
||||
++ptr;
|
||||
if (n++ == maxlen)
|
||||
break;
|
||||
@@ -1925,7 +1933,11 @@ vim_str2nr(
|
||||
n += 2; /* skip over "0x" */
|
||||
while (vim_isxdigit(*ptr))
|
||||
{
|
||||
un = 16 * un + (uvarnumber_T)hex2nr(*ptr);
|
||||
/* avoid ubsan error for overflow */
|
||||
if (un < UVARNUM_MAX / 16)
|
||||
un = 16 * un + (uvarnumber_T)hex2nr(*ptr);
|
||||
else
|
||||
un = UVARNUM_MAX;
|
||||
++ptr;
|
||||
if (n++ == maxlen)
|
||||
break;
|
||||
@@ -1936,7 +1948,11 @@ vim_str2nr(
|
||||
/* decimal */
|
||||
while (VIM_ISDIGIT(*ptr))
|
||||
{
|
||||
un = 10 * un + (uvarnumber_T)(*ptr - '0');
|
||||
/* avoid ubsan error for overflow */
|
||||
if (un < UVARNUM_MAX / 10)
|
||||
un = 10 * un + (uvarnumber_T)(*ptr - '0');
|
||||
else
|
||||
un = UVARNUM_MAX;
|
||||
++ptr;
|
||||
if (n++ == maxlen)
|
||||
break;
|
||||
@@ -1950,9 +1966,19 @@ vim_str2nr(
|
||||
if (nptr != NULL)
|
||||
{
|
||||
if (negative) /* account for leading '-' for decimal numbers */
|
||||
*nptr = -(varnumber_T)un;
|
||||
{
|
||||
/* avoid ubsan error for overflow */
|
||||
if (un > VARNUM_MAX)
|
||||
*nptr = VARNUM_MIN;
|
||||
else
|
||||
*nptr = -(varnumber_T)un;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (un > VARNUM_MAX)
|
||||
un = VARNUM_MAX;
|
||||
*nptr = (varnumber_T)un;
|
||||
}
|
||||
}
|
||||
if (unptr != NULL)
|
||||
*unptr = un;
|
||||
|
||||
+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.
|
||||
@@ -1904,6 +1904,12 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG[['rubyarchhdrdir']] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG[['arch']]"`
|
||||
if test -d "$rubyarchdir"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
|
||||
else
|
||||
dnl rbconfig says darwin15 but 10.12 SDK has darwin16
|
||||
rubyarchdir=${rubyarchdir/darwin15/darwin16}
|
||||
if test -d "$rubyarchdir"; then
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
|
||||
fi
|
||||
fi
|
||||
rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
|
||||
if test "X$rubyversion" = "X"; then
|
||||
@@ -1924,7 +1930,7 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
|
||||
dnl On Mac OS X it is safer to just use the -framework flag
|
||||
RUBY_LIBS="-framework Ruby"
|
||||
dnl Don't include the -I flag when -framework is set
|
||||
RUBY_CFLAGS="-DRUBY_VERSION=$rubyversion"
|
||||
RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
|
||||
librubyarg=
|
||||
fi
|
||||
|
||||
@@ -2053,7 +2059,7 @@ if test "$enable_channel" = "yes"; then
|
||||
/* Check bitfields */
|
||||
struct nbbuf {
|
||||
unsigned int initDone:1;
|
||||
ushort signmaplen;
|
||||
unsigned short signmaplen;
|
||||
};
|
||||
], [
|
||||
/* Check creating a socket. */
|
||||
@@ -3673,8 +3679,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},
|
||||
|
||||
+125
-9
@@ -309,6 +309,7 @@ static int dont_sync_undo = FALSE; /* CTRL-G U prevents syncing undo for
|
||||
* "cmdchar" can be:
|
||||
* 'i' normal insert command
|
||||
* 'a' normal append command
|
||||
* K_PS bracketed paste
|
||||
* 'R' replace command
|
||||
* 'r' "r<CR>" command: insert one <CR>. Note: count can be > 1, for redo,
|
||||
* but still only one <CR> is inserted. The <Esc> is not used for redo.
|
||||
@@ -462,7 +463,10 @@ edit(
|
||||
else
|
||||
#endif
|
||||
{
|
||||
AppendCharToRedobuff(cmdchar);
|
||||
if (cmdchar == K_PS)
|
||||
AppendCharToRedobuff('a');
|
||||
else
|
||||
AppendCharToRedobuff(cmdchar);
|
||||
if (cmdchar == 'g') /* "gI" command */
|
||||
AppendCharToRedobuff('I');
|
||||
else if (cmdchar == 'r') /* "r<CR>" command */
|
||||
@@ -530,6 +534,10 @@ edit(
|
||||
revins_legal = 0;
|
||||
revins_scol = -1;
|
||||
#endif
|
||||
if (!p_ek)
|
||||
/* Disable bracketed paste mode, we won't recognize the escape
|
||||
* sequences. */
|
||||
out_str(T_BD);
|
||||
|
||||
/*
|
||||
* Handle restarting Insert mode.
|
||||
@@ -782,10 +790,14 @@ edit(
|
||||
dont_sync_undo = TRUE;
|
||||
else
|
||||
dont_sync_undo = FALSE;
|
||||
do
|
||||
{
|
||||
c = safe_vgetc();
|
||||
} while (c == K_IGNORE);
|
||||
if (cmdchar == K_PS)
|
||||
/* Got here from normal mode when bracketed paste started. */
|
||||
c = K_PS;
|
||||
else
|
||||
do
|
||||
{
|
||||
c = safe_vgetc();
|
||||
} while (c == K_IGNORE);
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */
|
||||
@@ -1025,7 +1037,7 @@ doESCkey:
|
||||
case Ctrl_Z: /* suspend when 'insertmode' set */
|
||||
if (!p_im)
|
||||
goto normalchar; /* insert CTRL-Z as normal char */
|
||||
stuffReadbuff((char_u *)":st\r");
|
||||
do_cmdline_cmd((char_u *)"stop");
|
||||
c = Ctrl_O;
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
@@ -1202,6 +1214,16 @@ doESCkey:
|
||||
break;
|
||||
# endif
|
||||
#endif
|
||||
case K_PS:
|
||||
bracketed_paste(PASTE_INSERT, FALSE, NULL);
|
||||
if (cmdchar == K_PS)
|
||||
/* invoked from normal mode, bail out */
|
||||
goto doESCkey;
|
||||
break;
|
||||
case K_PE:
|
||||
/* Got K_PE without K_PS, ignore. */
|
||||
break;
|
||||
|
||||
#ifdef FEAT_GUI_TABLINE
|
||||
case K_TABLINE:
|
||||
case K_TABMENU:
|
||||
@@ -2308,7 +2330,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;
|
||||
}
|
||||
|
||||
@@ -3889,7 +3911,7 @@ ins_compl_prep(int c)
|
||||
if (prev_col > 0)
|
||||
dec_cursor();
|
||||
/* only format when something was inserted */
|
||||
if (!arrow_used && !ins_need_undo)
|
||||
if (!arrow_used && !ins_need_undo && c != Ctrl_E)
|
||||
insertchar(NUL, 0, -1);
|
||||
if (prev_col > 0
|
||||
&& ml_get_curline()[curwin->w_cursor.col] != NUL)
|
||||
@@ -5445,7 +5467,7 @@ ins_complete(int c, int enable_pum)
|
||||
}
|
||||
else
|
||||
{
|
||||
EMSG2(_(e_intern2), "ins_complete()");
|
||||
internal_error("ins_complete()");
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -8619,6 +8641,9 @@ ins_esc(
|
||||
#ifdef CURSOR_SHAPE
|
||||
ui_cursor_shape(); /* may show different cursor shape */
|
||||
#endif
|
||||
if (!p_ek)
|
||||
/* Re-enable bracketed paste mode. */
|
||||
out_str(T_BE);
|
||||
|
||||
/*
|
||||
* When recording or for CTRL-O, need to display the new mode.
|
||||
@@ -9457,6 +9482,97 @@ ins_mousescroll(int dir)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Handle receiving P_PS: start paste mode. Inserts the following text up to
|
||||
* P_PE literally.
|
||||
* When "drop" is TRUE then consume the text and drop it.
|
||||
*/
|
||||
int
|
||||
bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
|
||||
{
|
||||
int c;
|
||||
char_u buf[NUMBUFLEN + MB_MAXBYTES];
|
||||
int idx = 0;
|
||||
char_u *end = find_termcode((char_u *)"PE");
|
||||
int ret_char = -1;
|
||||
int save_allow_keys = allow_keys;
|
||||
|
||||
/* If the end code is too long we can't detect it, read everything. */
|
||||
if (STRLEN(end) >= NUMBUFLEN)
|
||||
end = NULL;
|
||||
++no_mapping;
|
||||
allow_keys = 0;
|
||||
for (;;)
|
||||
{
|
||||
/* When the end is not defined read everything. */
|
||||
if (end == NULL && vpeekc() == NUL)
|
||||
break;
|
||||
c = plain_vgetc();
|
||||
#ifdef FEAT_MBYTE
|
||||
if (has_mbyte)
|
||||
idx += (*mb_char2bytes)(c, buf + idx);
|
||||
else
|
||||
#endif
|
||||
buf[idx++] = c;
|
||||
buf[idx] = NUL;
|
||||
if (end != NUL && STRNCMP(buf, end, idx) == 0)
|
||||
{
|
||||
if (end[idx] == NUL)
|
||||
break; /* Found the end of paste code. */
|
||||
continue;
|
||||
}
|
||||
if (!drop)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case PASTE_CMDLINE:
|
||||
put_on_cmdline(buf, idx, TRUE);
|
||||
break;
|
||||
|
||||
case PASTE_EX:
|
||||
if (gap != NULL && ga_grow(gap, idx) == OK)
|
||||
{
|
||||
mch_memmove((char *)gap->ga_data + gap->ga_len,
|
||||
buf, (size_t)idx);
|
||||
gap->ga_len += idx;
|
||||
}
|
||||
break;
|
||||
|
||||
case PASTE_INSERT:
|
||||
if (stop_arrow() == OK)
|
||||
{
|
||||
c = buf[0];
|
||||
if (idx == 1 && (c == CAR || c == K_KENTER || c == NL))
|
||||
ins_eol(c);
|
||||
else
|
||||
{
|
||||
ins_char_bytes(buf, idx);
|
||||
AppendToRedobuffLit(buf, idx);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PASTE_ONE_CHAR:
|
||||
if (ret_char == -1)
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
if (has_mbyte)
|
||||
ret_char = (*mb_ptr2char)(buf);
|
||||
else
|
||||
#endif
|
||||
ret_char = buf[0];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
idx = 0;
|
||||
}
|
||||
--no_mapping;
|
||||
allow_keys = save_allow_keys;
|
||||
|
||||
return ret_char;
|
||||
}
|
||||
|
||||
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
|
||||
static void
|
||||
ins_tabline(int c)
|
||||
|
||||
+83
-42
@@ -242,14 +242,38 @@ static void list_one_var(dictitem_T *v, char_u *prefix, int *first);
|
||||
static void list_one_var_a(char_u *prefix, char_u *name, int type, char_u *string, int *first);
|
||||
static char_u *find_option_end(char_u **arg, int *opt_flags);
|
||||
|
||||
#ifdef EBCDIC
|
||||
static int compare_func_name(const void *s1, const void *s2);
|
||||
static void sortFunctions();
|
||||
#endif
|
||||
|
||||
/* for VIM_VERSION_ defines */
|
||||
#include "version.h"
|
||||
|
||||
|
||||
#if defined(EBCDIC) || defined(PROTO)
|
||||
/*
|
||||
* Compare struct fst by function name.
|
||||
*/
|
||||
static int
|
||||
compare_func_name(const void *s1, const void *s2)
|
||||
{
|
||||
struct fst *p1 = (struct fst *)s1;
|
||||
struct fst *p2 = (struct fst *)s2;
|
||||
|
||||
return STRCMP(p1->f_name, p2->f_name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sort the function table by function name.
|
||||
* The sorting of the table above is ASCII dependant.
|
||||
* On machines using EBCDIC we have to sort it.
|
||||
*/
|
||||
static void
|
||||
sortFunctions(void)
|
||||
{
|
||||
int funcCnt = (int)(sizeof(functions) / sizeof(struct fst)) - 1;
|
||||
|
||||
qsort(functions, (size_t)funcCnt, sizeof(struct fst), compare_func_name);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Initialize the global and v: variables.
|
||||
*/
|
||||
@@ -270,7 +294,7 @@ eval_init(void)
|
||||
p = &vimvars[i];
|
||||
if (STRLEN(p->vv_name) > 16)
|
||||
{
|
||||
EMSG("INTERNAL: name too long, increase size of dictitem16_T");
|
||||
IEMSG("INTERNAL: name too long, increase size of dictitem16_T");
|
||||
getout(1);
|
||||
}
|
||||
STRCPY(p->vv_di.di_key, p->vv_name);
|
||||
@@ -839,7 +863,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 +1332,7 @@ ex_let_vars(
|
||||
}
|
||||
else if (*arg != ',' && *arg != ']')
|
||||
{
|
||||
EMSG2(_(e_intern2), "ex_let_vars()");
|
||||
internal_error("ex_let_vars()");
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
@@ -2830,7 +2854,7 @@ do_unlet(char_u *name, int forceit)
|
||||
}
|
||||
if (d == NULL)
|
||||
{
|
||||
EMSG2(_(e_intern2), "do_unlet()");
|
||||
internal_error("do_unlet()");
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
@@ -4085,21 +4109,12 @@ eval6(
|
||||
{
|
||||
if (n2 == 0) /* give an error message? */
|
||||
{
|
||||
#ifdef FEAT_NUM64
|
||||
if (n1 == 0)
|
||||
n1 = -0x7fffffffffffffffLL - 1; /* similar to NaN */
|
||||
n1 = VARNUM_MIN; /* similar to NaN */
|
||||
else if (n1 < 0)
|
||||
n1 = -0x7fffffffffffffffLL;
|
||||
n1 = -VARNUM_MAX;
|
||||
else
|
||||
n1 = 0x7fffffffffffffffLL;
|
||||
#else
|
||||
if (n1 == 0)
|
||||
n1 = -0x7fffffffL - 1L; /* similar to NaN */
|
||||
else if (n1 < 0)
|
||||
n1 = -0x7fffffffL;
|
||||
else
|
||||
n1 = 0x7fffffffL;
|
||||
#endif
|
||||
n1 = VARNUM_MAX;
|
||||
}
|
||||
else
|
||||
n1 = n1 / n2;
|
||||
@@ -4339,10 +4354,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 +5700,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";
|
||||
}
|
||||
|
||||
@@ -5964,6 +5986,22 @@ string2float(
|
||||
char *s = (char *)text;
|
||||
float_T f;
|
||||
|
||||
/* MS-Windows does not deal with "inf" and "nan" properly. */
|
||||
if (STRNICMP(text, "inf", 3) == 0)
|
||||
{
|
||||
*value = INFINITY;
|
||||
return 3;
|
||||
}
|
||||
if (STRNICMP(text, "-inf", 3) == 0)
|
||||
{
|
||||
*value = -INFINITY;
|
||||
return 4;
|
||||
}
|
||||
if (STRNICMP(text, "nan", 3) == 0)
|
||||
{
|
||||
*value = NAN;
|
||||
return 3;
|
||||
}
|
||||
f = strtod(s, &s);
|
||||
*value = f;
|
||||
return (int)((char_u *)s - text);
|
||||
@@ -7152,7 +7190,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 +7237,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 +7321,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 +7771,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 +8000,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 +8074,7 @@ item_copy(
|
||||
ret = FAIL;
|
||||
break;
|
||||
case VAR_UNKNOWN:
|
||||
EMSG2(_(e_intern2), "item_copy(UNKNOWN)");
|
||||
internal_error("item_copy(UNKNOWN)");
|
||||
ret = FAIL;
|
||||
}
|
||||
--recurse;
|
||||
@@ -9209,6 +9247,8 @@ fill_assert_error(
|
||||
{
|
||||
if (atype == ASSERT_MATCH || atype == ASSERT_NOTMATCH)
|
||||
ga_concat(gap, (char_u *)"Pattern ");
|
||||
else if (atype == ASSERT_NOTEQUAL)
|
||||
ga_concat(gap, (char_u *)"Expected not equal to ");
|
||||
else
|
||||
ga_concat(gap, (char_u *)"Expected ");
|
||||
if (exp_str == NULL)
|
||||
@@ -9218,16 +9258,17 @@ fill_assert_error(
|
||||
}
|
||||
else
|
||||
ga_concat_esc(gap, exp_str);
|
||||
if (atype == ASSERT_MATCH)
|
||||
ga_concat(gap, (char_u *)" does not match ");
|
||||
else if (atype == ASSERT_NOTMATCH)
|
||||
ga_concat(gap, (char_u *)" does match ");
|
||||
else if (atype == ASSERT_NOTEQUAL)
|
||||
ga_concat(gap, (char_u *)" differs from ");
|
||||
else
|
||||
ga_concat(gap, (char_u *)" but got ");
|
||||
ga_concat_esc(gap, tv2string(got_tv, &tofree, numbuf, 0));
|
||||
vim_free(tofree);
|
||||
if (atype != ASSERT_NOTEQUAL)
|
||||
{
|
||||
if (atype == ASSERT_MATCH)
|
||||
ga_concat(gap, (char_u *)" does not match ");
|
||||
else if (atype == ASSERT_NOTMATCH)
|
||||
ga_concat(gap, (char_u *)" does match ");
|
||||
else
|
||||
ga_concat(gap, (char_u *)" but got ");
|
||||
ga_concat_esc(gap, tv2string(got_tv, &tofree, numbuf, 0));
|
||||
vim_free(tofree);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+82
-63
@@ -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},
|
||||
@@ -921,34 +923,6 @@ get_expr_name(expand_T *xp, int idx)
|
||||
|
||||
#endif /* FEAT_CMDL_COMPL */
|
||||
|
||||
#if defined(EBCDIC) || defined(PROTO)
|
||||
/*
|
||||
* Compare struct fst by function name.
|
||||
*/
|
||||
static int
|
||||
compare_func_name(const void *s1, const void *s2)
|
||||
{
|
||||
struct fst *p1 = (struct fst *)s1;
|
||||
struct fst *p2 = (struct fst *)s2;
|
||||
|
||||
return STRCMP(p1->f_name, p2->f_name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sort the function table by function name.
|
||||
* The sorting of the table above is ASCII dependant.
|
||||
* On machines using EBCDIC we have to sort it.
|
||||
*/
|
||||
static void
|
||||
sortFunctions(void)
|
||||
{
|
||||
int funcCnt = (int)(sizeof(functions) / sizeof(struct fst)) - 1;
|
||||
|
||||
qsort(functions, (size_t)funcCnt, sizeof(struct fst), compare_func_name);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Find internal function in table above.
|
||||
* Return index, or -1 if not found
|
||||
@@ -1778,6 +1752,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 +2633,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;
|
||||
}
|
||||
@@ -3315,21 +3304,12 @@ f_float2nr(typval_T *argvars, typval_T *rettv)
|
||||
|
||||
if (get_float_arg(argvars, &f) == OK)
|
||||
{
|
||||
# ifdef FEAT_NUM64
|
||||
if (f < -0x7fffffffffffffffLL)
|
||||
rettv->vval.v_number = -0x7fffffffffffffffLL;
|
||||
else if (f > 0x7fffffffffffffffLL)
|
||||
rettv->vval.v_number = 0x7fffffffffffffffLL;
|
||||
if (f < -VARNUM_MAX)
|
||||
rettv->vval.v_number = -VARNUM_MAX;
|
||||
else if (f > VARNUM_MAX)
|
||||
rettv->vval.v_number = VARNUM_MAX;
|
||||
else
|
||||
rettv->vval.v_number = (varnumber_T)f;
|
||||
# else
|
||||
if (f < -0x7fffffff)
|
||||
rettv->vval.v_number = -0x7fffffff;
|
||||
else if (f > 0x7fffffff)
|
||||
rettv->vval.v_number = 0x7fffffff;
|
||||
else
|
||||
rettv->vval.v_number = (varnumber_T)f;
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3956,7 +3936,8 @@ get_buffer_info(buf_T *buf)
|
||||
dict_add_nr_str(dict, "bufnr", buf->b_fnum, NULL);
|
||||
dict_add_nr_str(dict, "name", 0L,
|
||||
buf->b_ffname != NULL ? buf->b_ffname : (char_u *)"");
|
||||
dict_add_nr_str(dict, "lnum", buflist_findlnum(buf), NULL);
|
||||
dict_add_nr_str(dict, "lnum", buf == curbuf ? curwin->w_cursor.lnum
|
||||
: buflist_findlnum(buf), NULL);
|
||||
dict_add_nr_str(dict, "loaded", buf->b_ml.ml_mfp != NULL, NULL);
|
||||
dict_add_nr_str(dict, "listed", buf->b_p_bl, NULL);
|
||||
dict_add_nr_str(dict, "changed", bufIsChanged(buf), NULL);
|
||||
@@ -4241,7 +4222,7 @@ f_getchar(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
if (argvars[0].v_type == VAR_UNKNOWN)
|
||||
/* getchar(): blocking wait. */
|
||||
n = safe_vgetc();
|
||||
n = plain_vgetc();
|
||||
else if (get_tv_number_chk(&argvars[0], &error) == 1)
|
||||
/* getchar(1): only check if char avail */
|
||||
n = vpeekc_any();
|
||||
@@ -4250,7 +4231,7 @@ f_getchar(typval_T *argvars, typval_T *rettv)
|
||||
n = 0;
|
||||
else
|
||||
/* getchar(0) and char avail: return char */
|
||||
n = safe_vgetc();
|
||||
n = plain_vgetc();
|
||||
|
||||
if (n == K_IGNORE)
|
||||
continue;
|
||||
@@ -5978,6 +5959,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;
|
||||
@@ -6815,8 +6800,7 @@ f_json_decode(typval_T *argvars, typval_T *rettv)
|
||||
reader.js_buf = get_tv_string(&argvars[0]);
|
||||
reader.js_fill = NULL;
|
||||
reader.js_used = 0;
|
||||
if (json_decode_all(&reader, rettv, 0) != OK)
|
||||
EMSG(_(e_invarg));
|
||||
json_decode_all(&reader, rettv, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6885,10 +6869,8 @@ f_len(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
}
|
||||
|
||||
static void libcall_common(typval_T *argvars, typval_T *rettv, int type);
|
||||
|
||||
static void
|
||||
libcall_common(typval_T *argvars, typval_T *rettv, int type)
|
||||
libcall_common(typval_T *argvars UNUSED, typval_T *rettv, int type)
|
||||
{
|
||||
#ifdef FEAT_LIBCALL
|
||||
char_u *string_in;
|
||||
@@ -9514,15 +9496,15 @@ do_searchpair(
|
||||
|
||||
/* Make two search patterns: start/end (pat2, for in nested pairs) and
|
||||
* start/middle/end (pat3, for the top pair). */
|
||||
pat2 = alloc((unsigned)(STRLEN(spat) + STRLEN(epat) + 15));
|
||||
pat3 = alloc((unsigned)(STRLEN(spat) + STRLEN(mpat) + STRLEN(epat) + 23));
|
||||
pat2 = alloc((unsigned)(STRLEN(spat) + STRLEN(epat) + 17));
|
||||
pat3 = alloc((unsigned)(STRLEN(spat) + STRLEN(mpat) + STRLEN(epat) + 25));
|
||||
if (pat2 == NULL || pat3 == NULL)
|
||||
goto theend;
|
||||
sprintf((char *)pat2, "\\(%s\\m\\)\\|\\(%s\\m\\)", spat, epat);
|
||||
sprintf((char *)pat2, "\\m\\(%s\\m\\)\\|\\(%s\\m\\)", spat, epat);
|
||||
if (*mpat == NUL)
|
||||
STRCPY(pat3, pat2);
|
||||
else
|
||||
sprintf((char *)pat3, "\\(%s\\m\\)\\|\\(%s\\m\\)\\|\\(%s\\m\\)",
|
||||
sprintf((char *)pat3, "\\m\\(%s\\m\\)\\|\\(%s\\m\\)\\|\\(%s\\m\\)",
|
||||
spat, epat, mpat);
|
||||
if (flags & SP_START)
|
||||
options |= SEARCH_START;
|
||||
@@ -11072,10 +11054,13 @@ f_sqrt(typval_T *argvars, typval_T *rettv)
|
||||
f_str2float(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
char_u *p = skipwhite(get_tv_string(&argvars[0]));
|
||||
int isneg = (*p == '-');
|
||||
|
||||
if (*p == '+')
|
||||
if (*p == '+' || *p == '-')
|
||||
p = skipwhite(p + 1);
|
||||
(void)string2float(p, &rettv->vval.v_float);
|
||||
if (isneg)
|
||||
rettv->vval.v_float *= -1;
|
||||
rettv->v_type = VAR_FLOAT;
|
||||
}
|
||||
#endif
|
||||
@@ -11090,6 +11075,7 @@ f_str2nr(typval_T *argvars, typval_T *rettv)
|
||||
char_u *p;
|
||||
varnumber_T n;
|
||||
int what;
|
||||
int isneg;
|
||||
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
@@ -11102,7 +11088,8 @@ f_str2nr(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
|
||||
p = skipwhite(get_tv_string(&argvars[0]));
|
||||
if (*p == '+')
|
||||
isneg = (*p == '-');
|
||||
if (*p == '+' || *p == '-')
|
||||
p = skipwhite(p + 1);
|
||||
switch (base)
|
||||
{
|
||||
@@ -11112,7 +11099,11 @@ f_str2nr(typval_T *argvars, typval_T *rettv)
|
||||
default: what = 0;
|
||||
}
|
||||
vim_str2nr(p, NULL, NULL, what, &n, NULL, 0);
|
||||
rettv->vval.v_number = n;
|
||||
if (isneg)
|
||||
rettv->vval.v_number = -n;
|
||||
else
|
||||
rettv->vval.v_number = n;
|
||||
|
||||
}
|
||||
|
||||
#ifdef HAVE_STRFTIME
|
||||
@@ -11822,7 +11813,6 @@ get_cmd_output_as_rettv(
|
||||
char_u *res = NULL;
|
||||
char_u *p;
|
||||
char_u *infile = NULL;
|
||||
char_u buf[NUMBUFLEN];
|
||||
int err = FALSE;
|
||||
FILE *fd;
|
||||
list_T *list = NULL;
|
||||
@@ -11836,7 +11826,7 @@ get_cmd_output_as_rettv(
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
/*
|
||||
* Write the string to a temp file, to be used for input of the shell
|
||||
* Write the text to a temp file, to be used for input of the shell
|
||||
* command.
|
||||
*/
|
||||
if ((infile = vim_tempname('i', TRUE)) == NULL)
|
||||
@@ -11851,14 +11841,43 @@ get_cmd_output_as_rettv(
|
||||
EMSG2(_(e_notopen), infile);
|
||||
goto errret;
|
||||
}
|
||||
if (argvars[1].v_type == VAR_LIST)
|
||||
if (argvars[1].v_type == VAR_NUMBER)
|
||||
{
|
||||
linenr_T lnum;
|
||||
buf_T *buf;
|
||||
|
||||
buf = buflist_findnr(argvars[1].vval.v_number);
|
||||
if (buf == NULL)
|
||||
{
|
||||
EMSGN(_(e_nobufnr), argvars[1].vval.v_number);
|
||||
fclose(fd);
|
||||
goto errret;
|
||||
}
|
||||
|
||||
for (lnum = 1; lnum <= buf->b_ml.ml_line_count; lnum++)
|
||||
{
|
||||
for (p = ml_get_buf(buf, lnum, FALSE); *p != NUL; ++p)
|
||||
if (putc(*p == '\n' ? NUL : *p, fd) == EOF)
|
||||
{
|
||||
err = TRUE;
|
||||
break;
|
||||
}
|
||||
if (putc(NL, fd) == EOF)
|
||||
{
|
||||
err = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (argvars[1].v_type == VAR_LIST)
|
||||
{
|
||||
if (write_list(fd, argvars[1].vval.v_list, TRUE) == FAIL)
|
||||
err = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t len;
|
||||
size_t len;
|
||||
char_u buf[NUMBUFLEN];
|
||||
|
||||
p = get_tv_string_buf_chk(&argvars[1], buf);
|
||||
if (p == NULL)
|
||||
@@ -12722,7 +12741,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;
|
||||
}
|
||||
|
||||
+8
-3
@@ -1313,7 +1313,7 @@ do_filter(
|
||||
if (otmp != NULL)
|
||||
{
|
||||
if (readfile(otmp, NULL, line2, (linenr_T)0, (linenr_T)MAXLNUM,
|
||||
eap, READ_FILTER) == FAIL)
|
||||
eap, READ_FILTER) != OK)
|
||||
{
|
||||
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||
if (!aborting())
|
||||
@@ -3967,7 +3967,8 @@ do_ecmd(
|
||||
* <VN> We could instead free the synblock
|
||||
* and re-attach to buffer, perhaps.
|
||||
*/
|
||||
if (curwin->w_s == &(curwin->w_buffer->b_s))
|
||||
if (curwin->w_buffer != NULL
|
||||
&& curwin->w_s == &(curwin->w_buffer->b_s))
|
||||
curwin->w_s = &(buf->b_s);
|
||||
#endif
|
||||
curwin->w_buffer = buf;
|
||||
@@ -4577,7 +4578,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
|
||||
@@ -5262,6 +5263,10 @@ do_sub(exarg_T *eap)
|
||||
setmouse(); /* disable mouse in xterm */
|
||||
#endif
|
||||
curwin->w_cursor.col = regmatch.startpos[0].col;
|
||||
#ifdef FEAT_CURSORBIND
|
||||
if (curwin->w_p_crb)
|
||||
do_check_cursorbind();
|
||||
#endif
|
||||
|
||||
/* When 'cpoptions' contains "u" don't sync undo when
|
||||
* asking for confirmation. */
|
||||
|
||||
+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,
|
||||
|
||||
+18
-16
@@ -5164,24 +5164,10 @@ ex_language(exarg_T *eap)
|
||||
# if defined(FEAT_CMDL_COMPL) || defined(PROTO)
|
||||
|
||||
static char_u **locales = NULL; /* Array of all available locales */
|
||||
|
||||
# ifndef WIN32
|
||||
static int did_init_locales = FALSE;
|
||||
|
||||
static void init_locales(void);
|
||||
static char_u **find_locales(void);
|
||||
|
||||
/*
|
||||
* Lazy initialization of all available locales.
|
||||
*/
|
||||
static void
|
||||
init_locales(void)
|
||||
{
|
||||
if (!did_init_locales)
|
||||
{
|
||||
did_init_locales = TRUE;
|
||||
locales = find_locales();
|
||||
}
|
||||
}
|
||||
|
||||
/* Return an array of strings for all available locales + NULL for the
|
||||
* last element. Return NULL in case of error. */
|
||||
static char_u **
|
||||
@@ -5222,6 +5208,22 @@ find_locales(void)
|
||||
((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL;
|
||||
return (char_u **)locales_ga.ga_data;
|
||||
}
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Lazy initialization of all available locales.
|
||||
*/
|
||||
static void
|
||||
init_locales(void)
|
||||
{
|
||||
# ifndef WIN32
|
||||
if (!did_init_locales)
|
||||
{
|
||||
did_init_locales = TRUE;
|
||||
locales = find_locales();
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
# if defined(EXITFREE) || defined(PROTO)
|
||||
void
|
||||
|
||||
+81
-55
@@ -137,7 +137,7 @@ static int getargopt(exarg_T *eap);
|
||||
#endif
|
||||
|
||||
static int check_more(int, int);
|
||||
static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int to_other_file);
|
||||
static linenr_T get_address(exarg_T *, char_u **, int addr_type, int skip, int to_other_file, int address_count);
|
||||
static void get_flags(exarg_T *eap);
|
||||
#if !defined(FEAT_PERL) \
|
||||
|| !defined(FEAT_PYTHON) || !defined(FEAT_PYTHON3) \
|
||||
@@ -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
|
||||
@@ -794,8 +794,13 @@ do_cmdline(
|
||||
#endif
|
||||
|
||||
/* It's possible to create an endless loop with ":execute", catch that
|
||||
* here. The value of 200 allows nested function calls, ":source", etc. */
|
||||
if (call_depth == 200)
|
||||
* here. The value of 200 allows nested function calls, ":source", etc.
|
||||
* Allow 200 or 'maxfuncdepth', whatever is larger. */
|
||||
if (call_depth >= 200
|
||||
#ifdef FEAT_EVAL
|
||||
&& call_depth >= p_mfd
|
||||
#endif
|
||||
)
|
||||
{
|
||||
EMSG(_("E169: Command too recursive"));
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -1395,8 +1400,6 @@ do_cmdline(
|
||||
break;
|
||||
case ET_INTERRUPT:
|
||||
break;
|
||||
default:
|
||||
p = vim_strsave((char_u *)_(e_internal));
|
||||
}
|
||||
|
||||
saved_sourcing_name = sourcing_name;
|
||||
@@ -1800,6 +1803,7 @@ do_one_cmd(
|
||||
cmdmod_T save_cmdmod;
|
||||
int ni; /* set when Not Implemented */
|
||||
char_u *cmd;
|
||||
int address_count = 1;
|
||||
|
||||
vim_memset(&ea, 0, sizeof(ea));
|
||||
ea.line1 = 1;
|
||||
@@ -2024,7 +2028,7 @@ do_one_cmd(
|
||||
{
|
||||
#ifdef FEAT_WINDOWS
|
||||
long tabnr = get_address(&ea, &ea.cmd, ADDR_TABS,
|
||||
ea.skip, FALSE);
|
||||
ea.skip, FALSE, 1);
|
||||
if (tabnr == MAXLNUM)
|
||||
cmdmod.tab = tabpage_index(curtab) + 1;
|
||||
else
|
||||
@@ -2184,7 +2188,7 @@ do_one_cmd(
|
||||
}
|
||||
ea.cmd = skipwhite(ea.cmd);
|
||||
lnum = get_address(&ea, &ea.cmd, ea.addr_type, ea.skip,
|
||||
ea.addr_count == 0);
|
||||
ea.addr_count == 0, address_count++);
|
||||
if (ea.cmd == NULL) /* error detected */
|
||||
goto doend;
|
||||
if (lnum == MAXLNUM)
|
||||
@@ -2286,7 +2290,11 @@ do_one_cmd(
|
||||
if (*ea.cmd == ';')
|
||||
{
|
||||
if (!ea.skip)
|
||||
{
|
||||
curwin->w_cursor.lnum = ea.line2;
|
||||
/* don't leave the cursor on an illegal line */
|
||||
check_cursor_lnum();
|
||||
}
|
||||
}
|
||||
else if (*ea.cmd != ',')
|
||||
break;
|
||||
@@ -2302,9 +2310,6 @@ do_one_cmd(
|
||||
ea.addr_count = 0;
|
||||
}
|
||||
|
||||
/* Don't leave the cursor on an illegal line (caused by ';') */
|
||||
check_cursor_lnum();
|
||||
|
||||
/*
|
||||
* 5. Parse the command.
|
||||
*/
|
||||
@@ -3873,7 +3878,6 @@ set_one_cmd_context(
|
||||
case CMD_cfdo:
|
||||
case CMD_confirm:
|
||||
case CMD_debug:
|
||||
case CMD_filter:
|
||||
case CMD_folddoclosed:
|
||||
case CMD_folddoopen:
|
||||
case CMD_hide:
|
||||
@@ -3898,6 +3902,16 @@ set_one_cmd_context(
|
||||
case CMD_windo:
|
||||
return arg;
|
||||
|
||||
case CMD_filter:
|
||||
if (*arg != NUL)
|
||||
arg = skip_vimgrep_pat(arg, NULL, NULL);
|
||||
if (arg == NULL || *arg == NUL)
|
||||
{
|
||||
xp->xp_context = EXPAND_NOTHING;
|
||||
return NULL;
|
||||
}
|
||||
return skipwhite(arg);
|
||||
|
||||
#ifdef FEAT_CMDL_COMPL
|
||||
# ifdef FEAT_SEARCH_EXTRA
|
||||
case CMD_match:
|
||||
@@ -4102,6 +4116,12 @@ set_one_cmd_context(
|
||||
case CMD_echoerr:
|
||||
case CMD_call:
|
||||
case CMD_return:
|
||||
case CMD_cexpr:
|
||||
case CMD_caddexpr:
|
||||
case CMD_cgetexpr:
|
||||
case CMD_lexpr:
|
||||
case CMD_laddexpr:
|
||||
case CMD_lgetexpr:
|
||||
set_context_for_expression(xp, arg, ea.cmdidx);
|
||||
break;
|
||||
|
||||
@@ -4381,7 +4401,8 @@ get_address(
|
||||
char_u **ptr,
|
||||
int addr_type, /* flag: one of ADDR_LINES, ... */
|
||||
int skip, /* only skip the address, don't use it */
|
||||
int to_other_file) /* flag: may jump to other file */
|
||||
int to_other_file, /* flag: may jump to other file */
|
||||
int address_count UNUSED) /* 1 for first address, >1 after comma */
|
||||
{
|
||||
int c;
|
||||
int i;
|
||||
@@ -4657,10 +4678,20 @@ get_address(
|
||||
|| addr_type == ADDR_BUFFERS)
|
||||
lnum = compute_buffer_local_count(
|
||||
addr_type, lnum, (i == '-') ? -1 * n : n);
|
||||
else if (i == '-')
|
||||
lnum -= n;
|
||||
else
|
||||
lnum += n;
|
||||
{
|
||||
#ifdef FEAT_FOLDING
|
||||
/* Relative line addressing, need to adjust for folded lines
|
||||
* now, but only do it after the first address. */
|
||||
if (addr_type == ADDR_LINES && (i == '-' || i == '+')
|
||||
&& address_count >= 2)
|
||||
(void)hasFolding(lnum, NULL, &lnum);
|
||||
#endif
|
||||
if (i == '-')
|
||||
lnum -= n;
|
||||
else
|
||||
lnum += n;
|
||||
}
|
||||
}
|
||||
} while (*cmd == '/' || *cmd == '?');
|
||||
|
||||
@@ -5651,15 +5682,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 +7288,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 +7537,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;
|
||||
@@ -7589,40 +7621,34 @@ ex_all(exarg_T *eap)
|
||||
#endif /* FEAT_WINDOWS */
|
||||
|
||||
static void
|
||||
ex_hide(exarg_T *eap)
|
||||
ex_hide(exarg_T *eap UNUSED)
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -8856,7 +8882,7 @@ ex_read(exarg_T *eap)
|
||||
eap->line2, (linenr_T)0, (linenr_T)MAXLNUM, eap, 0);
|
||||
|
||||
}
|
||||
if (i == FAIL)
|
||||
if (i != OK)
|
||||
{
|
||||
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||
if (!aborting())
|
||||
@@ -9326,7 +9352,7 @@ ex_copymove(exarg_T *eap)
|
||||
{
|
||||
long n;
|
||||
|
||||
n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE);
|
||||
n = get_address(eap, &eap->arg, eap->addr_type, FALSE, FALSE, 1);
|
||||
if (eap->arg == NULL) /* error detected */
|
||||
{
|
||||
eap->nextcmd = NULL;
|
||||
@@ -10456,7 +10482,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()");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+18
-8
@@ -212,7 +212,8 @@ getcmdline(
|
||||
#endif
|
||||
expand_T xpc;
|
||||
long *b_im_ptr = NULL;
|
||||
#if defined(FEAT_WILDMENU) || defined(FEAT_EVAL) || defined(FEAT_SEARCH_EXTRA)
|
||||
#if defined(FEAT_WILDMENU) || defined(FEAT_EVAL) \
|
||||
|| defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CMDWIN)
|
||||
/* Everything that may work recursively should save and restore the
|
||||
* current command line in save_ccline. That includes update_screen(), a
|
||||
* custom status line may invoke ":normal". */
|
||||
@@ -1801,6 +1802,10 @@ getcmdline(
|
||||
goto cmdline_not_changed;
|
||||
#endif
|
||||
|
||||
case K_PS:
|
||||
bracketed_paste(PASTE_CMDLINE, FALSE, NULL);
|
||||
goto cmdline_changed;
|
||||
|
||||
default:
|
||||
#ifdef UNIX
|
||||
if (c == intr_char)
|
||||
@@ -2373,8 +2378,7 @@ getexmodeline(
|
||||
if (ga_grow(&line_ga, 40) == FAIL)
|
||||
break;
|
||||
|
||||
/* Get one character at a time. Don't use inchar(), it can't handle
|
||||
* special characters. */
|
||||
/* Get one character at a time. */
|
||||
prev_char = c1;
|
||||
c1 = vgetc();
|
||||
|
||||
@@ -2389,6 +2393,12 @@ getexmodeline(
|
||||
break;
|
||||
}
|
||||
|
||||
if (c1 == K_PS)
|
||||
{
|
||||
bracketed_paste(PASTE_EX, FALSE, &line_ga);
|
||||
goto redraw;
|
||||
}
|
||||
|
||||
if (!escaped)
|
||||
{
|
||||
/* CR typed means "enter", which is NL */
|
||||
@@ -4367,7 +4377,9 @@ addstar(
|
||||
|| context == EXPAND_OWNSYNTAX
|
||||
|| context == EXPAND_FILETYPE
|
||||
|| context == EXPAND_PACKADD
|
||||
|| (context == EXPAND_TAGS && fname[0] == '/'))
|
||||
|| ((context == EXPAND_TAGS_LISTFILES
|
||||
|| context == EXPAND_TAGS)
|
||||
&& fname[0] == '/'))
|
||||
retval = vim_strnsave(fname, len);
|
||||
else
|
||||
{
|
||||
@@ -6915,9 +6927,7 @@ ex_window(void)
|
||||
redraw_later(SOME_VALID);
|
||||
|
||||
/* Save the command line info, can be used recursively. */
|
||||
save_ccline = ccline;
|
||||
ccline.cmdbuff = NULL;
|
||||
ccline.cmdprompt = NULL;
|
||||
save_cmdline(&save_ccline);
|
||||
|
||||
/* No Ex mode here! */
|
||||
exmode_active = 0;
|
||||
@@ -6964,7 +6974,7 @@ ex_window(void)
|
||||
# endif
|
||||
|
||||
/* Restore the command line info. */
|
||||
ccline = save_ccline;
|
||||
restore_cmdline(&save_ccline);
|
||||
cmdwin_type = 0;
|
||||
|
||||
exmode_active = save_exmode;
|
||||
|
||||
+22
-7
@@ -210,7 +210,7 @@ filemess(
|
||||
* READ_KEEP_UNDO don't clear undo info or read it from a file
|
||||
* READ_FIFO read from fifo/socket instead of a file
|
||||
*
|
||||
* return FAIL for failure, OK otherwise
|
||||
* return FAIL for failure, NOTDONE for directory (failure), or OK
|
||||
*/
|
||||
int
|
||||
readfile(
|
||||
@@ -274,9 +274,9 @@ readfile(
|
||||
int msg_save = msg_scroll;
|
||||
linenr_T read_no_eol_lnum = 0; /* non-zero lnum when last line of
|
||||
* last read was missing the eol */
|
||||
int try_mac = (vim_strchr(p_ffs, 'm') != NULL);
|
||||
int try_dos = (vim_strchr(p_ffs, 'd') != NULL);
|
||||
int try_unix = (vim_strchr(p_ffs, 'x') != NULL);
|
||||
int try_mac;
|
||||
int try_dos;
|
||||
int try_unix;
|
||||
int file_rewind = FALSE;
|
||||
#ifdef FEAT_MBYTE
|
||||
int can_retry;
|
||||
@@ -450,13 +450,18 @@ readfile(
|
||||
# endif
|
||||
)
|
||||
{
|
||||
int retval = FAIL;
|
||||
|
||||
if (S_ISDIR(perm))
|
||||
{
|
||||
filemess(curbuf, fname, (char_u *)_("is a directory"), 0);
|
||||
retval = NOTDONE;
|
||||
}
|
||||
else
|
||||
filemess(curbuf, fname, (char_u *)_("is not a file"), 0);
|
||||
msg_end();
|
||||
msg_scroll = msg_save;
|
||||
return FAIL;
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
#if defined(MSWIN)
|
||||
@@ -733,6 +738,10 @@ readfile(
|
||||
curbuf->b_op_start.lnum = ((from == 0) ? 1 : from);
|
||||
curbuf->b_op_start.col = 0;
|
||||
|
||||
try_mac = (vim_strchr(p_ffs, 'm') != NULL);
|
||||
try_dos = (vim_strchr(p_ffs, 'd') != NULL);
|
||||
try_unix = (vim_strchr(p_ffs, 'x') != NULL);
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (!read_buffer)
|
||||
{
|
||||
@@ -764,6 +773,11 @@ readfile(
|
||||
else
|
||||
apply_autocmds_exarg(EVENT_FILEREADPRE, sfname, sfname,
|
||||
FALSE, NULL, eap);
|
||||
/* autocommands may have changed it */
|
||||
try_mac = (vim_strchr(p_ffs, 'm') != NULL);
|
||||
try_dos = (vim_strchr(p_ffs, 'd') != NULL);
|
||||
try_unix = (vim_strchr(p_ffs, 'x') != NULL);
|
||||
|
||||
if (msg_scrolled == n)
|
||||
msg_scroll = m;
|
||||
|
||||
@@ -2237,8 +2251,9 @@ rewind_retry:
|
||||
len = (colnr_T)(ptr - line_start + 1);
|
||||
if (fileformat == EOL_DOS)
|
||||
{
|
||||
if (ptr[-1] == CAR) /* remove CR */
|
||||
if (ptr > line_start && ptr[-1] == CAR)
|
||||
{
|
||||
/* remove CR before NL */
|
||||
ptr[-1] = NUL;
|
||||
--len;
|
||||
}
|
||||
@@ -7174,7 +7189,7 @@ buf_reload(buf_T *buf, int orig_mode)
|
||||
#endif
|
||||
if (readfile(buf->b_ffname, buf->b_fname, (linenr_T)0,
|
||||
(linenr_T)0,
|
||||
(linenr_T)MAXLNUM, &ea, flags) == FAIL)
|
||||
(linenr_T)MAXLNUM, &ea, flags) != OK)
|
||||
{
|
||||
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||
if (!aborting())
|
||||
|
||||
+21
-16
@@ -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)
|
||||
@@ -978,23 +978,22 @@ ins_typebuf(
|
||||
|
||||
addlen = (int)STRLEN(str);
|
||||
|
||||
/*
|
||||
* Easy case: there is room in front of typebuf.tb_buf[typebuf.tb_off]
|
||||
*/
|
||||
if (offset == 0 && addlen <= typebuf.tb_off)
|
||||
{
|
||||
/*
|
||||
* Easy case: there is room in front of typebuf.tb_buf[typebuf.tb_off]
|
||||
*/
|
||||
typebuf.tb_off -= addlen;
|
||||
mch_memmove(typebuf.tb_buf + typebuf.tb_off, str, (size_t)addlen);
|
||||
}
|
||||
|
||||
/*
|
||||
* Need to allocate a new buffer.
|
||||
* In typebuf.tb_buf there must always be room for 3 * MAXMAPLEN + 4
|
||||
* characters. We add some extra room to avoid having to allocate too
|
||||
* often.
|
||||
*/
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Need to allocate a new buffer.
|
||||
* In typebuf.tb_buf there must always be room for 3 * MAXMAPLEN + 4
|
||||
* characters. We add some extra room to avoid having to allocate too
|
||||
* often.
|
||||
*/
|
||||
newoff = MAXMAPLEN + 4;
|
||||
newlen = typebuf.tb_len + addlen + newoff + 4 * (MAXMAPLEN + 4);
|
||||
if (newlen < 0) /* string is getting too long */
|
||||
@@ -1321,11 +1320,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);
|
||||
}
|
||||
@@ -1818,6 +1817,12 @@ plain_vgetc(void)
|
||||
{
|
||||
c = safe_vgetc();
|
||||
} while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
|
||||
|
||||
if (c == K_PS)
|
||||
/* Only handle the first pasted character. Drop the rest, since we
|
||||
* don't know what to do with it. */
|
||||
c = bracketed_paste(PASTE_ONE_CHAR, FALSE, NULL);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -1907,7 +1912,7 @@ vungetc(int c)
|
||||
}
|
||||
|
||||
/*
|
||||
* get a character:
|
||||
* Get a character:
|
||||
* 1. from the stuffbuffer
|
||||
* This is used for abbreviated commands like "D" -> "d$".
|
||||
* Also used to redo a command for ".".
|
||||
@@ -2009,7 +2014,7 @@ vgetorpeek(int advance)
|
||||
{
|
||||
/* KeyTyped = FALSE; When the command that stuffed something
|
||||
* was typed, behave like the stuffed command was typed.
|
||||
* needed for CTRL-W CTRl-] to open a fold, for example. */
|
||||
* needed for CTRL-W CTRL-] to open a fold, for example. */
|
||||
KeyStuffed = TRUE;
|
||||
}
|
||||
if (typebuf.tb_no_abbr_cnt == 0)
|
||||
@@ -4868,7 +4873,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"));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user