mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
377 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cfc3ae8fd | |||
| 6656c5dc0c | |||
| b984b80cd8 | |||
| dec04ee38a | |||
| 49a613f84a | |||
| 238d43b328 | |||
| a038cb5eab | |||
| c212798333 | |||
| b4d5fbabc9 | |||
| 45d5f26d11 | |||
| 95c83c64be | |||
| 65f084749b | |||
| c168bd4bd3 | |||
| 414168d97f | |||
| e9f6fd27d0 | |||
| 8696bbaf52 | |||
| e09ba7bae5 | |||
| 7be9b50fd7 | |||
| 5b5adf5b9c | |||
| 9d18961323 | |||
| aba680a851 | |||
| 74121231be | |||
| 09d6c3818d | |||
| b4ea1914b8 | |||
| b15a5a564a | |||
| fe386641b0 | |||
| 3c518400d1 | |||
| 1a735d6c9b | |||
| 2dc9d26c14 | |||
| ba2929b6af | |||
| 99433291b1 | |||
| c5520eef7a | |||
| c6da01a5b8 | |||
| 75a60f74ce | |||
| 37b53270e1 | |||
| e5e5f79ac7 | |||
| 8ebe7eb25f | |||
| 618d6d277e | |||
| 4c0698e34d | |||
| e723c42836 | |||
| 2e49b6b20c | |||
| c35e4cb4fe | |||
| 46e2f361b4 | |||
| d0fef7608b | |||
| 1b9f9d315f | |||
| 28550b74bb | |||
| c3f81394ef | |||
| 6756c7037f | |||
| 3971905bac | |||
| 3d8d2c7ca5 | |||
| 8b53b79ea5 | |||
| 1bfdc07a49 | |||
| 6e32f615eb | |||
| 11aa62f8f9 | |||
| 178333783f | |||
| 9d954207e2 | |||
| ac46984df5 | |||
| e88fc7a574 | |||
| 9d654a8d8c | |||
| 595a40226e | |||
| d8d85bfb7d | |||
| 5e80de3f3e | |||
| 00ccf54630 | |||
| ae96b8d058 | |||
| 6a8691d483 | |||
| 2254a8ad0c | |||
| 4ec86ddd77 | |||
| 9f45ccd1bf | |||
| e2e69e4813 | |||
| 3653822546 | |||
| b31cf2bb0b | |||
| cf4b00c856 | |||
| da22b8cc8b | |||
| dada6d2a8e | |||
| ef68e4fa52 | |||
| 3346cc4ffb | |||
| 995e4afcfe | |||
| 9ac9dfa9e2 | |||
| 2c809b7c7d | |||
| 9e8dcf9d6f | |||
| da73253a0b | |||
| 3d593c2dc9 | |||
| 2db0ec4b2e | |||
| 41d097c6d1 | |||
| 5c6dbcb03f | |||
| 4e83961985 | |||
| 4bebc9a056 | |||
| a539f4f1ae | |||
| 1a333bc44a | |||
| dc5471d482 | |||
| 0f0f230012 | |||
| d41babef89 | |||
| 4ad3b2b588 | |||
| dde6034111 | |||
| f3af54eeb1 | |||
| 97a80e440a | |||
| b47a2597e6 | |||
| 7151602a88 | |||
| e561a7e2fa | |||
| 48340b62e8 | |||
| 97f65fafdb | |||
| c2d7e784f2 | |||
| 3c37a8e660 | |||
| 4db2554954 | |||
| 33f2e0c190 | |||
| 1dccf6351d | |||
| cbe6944956 | |||
| c572da5f67 | |||
| 7adf06f4e2 | |||
| 4ab7968aa9 | |||
| 8d9f0ef5c6 | |||
| e85928a324 | |||
| 02e177d3e8 | |||
| 0903d56f5c | |||
| 13ebb03e75 | |||
| dde81312b0 | |||
| a4f99f5a8b | |||
| e922460394 | |||
| 833e0e3c8c | |||
| e8ae05cc39 | |||
| 753289f9bf | |||
| f15c436680 | |||
| be0b72977f | |||
| f6d9f96b2d | |||
| a7a8d32ca8 | |||
| 33d66bd9fa | |||
| 6c4d12c527 | |||
| 285f243e50 | |||
| 77f7474d08 | |||
| 829aa64cf5 | |||
| 2ecbffb1ee | |||
| d2c45a1964 | |||
| ec0e07a324 | |||
| 6d0826dfbb | |||
| 5830232c02 | |||
| 5130947405 | |||
| 3f9a1ff141 | |||
| 740c433c59 | |||
| 0cbba82359 | |||
| b109bb4e12 | |||
| eef0531621 | |||
| 37819ed540 | |||
| 5983d50247 | |||
| b241208a13 | |||
| edbc0d46cf | |||
| 8efa026a25 | |||
| ce1c32780a | |||
| 43d09fb2b8 | |||
| 37b9b81997 | |||
| 0aed9a2e2e | |||
| d6a7b3e6bb | |||
| dc926dd0dd | |||
| 77ac9b5c62 | |||
| 93c92eff26 | |||
| fc8bec0be4 | |||
| 3eee06e7d4 | |||
| 683b796725 | |||
| d21f8b54b2 | |||
| 9aa1569128 | |||
| 98ebd2bbec | |||
| 4c45ccc606 | |||
| 8e539c51c3 | |||
| f66a2cda2c | |||
| ea5d6fadbb | |||
| 97bd5e6527 | |||
| 4da4a08258 | |||
| cfce71710b | |||
| 82de3c2c03 | |||
| bc906e445c | |||
| f5be7cd016 | |||
| a83e3962ac | |||
| 84ed4ad084 | |||
| ade59630c7 | |||
| f4ab9b32ba | |||
| 9e13aa7729 | |||
| 989a70c590 | |||
| 6fe15bbc87 | |||
| 47d91337bd | |||
| a9f8ee05f4 | |||
| 60104f183c | |||
| d21b16f3c0 | |||
| 3678393baa | |||
| 4fa1019f80 | |||
| 05fbfdcda4 | |||
| c08706135d | |||
| 51c23687a9 | |||
| 6bb18a878c | |||
| bce4f62d30 | |||
| 2bb7b6b0e4 | |||
| 304b64c9e6 | |||
| 6b93b0e838 | |||
| 9f0139a2a8 | |||
| 4f44b88684 | |||
| 69905d108b | |||
| e62780543f | |||
| 2438ae3d67 | |||
| dcaa61384c | |||
| 274a52fd58 | |||
| e0f314aa8d | |||
| 62426e168e | |||
| 5cc1f2c477 | |||
| 679653e59c | |||
| 55b6926450 | |||
| 3d9bdfebf1 | |||
| 893029ab20 | |||
| c977092053 | |||
| 3cd43ccccb | |||
| 589b1109c5 | |||
| 37c4583594 | |||
| 7eedd4398a | |||
| 0cd2a94a40 | |||
| 9698ad7201 | |||
| 8cad930a25 | |||
| a9f41842d0 | |||
| b81bc77ae7 | |||
| da43b61ddd | |||
| 8ed5400739 | |||
| 08d384ff3a | |||
| 89e06c807a | |||
| d9bc8a801a | |||
| 444fda2084 | |||
| ae33833850 | |||
| cf8d840ce9 | |||
| 1ccd8fff8a | |||
| 05aafed54b | |||
| 76ca1b4041 | |||
| ab6c8587ba | |||
| 2d33e90f81 | |||
| e41e3b41f9 | |||
| f1237f1814 | |||
| dd693ce28b | |||
| c810e7ea3d | |||
| 8ab3c1dc6b | |||
| 0a0217abfa | |||
| 1c8be134a1 | |||
| 82b9ca05f4 | |||
| 292d569935 | |||
| 36913eca21 | |||
| a7579ca1c7 | |||
| 03750a9e59 | |||
| 2a33867b14 | |||
| 7fadbf8325 | |||
| 75373f3808 | |||
| e20b3eba73 | |||
| 116a0f800c | |||
| 6d87e9e1c6 | |||
| f8d57a5049 | |||
| 33a43bee9c | |||
| f3402b1b7f | |||
| 1c864093f9 | |||
| 4535654246 | |||
| e16b00a158 | |||
| 02113ed4df | |||
| bae5a17a73 | |||
| cae92dc3d5 | |||
| 6d8197485d | |||
| 39d21e3c30 | |||
| 0af2d32c21 | |||
| 22aa23fd8c | |||
| aaa8a35fbd | |||
| 98fd66d311 | |||
| 086d535f77 | |||
| b9279e73ae | |||
| a9f028103f | |||
| cfcc022c54 | |||
| 35422f45ba | |||
| d53109886b | |||
| 8456ea8050 | |||
| 78712a7733 | |||
| 69198197fd | |||
| a060c7570b | |||
| 07c043af5f | |||
| 4a137b4586 | |||
| 6b7355a30d | |||
| 8e5eece8c5 | |||
| 321a0c859e | |||
| eb44a68b42 | |||
| 620d064b0b | |||
| 102dc7f891 | |||
| 5be8dd087f | |||
| e9c21aed62 | |||
| b4a6721a28 | |||
| 1b66c00aec | |||
| 69a76feda9 | |||
| 01efafad12 | |||
| 3c3a80dc59 | |||
| 2f3a90a3bd | |||
| 398ee7326b | |||
| 7c9aec4ac8 | |||
| d8dc179937 | |||
| 64a5e97991 | |||
| 90a265cca0 | |||
| e0ab979fa7 | |||
| 66cd19fef1 | |||
| 223896d3e9 | |||
| 5c838a3e71 | |||
| b6843a007d | |||
| 724ee2baf9 | |||
| fae4283542 | |||
| 94053a5125 | |||
| 0792048842 | |||
| f55e4c867f | |||
| 20e6cd07ba | |||
| 65cedb2074 | |||
| 2a4f06f370 | |||
| 9c8448472f | |||
| c2ce52c011 | |||
| 12d853fae1 | |||
| aaef1bae3c | |||
| 7da346035b | |||
| 983b3a5bc4 | |||
| 979e8c5346 | |||
| 912fa38673 | |||
| 662d938666 | |||
| 3633cf5201 | |||
| 392d1bfa5e | |||
| 43a100e446 | |||
| c9456cec0c | |||
| d09be32142 | |||
| b000e328ef | |||
| 12d93ee26d | |||
| 0e23e9c5e7 | |||
| 97870002d3 | |||
| 22aad2f880 | |||
| f144a3fb73 | |||
| 43c007ff22 | |||
| 0e7885e67d | |||
| 423802d1a2 | |||
| 68c4bdd53c | |||
| 5449f7c6fc | |||
| d0b6c6c54e | |||
| 30fe88677d | |||
| d507a685ad | |||
| 6e1ef28057 | |||
| f98246d484 | |||
| d1ee0043c0 | |||
| 91d348abfc | |||
| c6df10e5d3 | |||
| 70229f951f | |||
| 1e8340bbbf | |||
| 696d00f488 | |||
| 7841db9e55 | |||
| dcbfa33fa1 | |||
| 63ecddab6d | |||
| e46fc373cc | |||
| d85f271bf8 | |||
| d973bcb483 | |||
| 607985a95f | |||
| 9966b21a57 | |||
| 93723a4ef1 | |||
| 1a0f200500 | |||
| b41bf8e6b4 | |||
| fa228f716a | |||
| 96ad8c9ac1 | |||
| f86eea9f01 | |||
| 1f28b4c6a3 | |||
| 8bcc99b821 | |||
| 38ed1f5bea | |||
| d243a2a5ef | |||
| bb543088a5 | |||
| 59ee05b2f5 | |||
| 67883b4909 | |||
| a2c45a17c1 | |||
| 0e83f02d80 | |||
| d28cc3f55d | |||
| ab6eec3887 | |||
| cb25d18220 | |||
| 80c77243e2 | |||
| 293424c199 | |||
| 4cc93dc85a | |||
| a1b5b09281 | |||
| f0a521f4f7 | |||
| fc716d7256 | |||
| 8f14bb58cb | |||
| f80451e6fe | |||
| b2a76ec06b | |||
| 50badaddb4 |
@@ -1,4 +1,5 @@
|
||||
language: c
|
||||
dist: trusty
|
||||
|
||||
os:
|
||||
- osx
|
||||
|
||||
@@ -105,6 +105,7 @@ SRC_ALL = \
|
||||
src/testdir/Make_all.mak \
|
||||
src/testdir/*.in \
|
||||
src/testdir/*.py \
|
||||
src/testdir/lsan-suppress.txt \
|
||||
src/testdir/sautest/autoload/*.vim \
|
||||
src/testdir/runtest.vim \
|
||||
src/testdir/shared.vim \
|
||||
@@ -134,6 +135,7 @@ SRC_ALL = \
|
||||
src/testdir/bench*.in \
|
||||
src/testdir/bench*.vim \
|
||||
src/testdir/samples/*.txt \
|
||||
src/testdir/if_ver*.vim \
|
||||
src/proto.h \
|
||||
src/proto/arabic.pro \
|
||||
src/proto/blowfish.pro \
|
||||
@@ -200,7 +202,6 @@ SRC_ALL = \
|
||||
src/libvterm/.gitignore \
|
||||
src/libvterm/LICENSE \
|
||||
src/libvterm/Makefile \
|
||||
src/libvterm/Makefile.msc \
|
||||
src/libvterm/README \
|
||||
src/libvterm/tbl2inc_c.pl \
|
||||
src/libvterm/vterm.pc.in \
|
||||
@@ -637,6 +638,7 @@ RT_ALL = \
|
||||
runtime/pack/dist/opt/matchit/doc/tags \
|
||||
runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim \
|
||||
runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim \
|
||||
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim \
|
||||
|
||||
# runtime files for all distributions without CR-NL translation
|
||||
RT_ALL_BIN = \
|
||||
|
||||
+12
-1
@@ -191,13 +191,16 @@ Section "Vim executables and runtime files"
|
||||
File ${VIMSRC}\vimrun.exe
|
||||
File /oname=tee.exe ${VIMSRC}\teew32.exe
|
||||
File /oname=xxd.exe ${VIMSRC}\xxdw32.exe
|
||||
File ${VIMTOOLS}\diff.exe
|
||||
File ${VIMRT}\vimtutor.bat
|
||||
File ${VIMRT}\README.txt
|
||||
File ..\uninstal.txt
|
||||
File ${VIMRT}\*.vim
|
||||
File ${VIMRT}\rgb.txt
|
||||
|
||||
File ${VIMTOOLS}\diff.exe
|
||||
File ${VIMTOOLS}\winpty32.dll
|
||||
File ${VIMTOOLS}\winpty-agent.exe
|
||||
|
||||
SetOutPath $0\colors
|
||||
File ${VIMRT}\colors\*.*
|
||||
|
||||
@@ -216,6 +219,14 @@ Section "Vim executables and runtime files"
|
||||
|
||||
SetOutPath $0\macros
|
||||
File ${VIMRT}\macros\*.*
|
||||
SetOutPath $0\macros\hanoi
|
||||
File ${VIMRT}\macros\hanoi\*.*
|
||||
SetOutPath $0\macros\life
|
||||
File ${VIMRT}\macros\life\*.*
|
||||
SetOutPath $0\macros\maze
|
||||
File ${VIMRT}\macros\maze\*.*
|
||||
SetOutPath $0\macros\urm
|
||||
File ${VIMRT}\macros\urm\*.*
|
||||
|
||||
SetOutPath $0\pack\dist\opt\dvorak\dvorak
|
||||
File ${VIMRT}\pack\dist\opt\dvorak\dvorak\*.*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.0. Last change: 2017 Jul 22
|
||||
*channel.txt* For Vim version 8.0. Last change: 2017 Aug 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -427,8 +427,8 @@ 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. 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.
|
||||
Note that when there is no callback, messages 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)
|
||||
@@ -696,6 +696,10 @@ See |job_setoptions()| and |ch_setoptions()|.
|
||||
"block_write": number only for testing: pretend every other write to stdin
|
||||
will block
|
||||
|
||||
"env": dict environment variables for the new process
|
||||
"cwd": "/path/to/dir" current working directory for the new process;
|
||||
if the directory does not exist an error is given
|
||||
|
||||
|
||||
Writing to a buffer ~
|
||||
*out_io-buffer*
|
||||
@@ -731,10 +735,6 @@ The "out_msg" option can be used to specify whether a new buffer will have the
|
||||
first line set to "Reading from channel output...". The default is to add the
|
||||
message. "err_msg" does the same for channel error.
|
||||
|
||||
'modifiable' option off, or write to a buffer that has 'modifiable' off. That
|
||||
means that lines will be appended to the buffer, but the user can't easily
|
||||
change the buffer.
|
||||
|
||||
When an existing buffer is to be written where 'modifiable' is off and the
|
||||
"out_modifiable" or "err_modifiable" options is not zero, an error is given
|
||||
and the buffer will not be written to.
|
||||
|
||||
@@ -830,6 +830,11 @@ Also see |`=|.
|
||||
Note: these are typed literally, they are not special keys!
|
||||
<cword> is replaced with the word under the cursor (like |star|)
|
||||
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
|
||||
<cexpr> is replaced with the word under the cursor, including more
|
||||
to form a C expression. E.g., when the cursor is on "arg"
|
||||
of "ptr->arg" then the result is "ptr->arg"; when the
|
||||
cursor is on "]" of "list[idx]" then the result is
|
||||
"list[idx]". This is used for |v:beval_text|.
|
||||
<cfile> is replaced with the path name under the cursor (like what
|
||||
|gf| uses)
|
||||
<afile> When executing autocommands, is replaced with the file name
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 8.0. Last change: 2017 Jan 05
|
||||
*develop.txt* For Vim version 8.0. Last change: 2017 Jul 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -143,9 +143,10 @@ and its environment.
|
||||
|
||||
VIM IS... NOT *design-not*
|
||||
|
||||
- Vim is not a shell or an Operating System. You will not be able to run a
|
||||
shell inside Vim or use it to control a debugger. This should work the
|
||||
other way around: Use Vim as a component from a shell or in an IDE.
|
||||
- Vim is not a shell or an Operating System. It does provide a terminal
|
||||
window, in which you can run a shell or debugger. E.g. to be able to do
|
||||
this over an ssh connection. But if you don't need a text editor with that
|
||||
it is out of scope (use something like screen or tmux instead).
|
||||
A satirical way to say this: "Unlike Emacs, Vim does not attempt to include
|
||||
everything but the kitchen sink, but some people say that you can clean one
|
||||
with it. ;-)"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.0. Last change: 2017 Jul 16
|
||||
*editing.txt* For Vim version 8.0. Last change: 2017 Aug 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1109,6 +1109,7 @@ The names can be in upper- or lowercase.
|
||||
window in the current tab page the current tab page is
|
||||
closed |tab-page|.
|
||||
Triggers the |QuitPre| autocommand event.
|
||||
See |CTRL-W_q| for quitting another window.
|
||||
|
||||
:conf[irm] q[uit] Quit, but give prompt when changes have been made, or
|
||||
the last file in the argument list has not been
|
||||
@@ -1737,7 +1738,7 @@ There are three different types of searching:
|
||||
This searches the same directories, but in a different order.
|
||||
|
||||
Note that completion for ":find", ":sfind", and ":tabfind" commands do not
|
||||
currently work with 'path' items that contain a url or use the double star
|
||||
currently work with 'path' items that contain a URL or use the double star
|
||||
with depth limiter (/usr/**2) or upward search (;) notations.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
+340
-52
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Jul 22
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Sep 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1449,7 +1449,7 @@ v:beval_text The text under or after the mouse pointer. Usually a word as
|
||||
but a dot and "->" before the position is included. When on a
|
||||
']' the text before it is used, including the matching '[' and
|
||||
word before it. When on a Visual area within one line the
|
||||
highlighted text is used.
|
||||
highlighted text is used. Also see |<cexpr>|.
|
||||
Only valid while evaluating the 'balloonexpr' option.
|
||||
|
||||
*v:beval_winnr* *beval_winnr-variable*
|
||||
@@ -1815,7 +1815,7 @@ v:scrollstart String describing the script or function that caused the
|
||||
hit-enter prompt.
|
||||
|
||||
*v:servername* *servername-variable*
|
||||
v:servername The resulting registered |x11-clientserver| name if any.
|
||||
v:servername The resulting registered |client-server-name| if any.
|
||||
Read-only.
|
||||
|
||||
|
||||
@@ -1902,6 +1902,26 @@ v:termresponse The escape sequence returned by the terminal for the |t_RV|
|
||||
always 95 or bigger). Pc is always zero.
|
||||
{only when compiled with |+termresponse| feature}
|
||||
|
||||
*v:termblinkresp*
|
||||
v:termblinkresp The escape sequence returned by the terminal for the |t_RC|
|
||||
termcap entry. This is used to find out whether the terminal
|
||||
cursor is blinking. This is used by |term_getcursor()|.
|
||||
|
||||
*v:termstyleresp*
|
||||
v:termstyleresp The escape sequence returned by the terminal for the |t_RS|
|
||||
termcap entry. This is used to find out what the shape of the
|
||||
cursor is. This is used by |term_getcursor()|.
|
||||
|
||||
*v:termrgbresp*
|
||||
v:termrgbresp The escape sequence returned by the terminal for the |t_RB|
|
||||
termcap entry. This is used to find out what the terminal
|
||||
background color is, see 'background'.
|
||||
|
||||
*v:termu7resp*
|
||||
v:termu7resp The escape sequence returned by the terminal for the |t_u7|
|
||||
termcap entry. This is used to find out what the terminal
|
||||
does with ambiguous width characters, see 'ambiwidth'.
|
||||
|
||||
*v:testing* *testing-variable*
|
||||
v:testing Must be set before using `test_garbagecollect_now()`.
|
||||
Also, when set certain error messages won't be shown for 2
|
||||
@@ -2296,6 +2316,9 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]])
|
||||
server2client({clientid}, {string})
|
||||
Number send reply string
|
||||
serverlist() String get a list of available servers
|
||||
setbufline( {expr}, {lnum}, {line})
|
||||
Number set line {lnum} to {line} in buffer
|
||||
{expr}
|
||||
setbufvar({expr}, {varname}, {val})
|
||||
none set {varname} in buffer {expr} to {val}
|
||||
setcharsearch({dict}) Dict set character search from {dict}
|
||||
@@ -2369,15 +2392,25 @@ tagfiles() List tags files used
|
||||
tan({expr}) Float tangent of {expr}
|
||||
tanh({expr}) Float hyperbolic tangent of {expr}
|
||||
tempname() String name for a temporary file
|
||||
term_getsize() Dict get the size of a terminal
|
||||
term_open() Job open a terminal window and run a job
|
||||
term_scrape() List inspect terminal screen
|
||||
term_sendkeys() Number send keystrokes to a terminal
|
||||
term_setsize() Number set the size of a terminal
|
||||
term_wait() Number wait for screen to be updated
|
||||
term_getaltscreen({buf}) Number get the alternate screen flag
|
||||
term_getattr({attr}, {what}) Number get the value of attribute {what}
|
||||
term_getcursor({buf}) List get the cursor position of a terminal
|
||||
term_getjob({buf}) Job get the job associated with a terminal
|
||||
term_getline({buf}, {row}) String get a line of text from a terminal
|
||||
term_getscrolled({buf}) Number get the scroll count of a terminal
|
||||
term_getsize({buf}) List get the size of a terminal
|
||||
term_getstatus({buf}) String get the status of a terminal
|
||||
term_gettitle({buf}) String get the title of a terminal
|
||||
term_getttty({buf}, [{input}]) String get the tty name of a terminal
|
||||
term_list() List get the list of terminal buffers
|
||||
term_scrape({buf}, {row}) List get row of a terminal screen
|
||||
term_sendkeys({buf}, {keys}) none send keystrokes to a terminal
|
||||
term_start({cmd}, {options}) Job open a terminal window and run a job
|
||||
term_wait({buf} [, {time}]) Number wait for screen to be updated
|
||||
test_alloc_fail({id}, {countdown}, {repeat})
|
||||
none make memory allocation fail
|
||||
test_autochdir() none enable 'autochdir' during startup
|
||||
test_feedinput() none add key sequence to input buffer
|
||||
test_garbagecollect_now() none free memory right now for testing
|
||||
test_ignore_error({expr}) none ignore a specific error
|
||||
test_null_channel() Channel null value for testing
|
||||
@@ -2977,6 +3010,11 @@ ch_logfile({fname} [, {mode}]) *ch_logfile()*
|
||||
The file is flushed after every message, on Unix you can use
|
||||
"tail -f" to see what is going on in real time.
|
||||
|
||||
This function is not available in the |sandbox|.
|
||||
NOTE: the channel communication is stored in the file, be
|
||||
aware that this may contain confidential and privacy sensitive
|
||||
information, e.g. a password you type in a terminal window.
|
||||
|
||||
|
||||
ch_open({address} [, {options}]) *ch_open()*
|
||||
Open a channel to {address}. See |channel|.
|
||||
@@ -3255,11 +3293,16 @@ cosh({expr}) *cosh()*
|
||||
|
||||
count({comp}, {expr} [, {ic} [, {start}]]) *count()*
|
||||
Return the number of times an item with value {expr} appears
|
||||
in |List| or |Dictionary| {comp}.
|
||||
in |String|, |List| or |Dictionary| {comp}.
|
||||
|
||||
If {start} is given then start with the item with this index.
|
||||
{start} can only be used with a |List|.
|
||||
|
||||
When {ic} is given and it's |TRUE| then case is ignored.
|
||||
|
||||
When {comp} is a string then the number of not overlapping
|
||||
occurrences of {expr} is returned.
|
||||
|
||||
|
||||
*cscope_connection()*
|
||||
cscope_connection([{num} , {dbpath} [, {prepend}]])
|
||||
@@ -3424,7 +3467,7 @@ escape({string}, {chars}) *escape()*
|
||||
:echo escape('c:\program files\vim', ' \')
|
||||
< results in: >
|
||||
c:\\program\ files\\vim
|
||||
< Also see |shellescape()|.
|
||||
< Also see |shellescape()| and |fnameescape()|.
|
||||
|
||||
*eval()*
|
||||
eval({string}) Evaluate {string} and return the result. Especially useful to
|
||||
@@ -3844,7 +3887,7 @@ float2nr({expr}) *float2nr()*
|
||||
When the value of {expr} is out of range for a |Number| the
|
||||
result is truncated to 0x7fffffff or -0x7fffffff (or when
|
||||
64-bit Number support is enabled, 0x7fffffffffffffff or
|
||||
-0x7fffffffffffffff. NaN results in -0x80000000 (or when
|
||||
-0x7fffffffffffffff). NaN results in -0x80000000 (or when
|
||||
64-bit Number support is enabled, -0x8000000000000000).
|
||||
Examples: >
|
||||
echo float2nr(3.95)
|
||||
@@ -4356,6 +4399,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
highlight highlight groups
|
||||
history :history suboptions
|
||||
locale locale names (as output of locale -a)
|
||||
mapclear buffer argument
|
||||
mapping mapping name
|
||||
menu menus
|
||||
messages |:messages| suboptions
|
||||
@@ -4592,23 +4636,39 @@ getqflist([{what}]) *getqflist()*
|
||||
returns only the items listed in {what} as a dictionary. The
|
||||
following string items are supported in {what}:
|
||||
context get the context stored with |setqflist()|
|
||||
efm errorformat to use when parsing "lines". If
|
||||
not present, then the 'erroformat' option
|
||||
value is used.
|
||||
id get information for the quickfix list with
|
||||
|quickfix-ID|; zero means the id for the
|
||||
current list or the list specifed by "nr"
|
||||
items quickfix list entries
|
||||
lines use 'errorformat' to extract items from a list
|
||||
of lines and return the resulting entries.
|
||||
Only a |List| type is accepted. The current
|
||||
quickfix list is not modified.
|
||||
nr get information for this quickfix list; zero
|
||||
means the current quickfix list and '$' means
|
||||
means the current quickfix list and "$" means
|
||||
the last quickfix list
|
||||
title get the list title
|
||||
winid get the |window-ID| (if opened)
|
||||
all all of the above quickfix properties
|
||||
Non-string items in {what} are ignored.
|
||||
If "nr" is not present then the current quickfix list is used.
|
||||
To get the number of lists in the quickfix stack, set 'nr' to
|
||||
'$' in {what}. The 'nr' value in the returned dictionary
|
||||
If both "nr" and a non-zero "id" are specified, then the list
|
||||
specified by "id" is used.
|
||||
To get the number of lists in the quickfix stack, set "nr" to
|
||||
"$" in {what}. The "nr" value in the returned dictionary
|
||||
contains the quickfix stack size.
|
||||
When "lines" is specified, all the other items except "efm"
|
||||
are ignored. The returned dictionary contains the entry
|
||||
"items" with the list of entries.
|
||||
In case of error processing {what}, an empty dictionary is
|
||||
returned.
|
||||
|
||||
The returned dictionary contains the following entries:
|
||||
context context information stored with |setqflist()|
|
||||
id quickfix list ID |quickfix-ID|
|
||||
items quickfix list entries
|
||||
nr quickfix list number
|
||||
title quickfix list title text
|
||||
@@ -4617,6 +4677,7 @@ getqflist([{what}]) *getqflist()*
|
||||
Examples: >
|
||||
:echo getqflist({'all': 1})
|
||||
:echo getqflist({'nr': 2, 'title': 1})
|
||||
:echo getqflist({'lines' : ["F1:10:L10"]})
|
||||
<
|
||||
|
||||
getreg([{regname} [, 1 [, {list}]]]) *getreg()*
|
||||
@@ -4727,6 +4788,8 @@ getwininfo([{winid}]) *getwininfo()*
|
||||
{only with the +quickfix feature}
|
||||
quickfix 1 if quickfix or location list window
|
||||
{only with the +quickfix feature}
|
||||
terminal 1 if a terminal window
|
||||
{only with the +terminal feature}
|
||||
tabnr tab page number
|
||||
variables a reference to the dictionary with
|
||||
window-local variables
|
||||
@@ -5181,6 +5244,9 @@ job_info({job}) *job_info()*
|
||||
Returns a Dictionary with information about {job}:
|
||||
"status" what |job_status()| returns
|
||||
"channel" what |job_getchannel()| returns
|
||||
"process" process ID
|
||||
"tty_in" terminal input name, empty when none
|
||||
"tty_out" terminal output name, empty when none
|
||||
"exitval" only valid when "status" is "dead"
|
||||
"exit_cb" function to be called on exit
|
||||
"stoponexit" |job-stoponexit|
|
||||
@@ -5193,6 +5259,7 @@ job_setoptions({job}, {options}) *job_setoptions()*
|
||||
job_start({command} [, {options}]) *job_start()*
|
||||
Start a job and return a Job object. Unlike |system()| and
|
||||
|:!cmd| this does not wait for the job to finish.
|
||||
To start a job in a terminal window see |term_start()|.
|
||||
|
||||
{command} can be a String. This works best on MS-Windows. On
|
||||
Unix it is split up in white-separated parts to be passed to
|
||||
@@ -5931,7 +5998,7 @@ mode([expr]) Return a string that indicates the current mode.
|
||||
a non-empty String (|non-zero-arg|), then the full mode is
|
||||
returned, otherwise only the first letter is returned.
|
||||
|
||||
n Normal
|
||||
n Normal, Terminal-Normal
|
||||
no Operator-pending
|
||||
v Visual by character
|
||||
V Visual by line
|
||||
@@ -5953,6 +6020,7 @@ mode([expr]) Return a string that indicates the current mode.
|
||||
rm The -- more -- prompt
|
||||
r? A |:confirm| query of some sort
|
||||
! Shell or external command is executing
|
||||
t Terminal-Job mode: keys go to the job
|
||||
This is useful in the 'statusline' option or when used
|
||||
with |remote_expr()| In most other places it always returns
|
||||
"c" or "n".
|
||||
@@ -6798,6 +6866,19 @@ serverlist() *serverlist()*
|
||||
Example: >
|
||||
:echo serverlist()
|
||||
<
|
||||
setbufline({expr}, {lnum}, {text}) *setbufline()*
|
||||
Set line {lnum} to {text} in buffer {expr}. To insert
|
||||
lines use |append()|.
|
||||
|
||||
For the use of {expr}, see |bufname()| above.
|
||||
|
||||
{lnum} is used like with |setline()|.
|
||||
This works like |setline()| for the specified buffer.
|
||||
On success 0 is returned, on failure 1 is returned.
|
||||
|
||||
If {expr} is not a valid buffer or {lnum} is not valid, an
|
||||
error message is given.
|
||||
|
||||
setbufvar({expr}, {varname}, {val}) *setbufvar()*
|
||||
Set option or local variable {varname} in buffer {expr} to
|
||||
{val}.
|
||||
@@ -6866,13 +6947,19 @@ setfperm({fname}, {mode}) *setfperm()* *chmod*
|
||||
|
||||
setline({lnum}, {text}) *setline()*
|
||||
Set line {lnum} of the current buffer to {text}. To insert
|
||||
lines use |append()|.
|
||||
lines use |append()|. To set lines in another buffer use
|
||||
|setbufline()|.
|
||||
|
||||
{lnum} is used like with |getline()|.
|
||||
When {lnum} is just below the last line the {text} will be
|
||||
added as a new line.
|
||||
|
||||
If this succeeds, 0 is returned. If this fails (most likely
|
||||
because {lnum} is invalid) 1 is returned. Example: >
|
||||
because {lnum} is invalid) 1 is returned.
|
||||
|
||||
Example: >
|
||||
:call setline(5, strftime("%c"))
|
||||
|
||||
< When {text} is a |List| then line {lnum} and following lines
|
||||
will be set to the items in the list. Example: >
|
||||
:call setline(5, ['aaa', 'bbb', 'ccc'])
|
||||
@@ -6880,6 +6967,7 @@ setline({lnum}, {text}) *setline()*
|
||||
:for [n, l] in [[5, 'aaa'], [6, 'bbb'], [7, 'ccc']]
|
||||
: call setline(n, l)
|
||||
:endfor
|
||||
|
||||
< Note: The '[ and '] marks are not set.
|
||||
|
||||
setloclist({nr}, {list}[, {action}[, {what}]]) *setloclist()*
|
||||
@@ -6951,10 +7039,12 @@ setpos({expr}, {list})
|
||||
|winrestview()|.
|
||||
|
||||
setqflist({list} [, {action}[, {what}]]) *setqflist()*
|
||||
Create or replace or add to the quickfix list using the items
|
||||
in {list}. Each item in {list} is a dictionary.
|
||||
Non-dictionary items in {list} are ignored. Each dictionary
|
||||
item can contain the following entries:
|
||||
Create or replace or add to the quickfix list.
|
||||
|
||||
When {what} is not present, use the items in {list}. Each
|
||||
item must be a dictionary. Non-dictionary items in {list} are
|
||||
ignored. Each dictionary item can contain the following
|
||||
entries:
|
||||
|
||||
bufnr buffer number; must be the number of a valid
|
||||
buffer
|
||||
@@ -6999,27 +7089,41 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
|
||||
freed.
|
||||
|
||||
If {action} is not present or is set to ' ', then a new list
|
||||
is created.
|
||||
is created. The new quickfix list is added after the current
|
||||
quickfix list in the stack and all the following lists are
|
||||
freed. To add a new quickfix list at the end of the stack,
|
||||
set "nr" in {what} to "$".
|
||||
|
||||
If the optional {what} dictionary argument is supplied, then
|
||||
only the items listed in {what} are set. The first {list}
|
||||
argument is ignored. The following items can be specified in
|
||||
{what}:
|
||||
context any Vim type can be stored as a context
|
||||
efm errorformat to use when parsing text from
|
||||
"lines". If this is not present, then the
|
||||
'errorformat' option value is used.
|
||||
id quickfix list identifier |quickfix-ID|
|
||||
items list of quickfix entries. Same as the {list}
|
||||
argument.
|
||||
lines use 'errorformat' to parse a list of lines and
|
||||
add the resulting entries to the quickfix list
|
||||
{nr} or {id}. Only a |List| value is supported.
|
||||
nr list number in the quickfix stack; zero
|
||||
means the current quickfix list and '$' means
|
||||
means the current quickfix list and "$" means
|
||||
the last quickfix list
|
||||
title quickfix list title text
|
||||
Unsupported keys in {what} are ignored.
|
||||
If the "nr" item is not present, then the current quickfix list
|
||||
is modified. When creating a new quickfix list, "nr" can be
|
||||
set to a value one greater than the quickfix stack size.
|
||||
When modifying a quickfix list, to guarantee that the correct
|
||||
list is modified, "id" should be used instead of "nr" to
|
||||
specify the list.
|
||||
|
||||
Examples: >
|
||||
:call setqflist([], 'r', {'title': 'My search'})
|
||||
:call setqflist([], 'r', {'nr': 2, 'title': 'Errors'})
|
||||
:call setqflist([], 'r', {'title': 'My search'})
|
||||
:call setqflist([], 'r', {'nr': 2, 'title': 'Errors'})
|
||||
:call setqflist([], 'a', {'id':myid, 'lines':["F1:10:L10"]})
|
||||
<
|
||||
Returns zero for success, -1 for failure.
|
||||
|
||||
@@ -7061,16 +7165,17 @@ setreg({regname}, {value} [, {options}])
|
||||
:call setreg('a', "1\n2\n3", 'b5')
|
||||
|
||||
< This example shows using the functions to save and restore a
|
||||
register (note: you may not reliably restore register value
|
||||
without using the third argument to |getreg()| as without it
|
||||
newlines are represented as newlines AND Nul bytes are
|
||||
represented as newlines as well, see |NL-used-for-Nul|). >
|
||||
register: >
|
||||
:let var_a = getreg('a', 1, 1)
|
||||
:let var_amode = getregtype('a')
|
||||
....
|
||||
:call setreg('a', var_a, var_amode)
|
||||
< Note: you may not reliably restore register value
|
||||
without using the third argument to |getreg()| as without it
|
||||
newlines are represented as newlines AND Nul bytes are
|
||||
represented as newlines as well, see |NL-used-for-Nul|.
|
||||
|
||||
< You can also change the type of a register by appending
|
||||
You can also change the type of a register by appending
|
||||
nothing: >
|
||||
:call setreg('a', '', 'al')
|
||||
|
||||
@@ -7650,6 +7755,7 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
|
||||
"standout" "1" if standout
|
||||
"underline" "1" if underlined
|
||||
"undercurl" "1" if undercurled
|
||||
"strike" "1" if strikethrough
|
||||
|
||||
Example (echoes the color of the syntax item under the
|
||||
cursor): >
|
||||
@@ -7679,12 +7785,12 @@ synconcealed({lnum}, {col}) *synconcealed()*
|
||||
the text is "123456" and both "23" and "45" are concealed
|
||||
and replace by the character "X", then:
|
||||
call returns ~
|
||||
synconcealed(lnum, 1) [0, '', 0]
|
||||
synconcealed(lnum, 2) [1, 'X', 1]
|
||||
synconcealed(lnum, 3) [1, 'X', 1]
|
||||
synconcealed(lnum, 4) [1, 'X', 2]
|
||||
synconcealed(lnum, 5) [1, 'X', 2]
|
||||
synconcealed(lnum, 6) [0, '', 0]
|
||||
synconcealed(lnum, 1) [0, '', 0]
|
||||
synconcealed(lnum, 2) [1, 'X', 1]
|
||||
synconcealed(lnum, 3) [1, 'X', 1]
|
||||
synconcealed(lnum, 4) [1, 'X', 2]
|
||||
synconcealed(lnum, 5) [1, 'X', 2]
|
||||
synconcealed(lnum, 6) [0, '', 0]
|
||||
|
||||
|
||||
synstack({lnum}, {col}) *synstack()*
|
||||
@@ -7893,23 +7999,199 @@ tempname() *tempname()* *temp-file-name*
|
||||
For MS-Windows forward slashes are used when the 'shellslash'
|
||||
option is set or when 'shellcmdflag' starts with '-'.
|
||||
|
||||
term_getsize() *term_getsize()*
|
||||
Get the size of a terminal. NOT IMPLEMENTED YET
|
||||
term_getaltscreen({buf}) *term_getaltscreen()*
|
||||
Returns 1 if the terminal of {buf} is using the alternate
|
||||
screen.
|
||||
{buf} is used as with |term_getsize()|.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_open() *term_open()*
|
||||
Open a terminal window and run a job. NOT IMPLEMENTED YET
|
||||
term_getattr({attr}, {what}) *term_getattr()*
|
||||
Given {attr}, a value returned by term_scrape() in the "attr"
|
||||
item, return whether {what} is on. {what} can be one of:
|
||||
bold
|
||||
italic
|
||||
underline
|
||||
strike
|
||||
reverse
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_scrape() *term_scrape()*
|
||||
Inspect terminal screen. NOT IMPLEMENTED YET
|
||||
term_getcursor({buf}) *term_getcursor()*
|
||||
Get the cursor position of terminal {buf}. Returns a list with
|
||||
two numbers and a dictionary: [rows, cols, dict].
|
||||
|
||||
term_sendkeys() *term_sendkeys()*
|
||||
Send keystrokes to a terminal. NOT IMPLEMENTED YET
|
||||
"rows" and "cols" are one based, the first screen cell is row
|
||||
1, column 1. This is the cursor position of the terminal
|
||||
itself, not of the Vim window.
|
||||
|
||||
term_setsize() *term_setsize()*
|
||||
Set the size of a terminal. NOT IMPLEMENTED YET
|
||||
"dict" can have these members:
|
||||
"visible" one when the cursor is visible, zero when it
|
||||
is hidden.
|
||||
"blink" one when the cursor is visible, zero when it
|
||||
is hidden.
|
||||
"shape" 1 for a block cursor, 2 for underline and 3
|
||||
for a vertical bar.
|
||||
|
||||
term_wait() *term_wait()*
|
||||
Wait for screen to be updated. NOT IMPLEMENTED YET
|
||||
{buf} must be the buffer number of a terminal window. If the
|
||||
buffer does not exist or is not a terminal window, an empty
|
||||
list is returned.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_getjob({buf}) *term_getjob()*
|
||||
Get the Job associated with terminal window {buf}.
|
||||
{buf} is used as with |term_getsize()|.
|
||||
Returns |v:null| when there is no job.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_getline({buf}, {row}) *term_getline()*
|
||||
Get a line of text from the terminal window of {buf}.
|
||||
{buf} is used as with |term_getsize()|.
|
||||
|
||||
The first line has {row} one. When {row} is "." the cursor
|
||||
line is used. When {row} is invalid an empty string is
|
||||
returned.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_getscrolled({buf}) *term_getscrolled()*
|
||||
Return the number of lines that scrolled to above the top of
|
||||
terminal {buf}. This is the offset between the row number
|
||||
used for |term_getline()| and |getline()|, so that: >
|
||||
term_getline(buf, N)
|
||||
< is equal to: >
|
||||
`getline(N + term_getscrolled(buf))
|
||||
< (if that line exists).
|
||||
|
||||
{buf} is used as with |term_getsize()|.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_getsize({buf}) *term_getsize()*
|
||||
Get the size of terminal {buf}. Returns a list with two
|
||||
numbers: [rows, cols]. This is the size of the terminal, not
|
||||
the window containing the terminal.
|
||||
|
||||
{buf} must be the buffer number of a terminal window. Use an
|
||||
empty string for the current buffer. If the buffer does not
|
||||
exist or is not a terminal window, an empty list is returned.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_getstatus({buf}) *term_getstatus()*
|
||||
Get the status of terminal {buf}. This returns a comma
|
||||
separated list of these items:
|
||||
running job is running
|
||||
finished job has finished
|
||||
normal in Terminal-Normal mode
|
||||
One of "running" or "finished" is always present.
|
||||
|
||||
{buf} must be the buffer number of a terminal window. If the
|
||||
buffer does not exist or is not a terminal window, an empty
|
||||
string is returned.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_gettitle({buf}) *term_gettitle()*
|
||||
Get the title of terminal {buf}. This is the title that the
|
||||
job in the terminal has set.
|
||||
|
||||
{buf} must be the buffer number of a terminal window. If the
|
||||
buffer does not exist or is not a terminal window, an empty
|
||||
string is returned.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_gettty({buf} [, {input}]) *term_gettty()*
|
||||
Get the name of the controlling terminal associated with
|
||||
terminal window {buf}. {buf} is used as with |term_getsize()|.
|
||||
|
||||
When {input} is omitted or 0, return the name for writing
|
||||
(stdout). When {input} is 1 return the name for reading
|
||||
(stdin). On UNIX, both return same name.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_list() *term_list()*
|
||||
Return a list with the buffer numbers of all buffers for
|
||||
terminal windows.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_scrape({buf}, {row}) *term_scrape()*
|
||||
Get the contents of {row} of terminal screen of {buf}.
|
||||
For {buf} see |term_getsize()|.
|
||||
|
||||
The first line has {row} one. When {row} is "." the cursor
|
||||
line is used. When {row} is invalid an empty string is
|
||||
returned.
|
||||
|
||||
Return a List containing a Dict for each screen cell:
|
||||
"chars" character(s) at the cell
|
||||
"fg" foreground color as #rrggbb
|
||||
"bg" background color as #rrggbb
|
||||
"attr" attributes of the cell, use |term_getattr()|
|
||||
to get the individual flags
|
||||
"width" cell width: 1 or 2
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_sendkeys({buf}, {keys}) *term_sendkeys()*
|
||||
Send keystrokes {keys} to terminal {buf}.
|
||||
{buf} is used as with |term_getsize()|.
|
||||
|
||||
{keys} are translated as key sequences. For example, "\<c-x>"
|
||||
means the character CTRL-X.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_start({cmd}, {options}) *term_start()*
|
||||
Open a terminal window and run {cmd} in it.
|
||||
|
||||
Returns the buffer number of the terminal window. If {cmd}
|
||||
cannot be executed the window does open and shows an error
|
||||
message.
|
||||
If opening the window fails zero is returned.
|
||||
|
||||
{options} are similar to what is used for |job_start()|, see
|
||||
|job-options|. However, not all options can be used. These
|
||||
are supported:
|
||||
all timeout options
|
||||
"stoponexit"
|
||||
"callback", "out_cb", "err_cb"
|
||||
"exit_cb", "close_cb"
|
||||
"in_io", "in_top", "in_bot", "in_name", "in_buf"
|
||||
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
|
||||
"err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
|
||||
However, at least one of stdin, stdout or stderr must be
|
||||
connected to the terminal. When I/O is connected to the
|
||||
terminal then the callback function for that part is not used.
|
||||
|
||||
There are extra options:
|
||||
"term_name" name to use for the buffer name, instead
|
||||
of the command name.
|
||||
"term_rows" vertical size to use for the terminal,
|
||||
instead of using 'termsize'
|
||||
"term_cols" horizontal size to use for the terminal,
|
||||
instead of using 'termsize'
|
||||
"vertical" split the window vertically
|
||||
"curwin" use the current window, do not split the
|
||||
window; fails if the current buffer
|
||||
cannot be |abandon|ed
|
||||
"hidden" do not open a window
|
||||
"term_finish" What to do when the job is finished:
|
||||
"close": close any windows
|
||||
"open": open window if needed
|
||||
Note that "open" can be interruptive.
|
||||
See |term++close| and |term++open|.
|
||||
"term_opencmd" command to use for opening the window when
|
||||
"open" is used for "term_finish"; must
|
||||
have "%d" where the buffer number goes,
|
||||
e.g. "10split|buffer %d"; when not
|
||||
specified "botright sbuf %d" is used
|
||||
"eof_chars" Text to send after all buffer lines were
|
||||
written to the terminal. When not set
|
||||
CTRL-D is used on MS-Windows. For Python
|
||||
use CTRL-Z or "exit()". For a shell use
|
||||
"exit". A CR is always added.
|
||||
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
term_wait({buf} [, {time}]) *term_wait()*
|
||||
Wait for pending updates of {buf} to be handled.
|
||||
{buf} is used as with |term_getsize()|.
|
||||
{time} is how long to wait for updates to arrive in msec. If
|
||||
not set then 10 msec will be used.
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()*
|
||||
This is for testing: If the memory allocation with {id} is
|
||||
@@ -7921,6 +8203,11 @@ test_autochdir() *test_autochdir()*
|
||||
Set a flag to enable the effect of 'autochdir' before Vim
|
||||
startup has finished.
|
||||
|
||||
test_feedinput({string}) *test_feedinput()*
|
||||
Characters in {string} are queued for processing as if they
|
||||
were typed by the user. This uses a low level input buffer.
|
||||
This function works only when with |+unix| or GUI is running.
|
||||
|
||||
test_garbagecollect_now() *test_garbagecollect_now()*
|
||||
Like garbagecollect(), but executed right away. This must
|
||||
only be called directly to avoid any structure to exist
|
||||
@@ -7976,7 +8263,7 @@ test_override({name}, {val}) *test_override()*
|
||||
in a way that the test doesn't work properly.
|
||||
When using: >
|
||||
call test_override('starting', 1)
|
||||
< The value of "starting" is saved. It is restored by: >
|
||||
< The value of "starting" is saved. It is restored by: >
|
||||
call test_override('starting', 0)
|
||||
|
||||
test_settime({expr}) *test_settime()*
|
||||
@@ -8278,7 +8565,7 @@ win_getid([{win} [, {tab}]]) *win_getid()*
|
||||
Get the |window-ID| for the specified window.
|
||||
When {win} is missing use the current window.
|
||||
With {win} this is the window number. The top window has
|
||||
number 1.
|
||||
number 1. Use `win_getid(winnr())` for the current window.
|
||||
Without {tab} use the current tab, otherwise the tab with
|
||||
number {tab}. The first tab has number one.
|
||||
Return zero if the window cannot be found.
|
||||
@@ -8425,7 +8712,7 @@ wordcount() *wordcount()*
|
||||
(only in Visual mode)
|
||||
visual_chars Number of chars visually selected
|
||||
(only in Visual mode)
|
||||
visual_words Number of chars visually selected
|
||||
visual_words Number of words visually selected
|
||||
(only in Visual mode)
|
||||
|
||||
|
||||
@@ -8637,6 +8924,7 @@ tag_any_white Compiled with support for any white characters in tags
|
||||
files |tag-any-white|.
|
||||
tcl Compiled with Tcl interface.
|
||||
termguicolors Compiled with true color in terminal support.
|
||||
terminal Compiled with |terminal| support.
|
||||
terminfo Compiled with terminfo instead of termcap.
|
||||
termresponse Compiled with support for |t_RV| and |v:termresponse|.
|
||||
textobjects Compiled with support for |text-objects|.
|
||||
|
||||
@@ -116,13 +116,13 @@ g:rustfmt_options~
|
||||
|
||||
*g:rust_playpen_url*
|
||||
g:rust_playpen_url~
|
||||
Set this option to override the url for the playpen to use: >
|
||||
Set this option to override the URL for the playpen to use: >
|
||||
let g:rust_playpen_url = 'https://play.rust-lang.org/'
|
||||
<
|
||||
|
||||
*g:rust_shortener_url*
|
||||
g:rust_shortener_url~
|
||||
Set this option to override the url for the url shortener: >
|
||||
Set this option to override the URL for the URL shortener: >
|
||||
let g:rust_shortener_url = 'https://is.gd/'
|
||||
<
|
||||
|
||||
@@ -199,7 +199,7 @@ COMMANDS *rust-commands*
|
||||
|g:rust_playpen_url| is the base URL to the playpen, by default
|
||||
"https://play.rust-lang.org/".
|
||||
|
||||
|g:rust_shortener_url| is the base url for the shorterner, by
|
||||
|g:rust_shortener_url| is the base URL for the shorterner, by
|
||||
default "https://is.gd/"
|
||||
|
||||
:RustFmt *:RustFmt*
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 8.0. Last change: 2017 Jul 15
|
||||
*gui.txt* For Vim version 8.0. Last change: 2017 Aug 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -67,7 +67,7 @@ When the GUI starts up initializations are carried out, in this order:
|
||||
executed as an Ex command.
|
||||
- If the user gvimrc file exists, it is sourced. The name of this file is
|
||||
normally "$HOME/.gvimrc". You can check this with ":version".
|
||||
- For Win32, when $HOME is not set, "$VIM\_gvimrc" is used.
|
||||
- For Win32, $HOME is set by Vim if needed, see |$HOME-windows|.
|
||||
- When a "_gvimrc" file is not found, ".gvimrc" is tried too. And vice
|
||||
versa.
|
||||
The name of the first file found is stored in $MYGVIMRC, unless it was
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 8.0. Last change: 2017 Jun 27
|
||||
*gui_x11.txt* For Vim version 8.0. Last change: 2017 Jul 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -682,7 +682,7 @@ Of these three, Vim uses PRIMARY when reading and writing the "* register
|
||||
register. Vim does not access the SECONDARY selection.
|
||||
|
||||
Examples: (assuming the default option values)
|
||||
- Select an URL in Visual mode in Vim. Go to your browser and click the
|
||||
- Select a URL in Visual mode in Vim. Go to your browser and click the
|
||||
middle mouse button in the URL text field. The selected text will be
|
||||
inserted (hopefully!). Note: in Firefox you can set the
|
||||
middlemouse.contentLoadURL preference to true in about:config, then the
|
||||
|
||||
@@ -894,10 +894,10 @@ On Ubuntu you will want to install these packages for Python 2:
|
||||
python-dev
|
||||
For Python 3:
|
||||
python3
|
||||
pytyon3-dev
|
||||
python3-dev
|
||||
For Python 3.6:
|
||||
python3.6
|
||||
pytyon3.6-dev
|
||||
python3.6-dev
|
||||
|
||||
If you have more than one version of Python 3, you need to link python3 to the
|
||||
one you prefer, before running configure.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.0. Last change: 2017 Jul 16
|
||||
*index.txt* For Vim version 8.0. Last change: 2017 Aug 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -528,8 +528,10 @@ tag command action in Normal mode ~
|
||||
|CTRL-W_CTRL-]| CTRL-W CTRL-] same as "CTRL-W ]"
|
||||
|CTRL-W_CTRL-^| CTRL-W CTRL-^ same as "CTRL-W ^"
|
||||
|CTRL-W_CTRL-_| CTRL-W CTRL-_ same as "CTRL-W _"
|
||||
|CTRL-W_quote| CTRL-W " terminal window: paste register
|
||||
|CTRL-W_+| CTRL-W + increase current window height N lines
|
||||
|CTRL-W_-| CTRL-W - decrease current window height N lines
|
||||
|CTRL-W_.| CTRL-W . terminal window: type CTRL-W
|
||||
|CTRL-W_:| CTRL-W : same as |:|, edit a command line
|
||||
|CTRL-W_<| CTRL-W < decrease current window width N columns
|
||||
|CTRL-W_=| CTRL-W = make all windows the same height & width
|
||||
@@ -538,6 +540,7 @@ tag command action in Normal mode ~
|
||||
|CTRL-W_J| CTRL-W J move current window to the very bottom
|
||||
|CTRL-W_K| CTRL-W K move current window to the very top
|
||||
|CTRL-W_L| CTRL-W L move current window to the far right
|
||||
|CTRL-W_N| CTRL-W N terminal window: go to Terminal Normal mode
|
||||
|CTRL-W_P| CTRL-W P go to preview window
|
||||
|CTRL-W_R| CTRL-W R rotate windows upwards N times
|
||||
|CTRL-W_S| CTRL-W S same as "CTRL-W s"
|
||||
|
||||
+17
-4
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 8.0. Last change: 2017 Jul 17
|
||||
*intro.txt* For Vim version 8.0. Last change: 2017 Aug 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -530,7 +530,7 @@ examples and use them directly. Or type them literally, including the '<' and
|
||||
==============================================================================
|
||||
5. Modes, introduction *vim-modes-intro* *vim-modes*
|
||||
|
||||
Vim has six BASIC modes:
|
||||
Vim has seven BASIC modes:
|
||||
|
||||
*Normal* *Normal-mode* *command-mode*
|
||||
Normal mode In Normal mode you can enter all the normal editor
|
||||
@@ -566,7 +566,12 @@ Ex mode Like Command-line mode, but after entering a command
|
||||
you remain in Ex mode. Very limited editing of the
|
||||
command line. |Ex-mode|
|
||||
|
||||
There are six ADDITIONAL modes. These are variants of the BASIC modes:
|
||||
Terminal-Job mode Interacting with a job in a terminal window. Typed
|
||||
keys go to the job and the job output is displayed in
|
||||
the terminal window. See |terminal| about how to
|
||||
switch to other modes.
|
||||
|
||||
There are seven ADDITIONAL modes. These are variants of the BASIC modes:
|
||||
|
||||
*Operator-pending* *Operator-pending-mode*
|
||||
Operator-pending mode This is like Normal mode, but after an operator
|
||||
@@ -592,6 +597,10 @@ Insert Normal mode Entered when CTRL-O given in Insert mode. This is
|
||||
If the 'showmode' option is on "-- (insert) --" is
|
||||
shown at the bottom of the window.
|
||||
|
||||
Terminal-Normal mode Using Normal mode in a terminal window. Making
|
||||
changes is impossible. Use an insert command, such as
|
||||
"a" or "i", to return to Terminal-Job mode.
|
||||
|
||||
Insert Visual mode Entered when starting a Visual selection from Insert
|
||||
mode, e.g., by using CTRL-O and then "v", "V" or
|
||||
CTRL-V. When the Visual selection ends, Vim returns
|
||||
@@ -666,6 +675,8 @@ Normal mode from any other mode. This can be used to make sure Vim is in
|
||||
Normal mode, without causing a beep like <Esc> would. However, this does not
|
||||
work in Ex mode. When used after a command that takes an argument, such as
|
||||
|f| or |m|, the timeout set with 'ttimeoutlen' applies.
|
||||
When focus is in a terminal window, CTRL-\ CTRL-N goes to Normal mode for only
|
||||
one command, see |t_CTRL-\_CTRL-N|.
|
||||
|
||||
*CTRL-\_CTRL-G* *i_CTRL-\_CTRL-G* *c_CTRL-\_CTRL-G* *v_CTRL-\_CTRL-G*
|
||||
The command CTRL-\ CTRL-G or <C-\><C-G> can be used to go to Insert mode when
|
||||
@@ -828,10 +839,12 @@ by Vim. {Vi: not ok}
|
||||
==============================================================================
|
||||
8. Definitions *definitions*
|
||||
|
||||
buffer Contains lines of text, usually read from a file.
|
||||
screen The whole area that Vim uses to work in. This can be
|
||||
a terminal emulator window. Also called "the Vim
|
||||
window".
|
||||
window A view on a buffer.
|
||||
window A view on a buffer. There can be multiple windows for
|
||||
one buffer.
|
||||
|
||||
A screen contains one or more windows, separated by status lines and with the
|
||||
command line at the bottom.
|
||||
|
||||
@@ -1279,6 +1279,7 @@ completion can be enabled:
|
||||
-complete=highlight highlight groups
|
||||
-complete=history :history suboptions
|
||||
-complete=locale locale names (as output of locale -a)
|
||||
-complete=mapclear buffer argument
|
||||
-complete=mapping mapping name
|
||||
-complete=menu menus
|
||||
-complete=messages |:messages| suboptions
|
||||
@@ -1414,6 +1415,8 @@ The valid escape sequences are
|
||||
<line1> The starting line of the command range.
|
||||
*<line2>*
|
||||
<line2> The final line of the command range.
|
||||
*<range>*
|
||||
<range> The number of items in the command range: 0, 1 or 2
|
||||
*<count>*
|
||||
<count> Any count supplied (as described for the '-range'
|
||||
and '-count' attributes).
|
||||
|
||||
@@ -832,6 +832,9 @@ Use the RPM or port for your system.
|
||||
|
||||
Currently, GUI Vim supports three styles, |OverTheSpot|, |OffTheSpot| and
|
||||
|Root|.
|
||||
When compiled with |+GUI_GTK| feature, GUI Vim supports two styles,
|
||||
|OnTheSpot| and |OverTheSpot|. You can select the style with the 'imstyle'
|
||||
option.
|
||||
|
||||
*. on-the-spot *OnTheSpot*
|
||||
Preedit Area and Status Area are performed by the client application in
|
||||
|
||||
+51
-22
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Jul 23
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Aug 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -417,12 +417,13 @@ On Unix systems the form "${HOME}" can be used too. The name between {} can
|
||||
contain non-id characters then. Note that if you want to use this for the
|
||||
"gf" command, you need to add the '{' and '}' characters to 'isfname'.
|
||||
|
||||
On MS-Windows, if $HOME is not defined as an environment variable, then
|
||||
at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH.
|
||||
|
||||
NOTE: expanding environment variables and "~/" is only done with the ":set"
|
||||
command, not when assigning a value to an option with ":let".
|
||||
|
||||
*$HOME-windows*
|
||||
On MS-Windows, if $HOME is not defined as an environment variable, then
|
||||
at runtime Vim will set it to the expansion of $HOMEDRIVE$HOMEPATH.
|
||||
|
||||
|
||||
Note the maximum length of an expanded option is limited. How much depends on
|
||||
the system, mostly it is something like 256 or 1024 characters.
|
||||
@@ -894,6 +895,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark
|
||||
background. Otherwise the default is "light".
|
||||
|
||||
The |:terminal| command and the |term_start()| function use the
|
||||
'background' value to decide whether the terminal window will start
|
||||
with a white or black background.
|
||||
|
||||
Normally this option would be set in the .vimrc file. Possibly
|
||||
depending on the terminal name. Example: >
|
||||
:if &term == "pcterm"
|
||||
@@ -4163,7 +4168,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
L:SpellLocal,-:Conceal,+:Pmenu,=:PmenuSel,
|
||||
x:PmenuSbar,X:PmenuThumb,*:TabLine,
|
||||
#:TabLineSel,_:TabLineFill,!:CursorColumn,
|
||||
.:CursorLine,o:ColorColumn,q:QuickFixLine")
|
||||
.:CursorLine,o:ColorColumn,q:QuickFixLine,
|
||||
z:StatusLineTerm,Z:StatusLineTermNC")
|
||||
global
|
||||
{not in Vi}
|
||||
This option can be used to set highlighting mode for various
|
||||
@@ -4222,6 +4228,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
s standout (termcap entry "so" and "se")
|
||||
u underline (termcap entry "us" and "ue")
|
||||
c undercurl (termcap entry "Cs" and "Ce")
|
||||
t strikethrough (termcap entry "Ts" and "Te")
|
||||
n no highlighting
|
||||
- no highlighting
|
||||
: use a highlight group
|
||||
@@ -4474,6 +4481,23 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
<
|
||||
NOTE: This function is invoked very often. Keep it fast.
|
||||
|
||||
*'imstyle'* *'imst'*
|
||||
'imstyle' 'imst' number (default 1)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with |+xim| and
|
||||
|+GUI_GTK|}
|
||||
This option specifies the input style of Input Method.
|
||||
Set to zero if you want to use on-the-spot style.
|
||||
Set to one if you want to use over-the-spot style.
|
||||
See: |xim-input-style|
|
||||
|
||||
For a long time on-the-spot sytle had been used in GTK version of vim,
|
||||
however, it is known that it causes troubles when using mappings,
|
||||
|single-repeat|, etc. Therefore over-the-spot style becomes the
|
||||
default now. This should work fine for most people, however if you
|
||||
have any problem with it, try using on-the-spot style.
|
||||
|
||||
*'include'* *'inc'*
|
||||
'include' 'inc' string (default "^\s*#\s*include")
|
||||
global or local to buffer |global-local|
|
||||
@@ -5884,18 +5908,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< Replace the ';' with a ':' or whatever separator is used. Note that
|
||||
this doesn't work when $INCL contains a comma or white space.
|
||||
|
||||
*'perldll'*
|
||||
'perldll' string (default depends on the build)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+perl/dyn|
|
||||
feature}
|
||||
Specifies the name of the Perl shared library. The default is
|
||||
DYNAMIC_PERL_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.
|
||||
|
||||
*'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'*
|
||||
'preserveindent' 'pi' boolean (default off)
|
||||
local to buffer
|
||||
@@ -7949,14 +7961,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
*'termkey'* *'tk'*
|
||||
'termkey' 'tk' string (default "CTRL-W")
|
||||
'termkey' 'tk' string (default "")
|
||||
local to window
|
||||
{not in Vi}
|
||||
The key that precedes a Vim command in a terminal window. Other keys
|
||||
The key that starts a CTRL-W command in a terminal window. Other keys
|
||||
are sent to the job running in the window.
|
||||
The string must be one key stroke but can be multiple bytes.
|
||||
NOT IMPLEMENTED YET
|
||||
|
||||
The <> notation can be used, e.g.: >
|
||||
:set termkey=<C-L>
|
||||
< The string must be one key stroke but can be multiple bytes.
|
||||
When not set CTRL-W is used, so that CTRL-W : gets you to the command
|
||||
line. If 'termkey' is set to CTRL-L then CTRL-L : gets you to the
|
||||
command line.
|
||||
|
||||
*'termsize'* *'tms'*
|
||||
'termsize' 'tms' string (default "")
|
||||
@@ -9034,6 +9049,20 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
large number, it will cause errors when opening more than a few
|
||||
windows. A value of 0 to 12 is reasonable.
|
||||
|
||||
*'winptydll'*
|
||||
'winptydll' string (default "winpty32.dll" or "winpty64.dll")
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |terminal|
|
||||
feature on MS-Windows}
|
||||
Specifies the name of the winpty shared library, used for the
|
||||
|:terminal| command. The default depends on whether was build as a
|
||||
32-bit or 64-bit executable. If not found, "winpty.dll" is tried as
|
||||
a fallback.
|
||||
Environment variables are expanded |:set_env|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'winwidth'* *'wiw'* *E592*
|
||||
'winwidth' 'wiw' number (default 20)
|
||||
global
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_getscript.txt* For Vim version 7.0. Last change: 2013 Nov 29
|
||||
*pi_getscript.txt* For Vim version 7.0. Last change: 2017 Aug 01
|
||||
>
|
||||
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell
|
||||
<
|
||||
@@ -389,7 +389,7 @@ v36 Apr 22, 2013 : * (glts) suggested use of plugin/**/*.vim instead of
|
||||
plugin/*.vim in globpath() call.
|
||||
* (Andy Wokula) got warning message when setting
|
||||
g:loaded_getscriptPlugin
|
||||
v35 Apr 07, 2012 : * (MengHuan Yu) pointed out that the script url has
|
||||
v35 Apr 07, 2012 : * (MengHuan Yu) pointed out that the script URL has
|
||||
changed (somewhat). However, it doesn't work, and
|
||||
the original one does (under Linux). I'll make it
|
||||
yet-another-option.
|
||||
|
||||
@@ -44,6 +44,18 @@ From inside Vim an easy way to run a command and handle the output is with the
|
||||
The 'errorformat' option should be set to match the error messages from your
|
||||
compiler (see |errorformat| below).
|
||||
|
||||
*quickfix-ID*
|
||||
Each quickfix list has a unique identifier called the quickfix ID and this
|
||||
number will not change within a Vim session. The getqflist() function can be
|
||||
used to get the identifier assigned to a list.
|
||||
|
||||
*quickfix-ID*
|
||||
Each quickfix list has a unique identifier called the quickfix ID and this
|
||||
number will not change within a Vim session. The getqflist() function can be
|
||||
used to get the identifier assigned to a list. There is also a quickfix list
|
||||
number which may change whenever more than ten lists are added to a quickfix
|
||||
stack.
|
||||
|
||||
*location-list* *E776*
|
||||
A location list is a window-local quickfix list. You get one after commands
|
||||
like `:lvimgrep`, `:lgrep`, `:lhelpgrep`, `:lmake`, etc., which create a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 8.0. Last change: 2017 Jul 15
|
||||
*quickref.txt* For Vim version 8.0. Last change: 2017 Aug 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -964,6 +964,7 @@ Short explanation of each option: *option-list*
|
||||
'viewdir' 'vdir' directory where to store files with :mkview
|
||||
'viewoptions' 'vop' specifies what to save for :mkview
|
||||
'viminfo' 'vi' use .viminfo file upon startup and exiting
|
||||
'viminfofile' 'vif' file name used for the viminfo file
|
||||
'virtualedit' 've' when to use virtual editing
|
||||
'visualbell' 'vb' use visual bell instead of beeping
|
||||
'warn' warn for shell command when buffer was changed
|
||||
@@ -983,6 +984,7 @@ Short explanation of each option: *option-list*
|
||||
'winfixwidth' 'wfw' keep window width when opening/closing windows
|
||||
'winminheight' 'wmh' minimum number of lines for any window
|
||||
'winminwidth' 'wmw' minimal number of columns for any window
|
||||
'winptydll' name of the winpty dynamic library
|
||||
'winwidth' 'wiw' minimal number of columns for current window
|
||||
'wrap' long lines wrap and continue on the next line
|
||||
'wrapmargin' 'wm' chars from the right where wrapping starts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*remote.txt* For Vim version 8.0. Last change: 2017 Mar 18
|
||||
*remote.txt* For Vim version 8.0. Last change: 2017 Aug 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -100,7 +100,7 @@ Tell the remote server "BLA" to write all files and exit: >
|
||||
vim --servername BLA --remote-send '<C-\><C-N>:wqa<CR>'
|
||||
|
||||
|
||||
SERVER NAME
|
||||
SERVER NAME *client-server-name*
|
||||
|
||||
By default Vim will try to register the name under which it was invoked (gvim,
|
||||
egvim ...). This can be overridden with the --servername argument. If the
|
||||
|
||||
+18
-4
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2017 Jul 14
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2017 Aug 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2138,6 +2138,16 @@ set "msql_minlines" to the value you desire. Example: >
|
||||
:let msql_minlines = 200
|
||||
|
||||
|
||||
N1QL *n1ql.vim* *ft-n1ql-syntax*
|
||||
|
||||
N1QL is a SQL-like declarative language for manipulating JSON documents in
|
||||
Couchbase Server databases.
|
||||
|
||||
Vim syntax highlights N1QL statements, keywords, operators, types, comments,
|
||||
and special values. Vim ignores syntactical elements specific to SQL or its
|
||||
many dialects, like COLUMN or CHAR, that don't exist in N1QL.
|
||||
|
||||
|
||||
NCF *ncf.vim* *ft-ncf-syntax*
|
||||
|
||||
There is one option for NCF syntax highlighting.
|
||||
@@ -4689,23 +4699,26 @@ the same syntax file on all terminals, and use the optimal highlighting.
|
||||
|
||||
*bold* *underline* *undercurl*
|
||||
*inverse* *italic* *standout*
|
||||
*nocombine* *strikethrough*
|
||||
term={attr-list} *attr-list* *highlight-term* *E418*
|
||||
attr-list is a comma separated list (without spaces) of the
|
||||
following items (in any order):
|
||||
bold
|
||||
underline
|
||||
undercurl not always available
|
||||
strikethrough not always available
|
||||
reverse
|
||||
inverse same as reverse
|
||||
italic
|
||||
standout
|
||||
nocombine override attributes instead of combining them
|
||||
NONE no attributes used (used to reset it)
|
||||
|
||||
Note that "bold" can be used here and by using a bold font. They
|
||||
have the same effect.
|
||||
"undercurl" is a curly underline. When "undercurl" is not possible
|
||||
then "underline" is used. In general "undercurl" is only available in
|
||||
the GUI. The color is set with |highlight-guisp|.
|
||||
then "underline" is used. In general "undercurl" and "strikethrough"
|
||||
is only available in the GUI. The color is set with |highlight-guisp|.
|
||||
|
||||
start={term-list} *highlight-start* *E422*
|
||||
stop={term-list} *term-list* *highlight-stop*
|
||||
@@ -4870,7 +4883,8 @@ guifg={color-name} *highlight-guifg*
|
||||
guibg={color-name} *highlight-guibg*
|
||||
guisp={color-name} *highlight-guisp*
|
||||
These give the foreground (guifg), background (guibg) and special
|
||||
(guisp) color to use in the GUI. "guisp" is used for undercurl.
|
||||
(guisp) color to use in the GUI. "guisp" is used for undercurl and
|
||||
strikethrough.
|
||||
There are a few special names:
|
||||
NONE no color (transparent)
|
||||
bg use normal background color
|
||||
|
||||
+39
-3
@@ -764,7 +764,6 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'path' options.txt /*'path'*
|
||||
'pdev' options.txt /*'pdev'*
|
||||
'penc' options.txt /*'penc'*
|
||||
'perldll' options.txt /*'perldll'*
|
||||
'pex' options.txt /*'pex'*
|
||||
'pexpr' options.txt /*'pexpr'*
|
||||
'pfn' options.txt /*'pfn'*
|
||||
@@ -955,6 +954,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
't_Co' term.txt /*'t_Co'*
|
||||
't_Cs' term.txt /*'t_Cs'*
|
||||
't_DL' term.txt /*'t_DL'*
|
||||
't_EC' term.txt /*'t_EC'*
|
||||
't_EI' term.txt /*'t_EI'*
|
||||
't_F1' term.txt /*'t_F1'*
|
||||
't_F2' term.txt /*'t_F2'*
|
||||
@@ -992,11 +992,15 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
't_PS' term.txt /*'t_PS'*
|
||||
't_RB' term.txt /*'t_RB'*
|
||||
't_RI' term.txt /*'t_RI'*
|
||||
't_RS' term.txt /*'t_RS'*
|
||||
't_RV' term.txt /*'t_RV'*
|
||||
't_SC' term.txt /*'t_SC'*
|
||||
't_SH' term.txt /*'t_SH'*
|
||||
't_SI' term.txt /*'t_SI'*
|
||||
't_SR' term.txt /*'t_SR'*
|
||||
't_Sb' term.txt /*'t_Sb'*
|
||||
't_Sf' term.txt /*'t_Sf'*
|
||||
't_VS' term.txt /*'t_VS'*
|
||||
't_WP' term.txt /*'t_WP'*
|
||||
't_WS' term.txt /*'t_WS'*
|
||||
't_ZH' term.txt /*'t_ZH'*
|
||||
@@ -1189,6 +1193,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'winheight' options.txt /*'winheight'*
|
||||
'winminheight' options.txt /*'winminheight'*
|
||||
'winminwidth' options.txt /*'winminwidth'*
|
||||
'winptydll' options.txt /*'winptydll'*
|
||||
'winwidth' options.txt /*'winwidth'*
|
||||
'wiv' options.txt /*'wiv'*
|
||||
'wiw' options.txt /*'wiw'*
|
||||
@@ -1339,6 +1344,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
+tcl various.txt /*+tcl*
|
||||
+tcl/dyn various.txt /*+tcl\/dyn*
|
||||
+termguicolors various.txt /*+termguicolors*
|
||||
+terminal various.txt /*+terminal*
|
||||
+terminfo various.txt /*+terminfo*
|
||||
+termresponse various.txt /*+termresponse*
|
||||
+textobjects various.txt /*+textobjects*
|
||||
@@ -3583,6 +3589,7 @@ CTRL-V-alternative gui_w32.txt /*CTRL-V-alternative*
|
||||
CTRL-W index.txt /*CTRL-W*
|
||||
CTRL-W_+ windows.txt /*CTRL-W_+*
|
||||
CTRL-W_- windows.txt /*CTRL-W_-*
|
||||
CTRL-W_. terminal.txt /*CTRL-W_.*
|
||||
CTRL-W_: windows.txt /*CTRL-W_:*
|
||||
CTRL-W_< windows.txt /*CTRL-W_<*
|
||||
CTRL-W_<BS> windows.txt /*CTRL-W_<BS>*
|
||||
@@ -3622,6 +3629,7 @@ CTRL-W_H windows.txt /*CTRL-W_H*
|
||||
CTRL-W_J windows.txt /*CTRL-W_J*
|
||||
CTRL-W_K windows.txt /*CTRL-W_K*
|
||||
CTRL-W_L windows.txt /*CTRL-W_L*
|
||||
CTRL-W_N terminal.txt /*CTRL-W_N*
|
||||
CTRL-W_P windows.txt /*CTRL-W_P*
|
||||
CTRL-W_R windows.txt /*CTRL-W_R*
|
||||
CTRL-W_S windows.txt /*CTRL-W_S*
|
||||
@@ -3649,6 +3657,7 @@ CTRL-W_n windows.txt /*CTRL-W_n*
|
||||
CTRL-W_o windows.txt /*CTRL-W_o*
|
||||
CTRL-W_p windows.txt /*CTRL-W_p*
|
||||
CTRL-W_q windows.txt /*CTRL-W_q*
|
||||
CTRL-W_quote terminal.txt /*CTRL-W_quote*
|
||||
CTRL-W_r windows.txt /*CTRL-W_r*
|
||||
CTRL-W_s windows.txt /*CTRL-W_s*
|
||||
CTRL-W_t windows.txt /*CTRL-W_t*
|
||||
@@ -4586,6 +4595,9 @@ E942 eval.txt /*E942*
|
||||
E943 message.txt /*E943*
|
||||
E944 pattern.txt /*E944*
|
||||
E945 pattern.txt /*E945*
|
||||
E946 terminal.txt /*E946*
|
||||
E947 terminal.txt /*E947*
|
||||
E948 terminal.txt /*E948*
|
||||
E95 message.txt /*E95*
|
||||
E96 diff.txt /*E96*
|
||||
E97 diff.txt /*E97*
|
||||
@@ -4829,6 +4841,7 @@ TabNew autocmd.txt /*TabNew*
|
||||
Tcl if_tcl.txt /*Tcl*
|
||||
TermChanged autocmd.txt /*TermChanged*
|
||||
TermResponse autocmd.txt /*TermResponse*
|
||||
Terminal-mode terminal.txt /*Terminal-mode*
|
||||
TextChanged autocmd.txt /*TextChanged*
|
||||
TextChangedI autocmd.txt /*TextChangedI*
|
||||
Transact-SQL ft_sql.txt /*Transact-SQL*
|
||||
@@ -5467,6 +5480,7 @@ cinoptions-values indent.txt /*cinoptions-values*
|
||||
clear-undo undo.txt /*clear-undo*
|
||||
clearmatches() eval.txt /*clearmatches()*
|
||||
client-server remote.txt /*client-server*
|
||||
client-server-name remote.txt /*client-server-name*
|
||||
clientserver remote.txt /*clientserver*
|
||||
clipboard gui.txt /*clipboard*
|
||||
clipboard-autoselect options.txt /*clipboard-autoselect*
|
||||
@@ -6188,6 +6202,7 @@ ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax*
|
||||
ft-mma-syntax syntax.txt /*ft-mma-syntax*
|
||||
ft-moo-syntax syntax.txt /*ft-moo-syntax*
|
||||
ft-msql-syntax syntax.txt /*ft-msql-syntax*
|
||||
ft-n1ql-syntax syntax.txt /*ft-n1ql-syntax*
|
||||
ft-nasm-syntax syntax.txt /*ft-nasm-syntax*
|
||||
ft-ncf-syntax syntax.txt /*ft-ncf-syntax*
|
||||
ft-nroff-syntax syntax.txt /*ft-nroff-syntax*
|
||||
@@ -7468,6 +7483,7 @@ mzscheme-vim if_mzsch.txt /*mzscheme-vim*
|
||||
mzscheme-vimext if_mzsch.txt /*mzscheme-vimext*
|
||||
mzscheme-window if_mzsch.txt /*mzscheme-window*
|
||||
n pattern.txt /*n*
|
||||
n1ql.vim syntax.txt /*n1ql.vim*
|
||||
nasm.vim syntax.txt /*nasm.vim*
|
||||
navigation motion.txt /*navigation*
|
||||
nb-commands netbeans.txt /*nb-commands*
|
||||
@@ -7811,6 +7827,7 @@ no-type-checking eval.txt /*no-type-checking*
|
||||
no_buffers_menu gui.txt /*no_buffers_menu*
|
||||
no_mail_maps filetype.txt /*no_mail_maps*
|
||||
no_plugin_maps filetype.txt /*no_plugin_maps*
|
||||
nocombine syntax.txt /*nocombine*
|
||||
non-greedy pattern.txt /*non-greedy*
|
||||
non-zero-arg eval.txt /*non-zero-arg*
|
||||
none-variable eval.txt /*none-variable*
|
||||
@@ -8629,11 +8646,14 @@ t_AL term.txt /*t_AL*
|
||||
t_BD term.txt /*t_BD*
|
||||
t_BE term.txt /*t_BE*
|
||||
t_CS term.txt /*t_CS*
|
||||
t_CTRL-W_CTRL-C terminal.txt /*t_CTRL-W_CTRL-C*
|
||||
t_CTRL-\_CTRL-N terminal.txt /*t_CTRL-\\_CTRL-N*
|
||||
t_CV term.txt /*t_CV*
|
||||
t_Ce term.txt /*t_Ce*
|
||||
t_Co term.txt /*t_Co*
|
||||
t_Cs term.txt /*t_Cs*
|
||||
t_DL term.txt /*t_DL*
|
||||
t_EC term.txt /*t_EC*
|
||||
t_EI term.txt /*t_EI*
|
||||
t_F1 term.txt /*t_F1*
|
||||
t_F2 term.txt /*t_F2*
|
||||
@@ -8671,11 +8691,15 @@ t_PE term.txt /*t_PE*
|
||||
t_PS term.txt /*t_PS*
|
||||
t_RB term.txt /*t_RB*
|
||||
t_RI term.txt /*t_RI*
|
||||
t_RS term.txt /*t_RS*
|
||||
t_RV term.txt /*t_RV*
|
||||
t_SC term.txt /*t_SC*
|
||||
t_SH term.txt /*t_SH*
|
||||
t_SI term.txt /*t_SI*
|
||||
t_SR term.txt /*t_SR*
|
||||
t_Sb term.txt /*t_Sb*
|
||||
t_Sf term.txt /*t_Sf*
|
||||
t_VS term.txt /*t_VS*
|
||||
t_WP term.txt /*t_WP*
|
||||
t_WS term.txt /*t_WS*
|
||||
t_ZH term.txt /*t_ZH*
|
||||
@@ -8888,14 +8912,25 @@ temp-file-name eval.txt /*temp-file-name*
|
||||
tempfile change.txt /*tempfile*
|
||||
template autocmd.txt /*template*
|
||||
tempname() eval.txt /*tempname()*
|
||||
term++close terminal.txt /*term++close*
|
||||
term++open terminal.txt /*term++open*
|
||||
term-dependent-settings term.txt /*term-dependent-settings*
|
||||
term-list syntax.txt /*term-list*
|
||||
term.txt term.txt /*term.txt*
|
||||
term_getaltscreen() eval.txt /*term_getaltscreen()*
|
||||
term_getattr() eval.txt /*term_getattr()*
|
||||
term_getcursor() eval.txt /*term_getcursor()*
|
||||
term_getjob() eval.txt /*term_getjob()*
|
||||
term_getline() eval.txt /*term_getline()*
|
||||
term_getscrolled() eval.txt /*term_getscrolled()*
|
||||
term_getsize() eval.txt /*term_getsize()*
|
||||
term_open() eval.txt /*term_open()*
|
||||
term_getstatus() eval.txt /*term_getstatus()*
|
||||
term_gettitle() eval.txt /*term_gettitle()*
|
||||
term_gettty() eval.txt /*term_gettty()*
|
||||
term_list() eval.txt /*term_list()*
|
||||
term_scrape() eval.txt /*term_scrape()*
|
||||
term_sendkeys() eval.txt /*term_sendkeys()*
|
||||
term_setsize() eval.txt /*term_setsize()*
|
||||
term_start() eval.txt /*term_start()*
|
||||
term_wait() eval.txt /*term_wait()*
|
||||
termcap term.txt /*termcap*
|
||||
termcap-changed version4.txt /*termcap-changed*
|
||||
@@ -8907,6 +8942,7 @@ termcap-title term.txt /*termcap-title*
|
||||
terminal terminal.txt /*terminal*
|
||||
terminal-colors os_unix.txt /*terminal-colors*
|
||||
terminal-debug terminal.txt /*terminal-debug*
|
||||
terminal-functions usr_41.txt /*terminal-functions*
|
||||
terminal-info term.txt /*terminal-info*
|
||||
terminal-key-codes term.txt /*terminal-key-codes*
|
||||
terminal-options term.txt /*terminal-options*
|
||||
|
||||
+25
-2
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 8.0. Last change: 2017 Jul 21
|
||||
*term.txt* For Vim version 8.0. Last change: 2017 Aug 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -301,7 +301,7 @@ OUTPUT CODES *terminal-output-codes*
|
||||
t_vb visual bell *t_vb* *'t_vb'*
|
||||
t_ve cursor visible *t_ve* *'t_ve'*
|
||||
t_vi cursor invisible *t_vi* *'t_vi'*
|
||||
t_vs cursor very visible *t_vs* *'t_vs'*
|
||||
t_vs cursor very visible (blink) *t_vs* *'t_vs'*
|
||||
*t_xs* *'t_xs'*
|
||||
t_xs if non-empty, standout not erased by overwriting (hpterm)
|
||||
*t_xn* *'t_xn'*
|
||||
@@ -316,6 +316,7 @@ Added by Vim (there are no standard codes for these):
|
||||
t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'*
|
||||
t_GP get window position (Y, X) in pixels *t_GP* *'t_GP'*
|
||||
t_WS set window size (height, width in cells) *t_WS* *'t_WS'*
|
||||
t_VS cursor normally visible (no blink) *t_VS* *'t_VS'*
|
||||
t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'*
|
||||
t_SR start replace mode (underline cursor shape) *t_SR* *'t_SR'*
|
||||
t_EI end insert or replace mode (block cursor shape) *t_EI* *'t_EI'*
|
||||
@@ -333,6 +334,28 @@ Added by Vim (there are no standard codes for these):
|
||||
|xterm-bracketed-paste|
|
||||
t_BD disable bracketed paste mode *t_BD* *'t_BD'*
|
||||
|xterm-bracketed-paste|
|
||||
t_SC set cursor color start *t_SC* *'t_SC'*
|
||||
t_EC set cursor color end *t_EC* *'t_EC'*
|
||||
t_SH set cursor shape *t_SH* *'t_SH'*
|
||||
t_RS request terminal cursor style *t_RS* *'t_RS'*
|
||||
|
||||
Some codes have a start, middle and end part. The start and end are defined
|
||||
by the termcap option, the middle part is text.
|
||||
set title text: t_ts {title text} t_fs
|
||||
set icon text: t_IS {icon text} t_IE
|
||||
set cursor color: t_SC {color name} t_EC
|
||||
|
||||
t_SH must take one argument:
|
||||
0, 1 or none blinking block cursor
|
||||
2 block cursor
|
||||
3 blinking underline cursor
|
||||
4 underline cursor
|
||||
5 blinking vertical bar cursor
|
||||
6 vertical bar cursor
|
||||
|
||||
t_RS is sent only if the response to t_RV has been received. It is not used
|
||||
on Mac OS when Terminal.app could be recognized from the termresponse.
|
||||
|
||||
|
||||
KEY CODES *terminal-key-codes*
|
||||
Note: Use the <> form if possible
|
||||
|
||||
+287
-39
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.0. Last change: 2017 Jul 24
|
||||
*terminal.txt* For Vim version 8.0. Last change: 2017 Sep 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -19,6 +19,9 @@ If the result is "1" you have it.
|
||||
3. Debugging |terminal-debug|
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
{only available when compiled with the |+terminal| feature}
|
||||
|
||||
The terminal feature requires the |+multi_byte|, |+job| and |+channel| features.
|
||||
|
||||
==============================================================================
|
||||
1. Basic use *terminal-use*
|
||||
@@ -27,49 +30,158 @@ This feature is for running a terminal emulator in a Vim window. A job can be
|
||||
started connected to the terminal emulator. For example, to run a shell: >
|
||||
:term bash
|
||||
|
||||
Or to run a debugger: >
|
||||
:term gdb vim
|
||||
Or to run build command: >
|
||||
:term make myprogram
|
||||
|
||||
The job runs asynchronously from Vim, the window will be updated to show
|
||||
output from the job, also while editing in any other window.
|
||||
output from the job, also while editing in another window.
|
||||
|
||||
When the keyboard focus is in the terminal window, typed keys will be send to
|
||||
the job. This uses a pty when possible.
|
||||
|
||||
Navigate between windows with CTRL-W commands (and mouse).
|
||||
E.g. CTRL-W CTRL-W moves focus to the next window.
|
||||
Use "CTRL-W :" to edit an Ex command.
|
||||
Typing ~
|
||||
|
||||
See option 'termkey' for specifying the key that precedes a Vim command.
|
||||
Default is CTRL-W.
|
||||
When the keyboard focus is in the terminal window, typed keys will be sent to
|
||||
the job. This uses a pty when possible. You can click outside of the
|
||||
terminal window to move keyboard focus elsewhere.
|
||||
|
||||
CTRL-W can be used to navigate between windows and other CTRL-W commands, e.g.:
|
||||
CTRL-W CTRL-W move focus to the next window
|
||||
CTRL-W : enter an Ex command
|
||||
See |CTRL-W| for more commands.
|
||||
|
||||
Special in the terminal window: *CTRL-W_.* *CTRL-W_N*
|
||||
CTRL-W . send a CTRL-W to the job in the terminal
|
||||
CTRL-W N go to Terminal-Normal mode, see |Terminal-mode|
|
||||
CTRL-\ CTRL-N go to Terminal-Normal mode, see |Terminal-mode|
|
||||
CTRL-W " {reg} paste register {reg} *CTRL-W_quote*
|
||||
Also works with the = register to insert the result of
|
||||
evaluating an expression.
|
||||
CTRL-W CTRL-C ends the job, see below |t_CTRL-W_CTRL-C|
|
||||
|
||||
See option 'termkey' for specifying another key instead of CTRL-W that
|
||||
will work like CTRL-W. However, typing 'termkey' twice sends 'termkey' to
|
||||
the job. For example:
|
||||
'termkey' CTRL-W move focus to the next window
|
||||
'termkey' : enter an Ex command
|
||||
'termkey' 'termkey' send 'termkey' to the job in the terminal
|
||||
'termkey' . send a CTRL-W to the job in the terminal
|
||||
'termkey' N go to terminal Normal mode, see below
|
||||
'termkey' CTRL-N same as CTRL-W N
|
||||
'termkey' CTRL-C same as |t_CTRL-W_CTRL-C|
|
||||
*t_CTRL-\_CTRL-N*
|
||||
The special key combination CTRL-\ CTRL-N can be used to switch to Normal
|
||||
mode, just like this works in any other mode.
|
||||
*t_CTRL-W_CTRL-C*
|
||||
CTRL-W CTRL-C can be typed to forcefully end the job. On MS-Windows a
|
||||
CTRL-BREAK will also kill the job.
|
||||
|
||||
If you type CTRL-C the effect depends on what the pty has been configured to
|
||||
do. For simple commands this causes a SIGINT to be sent to the job, which
|
||||
would end it. Other commands may ignore the SIGINT or handle the CTRL-C
|
||||
themselves (like Vim does).
|
||||
|
||||
|
||||
Size and color ~
|
||||
|
||||
See option 'termsize' for controlling the size of the terminal window.
|
||||
(TODO: scrolling when the terminal is larger than the window)
|
||||
|
||||
The terminal uses the 'background' option to decide whether the terminal
|
||||
window will start with a white or black background. The job running in the
|
||||
terminal can change the colors.
|
||||
|
||||
|
||||
Syntax ~
|
||||
|
||||
:ter[minal][!] [command] *:ter* *:terminal*
|
||||
:[range]ter[minal] [options] [command] *:ter* *:terminal*
|
||||
Open a new terminal window.
|
||||
|
||||
If [command] is provided run it as a job and connect
|
||||
the input and output to the terminal.
|
||||
If [command] is not given the 'shell' option is used.
|
||||
if [command] is NONE no job is started, the pty of the
|
||||
terminal can be used by a command like gdb.
|
||||
|
||||
A new buffer will be created, using [command] or
|
||||
'shell' as the name. If a buffer by this name already
|
||||
exists a number is added in parenthesis.
|
||||
E.g. if "gdb" exists the second terminal buffer will
|
||||
use "gdb (1)".
|
||||
'shell' as the name, prefixed with a "!". If a buffer
|
||||
by this name already exists a number is added in
|
||||
parentheses. E.g. if "gdb" exists the second terminal
|
||||
buffer will use "!gdb (1)".
|
||||
|
||||
The window can be closed, in which case the buffer
|
||||
becomes hidden. The command will not be stopped. The
|
||||
`:buffer` command can be used to turn the current
|
||||
window into a terminal window, using the existing
|
||||
buffer. If there are unsaved changes this fails, use
|
||||
! to force, as usual.
|
||||
If [range] is given the specified lines are used as
|
||||
input for the job. It will not be possible to type
|
||||
keys in the terminal window. For MS-Windows see the
|
||||
++eof argument below.
|
||||
|
||||
When the buffer associated with the terminal is wiped out the job is killed,
|
||||
similar to calling `job_stop(job, "kill")`
|
||||
Two comma separated numbers are used as "rows,cols".
|
||||
E.g. `:24,80gdb` opens a terminal with 24 rows and 80
|
||||
columns. However, if the terminal window spans the
|
||||
Vim window with, there is no vertical split, the Vim
|
||||
window width is used.
|
||||
*term++close* *term++open*
|
||||
Supported [options] are:
|
||||
++close The terminal window will close
|
||||
automatically when the job terminates.
|
||||
++open When the job terminates and no window
|
||||
shows it, a window will be opened.
|
||||
Note that this can be interruptive.
|
||||
++curwin Open the terminal in the current
|
||||
window, do not split the current
|
||||
window. Fails if the current buffer
|
||||
cannot be |abandon|ed.
|
||||
++hidden Open the terminal in a hidden buffer,
|
||||
no window will be used.
|
||||
++rows={height} Use {height} for the terminal window
|
||||
height.
|
||||
++cols={width} Use {width} for the terminal window
|
||||
width.
|
||||
++eof={text} when using [range]: text to send after
|
||||
the last line was written. Cannot
|
||||
contain white space. A CR is
|
||||
appended. For MS-Windows the default
|
||||
is to send CTRL-D.
|
||||
E.g. for a shell use "++eof=exit" and
|
||||
for Python "++eof=exit()". Special
|
||||
codes can be used like with `:map`,
|
||||
e.g. "<C-Z>" for CTRL-Z.
|
||||
|
||||
If you want to use more options use the |term_start()|
|
||||
function.
|
||||
|
||||
When the buffer associated with the terminal is unloaded or wiped out the job
|
||||
is killed, similar to calling `job_stop(job, "kill")`
|
||||
|
||||
So long as the job is running the window behaves like it contains a modified
|
||||
buffer. Trying to close the window with `CTRL-W :quit` fails. When using
|
||||
`CTRL-W :quit!` the job is ended. The text in the window is lost. The buffer
|
||||
still exists, but getting it in a window with `:buffer` will show an empty
|
||||
buffer.
|
||||
|
||||
Trying to close the window with `CTRL-W :close` also fails. Using
|
||||
`CTRL-W :close!` will close the window and make the buffer hidden.
|
||||
|
||||
You can use `CTRL-W :hide` to close the terminal window and make the buffer
|
||||
hidden, the job keeps running. The `:buffer` command can be used to turn the
|
||||
current window into a terminal window. If there are unsaved changes this
|
||||
fails, use ! to force, as usual.
|
||||
|
||||
To have a background job run without a window, and open the window when it's
|
||||
done, use options like this: >
|
||||
:term ++hidden ++open make
|
||||
Note that the window will open at an unexpected moment, this will interrupt
|
||||
what you are doing.
|
||||
|
||||
*E947* *E948*
|
||||
So long as the job is running, the buffer is considered modified and Vim
|
||||
cannot be quit easily, see |abandon|.
|
||||
|
||||
When the job has finished and no changes were made to the buffer: closing the
|
||||
window will wipe out the buffer.
|
||||
|
||||
Before changes can be made to a terminal buffer, the 'modifiable' option must
|
||||
be set. This is only possible when the job has finished. At the first change
|
||||
the buffer will become a normal buffer and the highlighting is removed.
|
||||
You may want to change the buffer name with |:file| to be able to write, since
|
||||
the buffer name will still be set to the command.
|
||||
|
||||
|
||||
Resizing ~
|
||||
@@ -94,11 +206,65 @@ terminal. |term_setsize()| can be used only when in the first or second mode,
|
||||
not when 'termsize' is "rowsXcols".
|
||||
|
||||
|
||||
Terminal-Job and Terminal-Normal mode ~
|
||||
*Terminal-mode*
|
||||
When the job is running the contents of the terminal is under control of the
|
||||
job. That includes the cursor position. Typed keys are sent to the job.
|
||||
The terminal contents can change at any time. This is called Terminal-Job
|
||||
mode.
|
||||
|
||||
Use CTRL-W N (or 'termkey' N) to switch to Terminal-Normal mode. Now the
|
||||
contents of the terminal window is under control of Vim, the job output is
|
||||
suspended. CTRL-\ CTRL-N does the same.
|
||||
*E946*
|
||||
In Terminal-Normal mode you can move the cursor around with the usual Vim
|
||||
commands, Visually mark text, yank text, etc. But you cannot change the
|
||||
contents of the buffer. The commands that would start insert mode, such as
|
||||
'i' and 'a', return to Terminal-Job mode. The window will be updated to show
|
||||
the contents of the terminal.
|
||||
|
||||
In Terminal-Normal mode the statusline and window title show "(Terminal)". If
|
||||
the job ends while in Terminal-Normal mode this changes to
|
||||
"(Terminal-finished)".
|
||||
|
||||
It is not possible to enter Insert mode from Terminal-Job mode.
|
||||
|
||||
|
||||
Cursor style ~
|
||||
|
||||
By default the cursor in the terminal window uses a not blinking block. The
|
||||
normal xterm escape sequences can be used to change the blinking state and the
|
||||
shape. Once focus leaves the terminal window Vim will restore the original
|
||||
cursor.
|
||||
|
||||
An exception is when xterm is started with the "-bc" argument, or another way
|
||||
that causes the cursor to blink. This actually means that the blinking flag
|
||||
is inverted. Since Vim cannot detect this, the terminal window cursor
|
||||
blinking will also be inverted.
|
||||
|
||||
|
||||
Unix ~
|
||||
|
||||
On Unix a pty is used to make it possible to run all kinds of commands. You
|
||||
can even run Vim in the terminal! That's used for debugging, see below.
|
||||
|
||||
Environment variables are used to pass information to the running job:
|
||||
TERM name of the terminal, 'term'
|
||||
ROWS number of rows in the terminal initially
|
||||
LINES same as ROWS
|
||||
COLUMNS number of columns in the terminal initially
|
||||
COLORS number of colors, 't_Co' (256*256*256 in the GUI)
|
||||
VIM_SERVERNAME v:servername
|
||||
|
||||
The |client-server| feature can be used to communicate with the Vim instance
|
||||
where the job was started. This only works when v:servername is not empty.
|
||||
If needed you can set it with: >
|
||||
call remote_startserver('vim-server')
|
||||
|
||||
In the job you can then do something like: >
|
||||
vim --servername $VIM_SERVERNAME --remote +123 some_file.c
|
||||
This will open the file "some_file.c" and put the cursor on line 123.
|
||||
|
||||
|
||||
MS-Windows ~
|
||||
|
||||
@@ -115,7 +281,10 @@ You can download them from the following page:
|
||||
|
||||
https://github.com/rprichard/winpty
|
||||
|
||||
Just put the files somewhere in your PATH.
|
||||
Just put the files somewhere in your PATH. You can set the 'winptydll' option
|
||||
to point to the right file, if needed. If you have both the 32-bit and 64-bit
|
||||
version, rename to winpty32.dll and winpty64.dll to match the way Vim was
|
||||
build.
|
||||
|
||||
==============================================================================
|
||||
2. Remote testing *terminal-testing*
|
||||
@@ -136,25 +305,104 @@ term_scrape() inspect terminal screen
|
||||
3. Debugging *terminal-debug*
|
||||
|
||||
The Terminal debugging plugin can be used to debug a program with gdb and view
|
||||
the source code in a Vim window. For example: >
|
||||
the source code in a Vim window. Since this is completely contained inside
|
||||
Vim this also works remotely over an ssh connection.
|
||||
|
||||
|
||||
Starting ~
|
||||
|
||||
Load the plugin with this command: >
|
||||
packadd termdebug
|
||||
< *:Termdebug*
|
||||
To start debugging use `:TermDebug` folowed by the command name, for example: >
|
||||
:TermDebug vim
|
||||
|
||||
This opens three windows:
|
||||
- A terminal window in which "gdb vim" is executed. Here you can directly
|
||||
interact with gdb.
|
||||
- A terminal window for the executed program. When "run" is used in gdb the
|
||||
program I/O will happen in this window, so that it does not interfere with
|
||||
controlling gdb.
|
||||
- A normal Vim window used to show the source code. When gdb jumps to a
|
||||
source file location this window will display the code, if possible. Values
|
||||
of variables can be inspected, breakpoints set and cleared, etc.
|
||||
This opens two windows:
|
||||
gdb window A terminal window in which "gdb vim" is executed. Here you
|
||||
can directly interact with gdb. The buffer name is "!gdb".
|
||||
program window A terminal window for the executed program. When "run" is
|
||||
used in gdb the program I/O will happen in this window, so
|
||||
that it does not interfere with controlling gdb. The buffer
|
||||
name is "gdb program".
|
||||
|
||||
This uses two terminal windows. To open the gdb window: >
|
||||
:term gdb [arguments]
|
||||
To open the terminal to run the tested program |term_open()| is used.
|
||||
The current window is used to show the source code. When gdb pauses the
|
||||
source file location will be displayed, if possible. A sign is used to
|
||||
highlight the current position (using highlight group debugPC).
|
||||
|
||||
If the buffer in the current window is modified, another window will be opened
|
||||
to display the current gdb position.
|
||||
|
||||
Focus the terminal of the executed program to interact with it. This works
|
||||
the same as any command running in a terminal window.
|
||||
|
||||
When the debugger ends, typically by typing "quit" in the gdb window, the two
|
||||
opened windows are closed.
|
||||
|
||||
|
||||
Stepping through code ~
|
||||
|
||||
Put focus on the gdb window to type commands there. Some common ones are:
|
||||
- CTRL-C interrupt the program
|
||||
- next execute the current line and stop at the next line
|
||||
- step execute the current line and stop at the next statement, entering
|
||||
functions
|
||||
- finish execute until leaving the current function
|
||||
- where show the stack
|
||||
- frame N go to the Nth stack frame
|
||||
- continue continue execution
|
||||
|
||||
In the window showing the source code some commands can used to control gdb:
|
||||
:Break set a breakpoint at the current line; a sign will be displayed
|
||||
:Delete delete a breakpoint at the current line
|
||||
:Step execute the gdb "step" command
|
||||
:Over execute the gdb "next" command (:Next is a Vim command)
|
||||
:Finish execute the gdb "finish" command
|
||||
:Continue execute the gdb "continue" command
|
||||
|
||||
|
||||
Inspecting variables ~
|
||||
|
||||
:Evaluate evaluate the expression under the cursor
|
||||
K same
|
||||
:Evaluate {expr} evaluate {expr}
|
||||
:'<,'>Evaluate evaluate the Visually selected text
|
||||
|
||||
This is similar to using "print" in the gdb window.
|
||||
|
||||
|
||||
Other commands ~
|
||||
|
||||
:Gdb jump to the gdb window
|
||||
:Program jump to the window with the running program
|
||||
|
||||
|
||||
Communication ~
|
||||
|
||||
There is another, hidden, buffer, which is used for Vim to communicate with
|
||||
gdb. The buffer name is "gdb communication". Do not delete this buffer, it
|
||||
will break the debugger.
|
||||
|
||||
|
||||
Customizing ~
|
||||
|
||||
To change the name of the gdb command, set the "termdebugger" variable before
|
||||
invoking `:Termdebug`: >
|
||||
let termdebugger = "mygdb"
|
||||
Only debuggers fully compatible with gdb will work. Vim uses the GDB/MI
|
||||
interface.
|
||||
|
||||
The color of the signs can be adjusted with these highlight groups:
|
||||
- debugPC the current position
|
||||
- debugBreakpoint a breakpoint
|
||||
|
||||
The defaults are, when 'background' is "light":
|
||||
hi debugPC term=reverse ctermbg=lightblue guibg=lightblue
|
||||
hi debugBreakpoint term=reverse ctermbg=red guibg=red
|
||||
|
||||
When 'background' is "dark":
|
||||
hi debugPC term=reverse ctermbg=darkblue guibg=darkblue
|
||||
hi debugBreakpoint term=reverse ctermbg=red guibg=red
|
||||
|
||||
TODO
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
+106
-45
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Jul 22
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Aug 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -41,28 +41,26 @@ No maintainer for Simplified Chinese translations.
|
||||
|
||||
Terminal emulator window:
|
||||
- Lots of stuff to implement, see src/terminal.c
|
||||
- Running a shell command from the GUI still has limitations. Look into how
|
||||
the terminal emulator of the Vim shell project can help:
|
||||
http://vimshell.wana.at
|
||||
- Add debugger interface. Implementation for gdb by Xavier de Gaye. Should
|
||||
work like an IDE. Try to keep it generic. Now found here:
|
||||
http://clewn.sf.net.
|
||||
Can this replace Agide? http://www.a-a-p.org/images/debugfull.png
|
||||
- make showballoon() work in a terminal. Requires getting mouse-move
|
||||
events.
|
||||
- send 'balloonText' events for the cursor position (using CursorHold ?)
|
||||
in terminal mode.
|
||||
- Implement the right-click popup menu for the terminal. Can use the
|
||||
completion popup menu code and mouse dragging.
|
||||
- Look into the idevim plugin/script.
|
||||
- Related wishes for NetBeans commands:
|
||||
- make it possible to have 'defineAnnoType' also handle terminal colors.
|
||||
- send 'balloonText' events for the cursor position (using CursorHold ?)
|
||||
in terminal mode.
|
||||
- Feature: switch between "running job" and a normal buffer (possibly
|
||||
read-only) to allow for searching, copy/paste, etc. (Domnique). Having a
|
||||
(large) scrollback would be useful.
|
||||
|
||||
+channel:
|
||||
- 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
|
||||
- Writing raw mode to a buffer should still handle NL characters as line
|
||||
breaks. (Dmitry Zotikov, 2017 Aug 16)
|
||||
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
|
||||
2016 Dec 11, #1320)
|
||||
- Implement |job-term| ?
|
||||
@@ -77,7 +75,7 @@ Terminal emulator window:
|
||||
Feb 9) How to do this on MS-Windows?
|
||||
- For connection to server, a "keep open" flag would be useful. Retry
|
||||
connecting in the main loop with zero timeout.
|
||||
- job_start(): run job in a newly opened terminal.
|
||||
- job_start(): run job in a newly opened terminal (not a terminal window).
|
||||
With xterm could use -S{pty}.
|
||||
Although user could use "xterm -e 'cmd arg'".
|
||||
|
||||
@@ -125,12 +123,44 @@ Regexp problems:
|
||||
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
|
||||
(2017 May 15, #1252)
|
||||
|
||||
Patch for quickfix: parse lines for any quickfix list. (Yegappan Lakshmanan,
|
||||
2017 Jul 20)
|
||||
Patch to turn test80 into a new style test. (Yegappan Lakshmanan, 2017 Aug 20)
|
||||
|
||||
Include a few color schemes, based on popularity:
|
||||
http://www.vim.org/scripts/script_search_results.php?keywords=&script_type=color+scheme&order_by=rating&direction=descending&search=search
|
||||
http://vimawesome.com/?q=tag:color-scheme
|
||||
Use names that indicate their appearnce (Christian Brabandt, 2017 Aug 3)
|
||||
- monokai - Xia Crusoe (2017 Aug 4)
|
||||
- seoul256 - Christian Brabandt (2017 Aug 3)
|
||||
- gruvbox - Christian Brabandt (2017 Aug 3)
|
||||
- janah - Marco Hinz (2017 Aug 4)
|
||||
- apprentice - Romain Lafourcade (2017 Aug 6) remarks about help file #1964
|
||||
Suggested by Hiroki Kokubun:
|
||||
- [Iceberg](https://github.com/cocopon/iceberg.vim) (my one)
|
||||
- [hybrid](https://github.com/w0ng/vim-hybrid)
|
||||
|
||||
When starting with --clean packages under "start" are not loaded. Make this
|
||||
work: :packadd START {name} similar to :runtime START name
|
||||
|
||||
When using :packadd files under "later" are not used, which is inconsistent
|
||||
with packages under "start". (xtal8, #1994)
|
||||
|
||||
After 8.0.0962 pasting leaves the cursor in another position. (Ken Takata,
|
||||
2017 Aug 23, #2015) Also (zdm, 2017 Aug 23)
|
||||
|
||||
Patch to add quickfix list identifier. (Yegappan, 2017 Aug 15)
|
||||
|
||||
Mac Terminal.app: ctermbg=15 gives light grey instead of white.
|
||||
ctermbg=256 breaks clearing till end of the line. Both work fine in xterm.
|
||||
|
||||
Patch to avoid editing a file in the session file twice. (Christian Brabandt,
|
||||
2017 Aug 21) #1958
|
||||
|
||||
With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
|
||||
(Marcin Szewczyk, 2017 Apr 26)
|
||||
|
||||
Using 'wildignore' also applies to literally entered file name. Also with
|
||||
:drop (remote commands).
|
||||
|
||||
ml_get error when using a Python. (Yggdroot, 2017 Jun 1, #1737)
|
||||
Lemonboy can reproduce (2017 Jun 5)
|
||||
|
||||
@@ -138,27 +168,58 @@ ml_get errors with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Error in emsg with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Better detection of strace file. (Steven Fernandez, 2017 Jul 12, #1837)
|
||||
Test runtime files.
|
||||
Start with filetype detection: testdir/test_filetype.vim
|
||||
|
||||
Bug with conceal mode: 3rd element returned by synconcealed() differs for
|
||||
every call. (Dominique Pelle, 2017 Jun 18)
|
||||
Patch to support on-the-spot and over-the-spot input method. (Ken Takata, 2017
|
||||
Feb 14). Also see #1215.
|
||||
|
||||
Patch to ignore case when 'diffopt' has "icase" for finding the difference
|
||||
inside a line. (Rick Howe, 2017 Aug 21, 22 with test)
|
||||
|
||||
Patch to support strikethrough next to bold and italic. (Christian Brabandt,
|
||||
2013 Jul 30) Update from Ken Takata, 2013 Oct 12.
|
||||
Update mentioned by Christian, 2016 Apr 25.
|
||||
Update from Ken Takata, 2017 Aug 23.
|
||||
|
||||
Patch to add setbufline(). (email from Yasuhiro Matsumoto, patch by Ozaki
|
||||
Kiichi, 2016 Feb 28)
|
||||
Update Mar 8: https://gist.github.com/mattn/23c1f50999084992ca98
|
||||
Update Mar 13: https://gist.github.com/mattn/23c1f50999084992ca98
|
||||
Update Aug 2017: #1953
|
||||
|
||||
Patch to fix indenting for raw C++ string. (Christian Brabandt, 2017 Aug 24,
|
||||
#2019)
|
||||
|
||||
Add options_default() / options_restore() to set several options to Vim
|
||||
defaults for a plugin. Comments from Zyx, 2017 May 10.
|
||||
Perhaps use a vimcontext / endvimcontext command block.
|
||||
|
||||
Patch to fix bogus characters inserted in visual-block append. (Christian
|
||||
Brabandt, 2017 Aug 23)
|
||||
|
||||
Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28)
|
||||
Still happens (2017 Jul 9)
|
||||
|
||||
When bracketed paste is used, pasting at the ":append" prompt does not get the
|
||||
line breaks. (Ken Takata, 2017 Aug 22)
|
||||
|
||||
This example in the help does not work (Andy Wokula, 2017 Aug 20):
|
||||
augroup mine | au! BufRead | augroup END
|
||||
|
||||
Memory leak in test_arabic.
|
||||
|
||||
Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
|
||||
It can replace the BeOS code, which is likely not used anymore.
|
||||
Now on github: #1856. Is not up-to-date.
|
||||
Now on github: #1856. Is now up-to-date?
|
||||
Got permission to include this under the Vim license.
|
||||
|
||||
Refactored HTML indent file. (Michael Lee, #1821)
|
||||
|
||||
Using uninitialzed value in test_crypt.
|
||||
Using uninitialized value in test_crypt.
|
||||
|
||||
Test_writefile_fails_conversion failure on Solaris because if different iconv
|
||||
behavior. Skip when "uname" returns "SunOS"? (Pavel Heimlich, #1872)
|
||||
|
||||
All functions are global, which makes functions like get() and len() awkward.
|
||||
For the future use the ~get() and ~len() syntax, e.g.:
|
||||
@@ -172,16 +233,31 @@ Alternatives for ~:
|
||||
@ list@get() harder to read
|
||||
-> list->get() two characters, used for lambda
|
||||
|
||||
The ++ options for the :edit command are also useful on the Vim command line.
|
||||
|
||||
X11: Putting more than about 262040 characters of text on the clipboard and
|
||||
pasting it in another Vim doesn't work. (Dominique Pelle, 2008 Aug 21-23)
|
||||
clip_x11_request_selection_cb() is called with zero value and length.
|
||||
Also: Get an error message from free() in the process that owns the selection.
|
||||
Seems to happen when the selection is requested the second time, but before
|
||||
clip_x11_convert_selection_cb() is invoked, thus in X library code.
|
||||
Patch to fix this by Kiichi, 2017 Jul 11, #1822)
|
||||
Kazunobu Kuriyama is working on a proper fix. (2017 Jul 25)
|
||||
|
||||
Problem with three-piece comment. (Michael Lee, 2017 May 11, #1696)
|
||||
|
||||
Creating a partial with an autoload function is confused about the "self"
|
||||
attribute of the function. For an unknown function assume "self" and make
|
||||
that optiona? (Bjorn Linse, 2017 Aug 5)
|
||||
|
||||
Completion mixes results from the current buffer with tags and other files.
|
||||
Happens when typing CTRL-N while still search for results. E.g., type "b_" in
|
||||
terminal.c and then CTRL-N twice.
|
||||
Should do current file first and not split it up when more results are found.
|
||||
(Also #1890)
|
||||
|
||||
Python: After "import vim" error messages only show the first line of the
|
||||
stack trace. (Yggdroot, 2017 Jul 28, #1887)
|
||||
|
||||
When checking if a bufref is valid, also check the buffer number, to catch the
|
||||
case of :bwipe followed by :new.
|
||||
|
||||
@@ -189,7 +265,7 @@ Patch to skip writing a temp file for diffing if the buffer is equal to the
|
||||
existing file. (Akria Sheng, 2017 Jul 22)
|
||||
Could also skip writing lines that are the same.
|
||||
|
||||
Files for Latvian language. (Vitolins, 2017 May 3, #1675)
|
||||
Patch with Files for Latvian language. (Vitolins, 2017 May 3, #1675)
|
||||
|
||||
MS-Windows: Opening same file in a second gvim hangs. (Sven Bruggemann, 2017
|
||||
Jul 4)
|
||||
@@ -237,6 +313,9 @@ Is it possible to keep the complete menu open when calling complete()?
|
||||
|
||||
Memory leak in test97? The string is actually freed. Weird.
|
||||
|
||||
Patch to add configure flags to skip rtl, farsi and arabic support.
|
||||
(Diego Carrión, #1867)
|
||||
|
||||
assert_fails() can only check for the first error. Make it possible to have
|
||||
it catch multiple errors and check all of them.
|
||||
|
||||
@@ -253,12 +332,7 @@ Still need maplist() to find the mappings. What can we use to identify a
|
||||
mapping? Something unique would be better than the LHS.
|
||||
Perhaps simpler: actually delete the mappings. Use maplist() to list matching
|
||||
mappings (with a lhs prefix, like maparg()), mapdelete() to delete,
|
||||
maprestore() to restore (using the output of maplist().
|
||||
|
||||
Patch to add setbufline(). (email from Yasuhiro Matsumoto, patch by Ozaki
|
||||
Kiichi, 2016 Feb 28)
|
||||
Update Mar 8: https://gist.github.com/mattn/23c1f50999084992ca98
|
||||
Update Mar 13: https://gist.github.com/mattn/23c1f50999084992ca98
|
||||
maprestore() to restore (using the output of maplist()).
|
||||
|
||||
Add an argument to :mkvimrc (or add aother command) to skip mappings from
|
||||
plugins (source is a Vim script). No need to put these in a .vimrc, they will
|
||||
@@ -335,9 +409,6 @@ Implement optional arguments for functions.
|
||||
call Foo(12, all = 0)
|
||||
call Foo(12, 15, 0)
|
||||
|
||||
Patch to support on-the-spot and over-the-spot input method. (Ken Takata, 2017
|
||||
Feb 14).
|
||||
|
||||
Change the Farsi code to work with UTF-8. Possibly combined with the Arabic
|
||||
support, or similar.
|
||||
Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
|
||||
@@ -352,11 +423,9 @@ 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.
|
||||
|
||||
Patch for restoring wide characters in the console buffer.
|
||||
(Ken Takata, 2016 Jun 7)
|
||||
|
||||
Patch to fix escaping of job arguments. (Yasuhiro Matsumoto, 2016 Oct 5)
|
||||
Update Oct 14: https://gist.github.com/mattn/d47e7d3bfe5ade4be86062b565a4bfca
|
||||
Update Aug 2017: #1954
|
||||
|
||||
Characters deleted on completion. (Adrià Farrés, 2017 Apr 20, #1645)
|
||||
Remarks from Christian Brabandt (Apr 21)
|
||||
@@ -379,7 +448,7 @@ MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender,
|
||||
2017 Feb 9) Can we expand wildcards first and send the path literally to the
|
||||
receiving Vim? Or make an exception for #, it's not useful remotely.
|
||||
|
||||
":sbr" docs state it respect 'switchbuf', but "vsplit" does not cause a
|
||||
":sbr" docs state it respects 'switchbuf', but "vsplit" does not cause a
|
||||
vertical split. (Haldean Brown, 2017 Mar 1)
|
||||
|
||||
Use ADDR_OTHER instead of ADDR_LINES for many more commands.
|
||||
@@ -579,11 +648,6 @@ Reject the value? #710.
|
||||
Patch to fix increment/decrement not working properly when 'virtualedit' is
|
||||
set. (Hirohito Higashi, 2016 Aug 1, #923)
|
||||
|
||||
Patch to support strikethrough next to bold and italic. (Christian Brabandt,
|
||||
2013 Jul 30) Update from Ken Takata, 2013 Oct 12.
|
||||
Update mentioned by Christian, 2016 Apr 25.
|
||||
Update from Ken Takata, 2016 Jul 17.
|
||||
|
||||
When doing "vi buf.md" a BufNew autocommand for *.md is not triggered.
|
||||
Because of using the initial buffer? (Dun Peal, 2016 May 12)
|
||||
|
||||
@@ -1351,9 +1415,6 @@ Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26)
|
||||
When using a Vim server, a # in the path causes an error message.
|
||||
(Jeff Lanzarotta, 2011 Feb 17)
|
||||
|
||||
Setting $HOME on MS-Windows is not very well documented. Suggestion by Ben
|
||||
Fritz (2011 Oct 27).
|
||||
|
||||
When there is a ">" in a line that "gq" wraps to the start of the next line,
|
||||
then the following line will pick it up as a leader. Should get the leader
|
||||
from the first line, not a wrapped line. (Matt Ackeret, 2012 Feb 27)
|
||||
@@ -5620,11 +5681,11 @@ Various improvements:
|
||||
- Support %name% expansion for "gf" on Windows.
|
||||
- Make "gf" work on "file://c:/path/name". "file:/c:/" and "file:///c:/"
|
||||
should also work?
|
||||
- Add 'urlpath', used like 'path' for when "gf" used on an URL?
|
||||
- Add 'urlpath', used like 'path' for when "gf" used on a URL?
|
||||
8 When using "gf" on an absolute file name, while editing a remote file
|
||||
(starts with scp:// or http://) should prepend the method and machine
|
||||
name.
|
||||
- When finding an URL or file name, and it doesn't exist, try removing a
|
||||
- When finding a URL or file name, and it doesn't exist, try removing a
|
||||
trailing '.'.
|
||||
- Add ":path" command modifier. Should work for every command that takes a
|
||||
file name argument, to search for the file name in 'path'. Use
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_07.txt* For Vim version 8.0. Last change: 2006 Apr 24
|
||||
*usr_07.txt* For Vim version 8.0. Last change: 2017 Aug 11
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -355,7 +355,7 @@ a sentence to the f register (f for First): >
|
||||
"fyas
|
||||
|
||||
The "yas" command yanks a sentence like before. It's the "f that tells Vim
|
||||
the text should be place in the f register. This must come just before the
|
||||
the text should be placed in the f register. This must come just before the
|
||||
yank command.
|
||||
Now yank three whole lines to the l register (l for line): >
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_08.txt* For Vim version 8.0. Last change: 2014 Jul 06
|
||||
*usr_08.txt* For Vim version 8.0. Last change: 2017 Aug 11
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -45,7 +45,7 @@ top one:
|
||||
+----------------------------------+
|
||||
|
||||
What you see here is two windows on the same file. The line with "====" is
|
||||
that status line. It displays information about the window above it. (In
|
||||
the status line. It displays information about the window above it. (In
|
||||
practice the status line will be in reverse video.)
|
||||
The two windows allow you to view two parts of the same file. For example,
|
||||
you could make the top window show the variable declarations of a program, and
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_09.txt* For Vim version 8.0. Last change: 2006 Apr 24
|
||||
*usr_09.txt* For Vim version 8.0. Last change: 2017 Aug 11
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -60,7 +60,7 @@ THE WINDOW TITLE
|
||||
At the very top is the window title. This is drawn by your window system.
|
||||
Vim will set the title to show the name of the current file. First comes the
|
||||
name of the file. Then some special characters and the directory of the file
|
||||
in parens. These special character can be present:
|
||||
in parens. These special characters can be present:
|
||||
|
||||
- The file cannot be modified (e.g., a help file)
|
||||
+ The file contains changes
|
||||
@@ -206,7 +206,7 @@ the "real clipboard" are called clipboard, you'll have to get used to that.
|
||||
To put text on the real clipboard, select a few different words in one of
|
||||
the gVims you have running. Then use the Edit/Copy menu entry. Now the text
|
||||
has been copied to the real clipboard. You can't see this, unless you have
|
||||
some application that shows the clipboard contents (e.g., KDE's klipper).
|
||||
some application that shows the clipboard contents (e.g., KDE's Klipper).
|
||||
Now select the other gVim, position the cursor somewhere and use the
|
||||
Edit/Paste menu. You will see the text from the real clipboard is inserted.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_12.txt* For Vim version 8.0. Last change: 2007 May 11
|
||||
*usr_12.txt* For Vim version 8.0. Last change: 2017 Aug 11
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -290,7 +290,7 @@ command: >
|
||||
The line range "%" is used, thus this works on the whole file. The pattern
|
||||
that the ":substitute" command matches with is "\s\+$". This finds white
|
||||
space characters (\s), 1 or more of them (\+), before the end-of-line ($).
|
||||
Later will be explained how you write patterns like this |usr_27.txt|.
|
||||
Later will be explained how you write patterns like this, see |usr_27.txt|.
|
||||
The "to" part of the substitute command is empty: "//". Thus it replaces
|
||||
with nothing, effectively deleting the matched white space.
|
||||
|
||||
|
||||
+18
-1
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2017 Jul 19
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2017 Aug 22
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -966,6 +966,23 @@ Jobs: *job-functions*
|
||||
job_info() get information about a job
|
||||
job_setoptions() set options for a job
|
||||
|
||||
Terminal window: *terminal-functions*
|
||||
term_start() open a terminal window and run a job
|
||||
term_list() get the list of terminal buffers
|
||||
term_sendkeys() send keystrokes to a terminal
|
||||
term_wait() wait for screen to be updated
|
||||
term_getjob() get the job associated with a terminal
|
||||
term_scrape() get row of a terminal screen
|
||||
term_getline() get a line of text from a terminal
|
||||
term_getattr() get the value of attribute {what}
|
||||
term_getcursor() get the cursor position of a terminal
|
||||
term_getscrolled() get the scroll count of a terminal
|
||||
term_getaltscreen() get the alternate screen flag
|
||||
term_getsize() get the size of a terminal
|
||||
term_getstatus() get the status of a terminal
|
||||
term_gettitle() get the title of a terminal
|
||||
term_gettty() get the tty name of a terminal
|
||||
|
||||
Timers: *timer-functions*
|
||||
timer_start() create a timer
|
||||
timer_pause() pause or unpause a timer
|
||||
|
||||
@@ -429,6 +429,7 @@ N *+tag_old_static* old method for static tags |tag-old-static|
|
||||
m *+tag_any_white* any white space allowed in tags file |tag-any-white|
|
||||
m *+tcl* Tcl interface |tcl|
|
||||
m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
|
||||
m *+terminal* Support for terminal window |terminal|
|
||||
*+terminfo* uses |terminfo| instead of termcap
|
||||
N *+termresponse* support for |t_RV| and |v:termresponse|
|
||||
B *+termguicolors* 24-bit color in xterm-compatible terminals support
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
.TH VIM 1 "2006 Apr 11"
|
||||
.SH NAME
|
||||
vim \- Vi IMproved, a programmers text editor
|
||||
vim \- Vi IMproved, a programmer's text editor
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.B vim
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ VIM(1) General Commands Manual VIM(1)
|
||||
|
||||
|
||||
NAME
|
||||
vim - Vi IMproved, a programmers text editor
|
||||
vim - Vi IMproved, a programmer's text editor
|
||||
|
||||
SYNOPSIS
|
||||
vim [options] [file ..]
|
||||
|
||||
@@ -314,8 +314,8 @@ Visual-block Insert *v_b_I*
|
||||
With a blockwise selection, I{string}<ESC> will insert {string} at the start
|
||||
of block on every line of the block, provided that the line extends into the
|
||||
block. Thus lines that are short will remain unmodified. TABs are split to
|
||||
retain visual columns.
|
||||
See |v_b_I_example|.
|
||||
retain visual columns. Works only for adding text to a line, not for
|
||||
deletions. See |v_b_I_example|.
|
||||
|
||||
Visual-block Append *v_b_A*
|
||||
With a blockwise selection, A{string}<ESC> will append {string} to the end of
|
||||
@@ -331,6 +331,7 @@ See |v_b_A_example|.
|
||||
Note: "I" and "A" behave differently for lines that don't extend into the
|
||||
selected block. This was done intentionally, so that you can do it the way
|
||||
you want.
|
||||
Works only for adding text to a line, not for deletions.
|
||||
|
||||
Visual-block change *v_b_c*
|
||||
All selected text in the block will be replaced by the same text string. When
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.0. Last change: 2017 Jul 23
|
||||
*windows.txt* For Vim version 8.0. Last change: 2017 Aug 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -344,8 +344,9 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
|
||||
*:hide*
|
||||
:hid[e]
|
||||
:{count}hid[e]
|
||||
Quit the current window, unless it is the last window on the
|
||||
screen. For {count} see |:quit| command.
|
||||
Without {count}: Quit the current window, unless it is the
|
||||
last window on the screen.
|
||||
If {count} is given quit the {count} window.
|
||||
|
||||
The buffer becomes hidden (unless there is another window
|
||||
editing it or 'bufhidden' is "unload", "delete" or "wipe").
|
||||
@@ -1031,6 +1032,8 @@ list of buffers. |unlisted-buffer|
|
||||
displayed in a window |hidden-buffer|
|
||||
- a buffer with 'modifiable' off
|
||||
= a readonly buffer
|
||||
R a terminal buffer with a running job
|
||||
F a terminal buffer with a finished job
|
||||
+ a modified buffer
|
||||
x a buffer with read errors
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Jul 11
|
||||
" Last Change: 2017 Aug 11
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -1027,7 +1027,7 @@ au BufNewFile,BufRead *.java,*.jav setf java
|
||||
au BufNewFile,BufRead *.jj,*.jjt setf javacc
|
||||
|
||||
" JavaScript, ECMAScript
|
||||
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript
|
||||
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.mjs setf javascript
|
||||
|
||||
" Java Server Pages
|
||||
au BufNewFile,BufRead *.jsp setf jsp
|
||||
@@ -1342,6 +1342,9 @@ au BufNewFile,BufRead *.mush setf mush
|
||||
" Mutt setup file (also for Muttng)
|
||||
au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
|
||||
|
||||
" N1QL
|
||||
au BufRead,BufNewfile *.n1ql,*.nql setf n1ql
|
||||
|
||||
" Nano
|
||||
au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc
|
||||
|
||||
@@ -2267,6 +2270,8 @@ func! s:FTtex()
|
||||
elseif format == 'plaintex'
|
||||
let format = 'plain'
|
||||
endif
|
||||
elseif expand('%') =~ 'tex/context/.*/.*.tex'
|
||||
let format = 'context'
|
||||
else
|
||||
" Default value, may be changed later:
|
||||
let format = exists("g:tex_flavor") ? g:tex_flavor : 'plain'
|
||||
@@ -2308,7 +2313,7 @@ func! s:FTtex()
|
||||
endfunc
|
||||
|
||||
" ConTeXt
|
||||
au BufNewFile,BufRead tex/context/*/*.tex,*.mkii,*.mkiv,*.mkvi setf context
|
||||
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context
|
||||
|
||||
" Texinfo
|
||||
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Verilog HDL
|
||||
" Maintainer: Chih-Tsun Huang <cthuang@larc.ee.nthu.edu.tw>
|
||||
" Last Change: Wed Sep 3 15:24:49 CST 2008
|
||||
" URL: http://larc.ee.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
|
||||
" Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw>
|
||||
" Last Change: 2017 Aug 25 by Chih-Tsun Huang
|
||||
" URL: http://www.cs.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
|
||||
"
|
||||
" Credits:
|
||||
" Suggestions for improvement, bug reports by
|
||||
" Shao <shaominghai2005@163.com>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -45,11 +49,16 @@ if exists("loaded_matchit")
|
||||
\ '\<begin\>:\<end\>,' .
|
||||
\ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
|
||||
\ '\<module\>:\<endmodule\>,' .
|
||||
\ '\<if\>:\<else\>,' .
|
||||
\ '\<if\>:`\@<!\<else\>,' .
|
||||
\ '\<function\>:\<endfunction\>,' .
|
||||
\ '`ifdef\>:`else\>:`endif\>,' .
|
||||
\ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
|
||||
\ '\<task\>:\<endtask\>,' .
|
||||
\ '\<specify\>:\<endspecify\>'
|
||||
\ '\<specify\>:\<endspecify\>,' .
|
||||
\ '\<config\>:\<endconfig\>,' .
|
||||
\ '\<generate\>:\<endgenerate\>,' .
|
||||
\ '\<fork\>:\<join\>,' .
|
||||
\ '\<primitive\>:\<endprimitive\>,' .
|
||||
\ '\<table\>:\<endtable\>'
|
||||
endif
|
||||
|
||||
" Reset 'cpoptions' back to the user's setting
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||
" Original Author: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2017-05-02
|
||||
" Latest Revision: 2017-08-08
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-sh-indent
|
||||
" Changelog:
|
||||
" 20170808: - better indent of line continuation
|
||||
" 20170502: - get rid of buffer-shiftwidth function
|
||||
" 20160912: - preserve indentation of here-doc blocks
|
||||
" 20160627: - detect heredocs correctly
|
||||
@@ -117,7 +118,8 @@ function! GetShIndent()
|
||||
endfunction
|
||||
|
||||
function! s:is_continuation_line(line)
|
||||
return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\)$'
|
||||
return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\||\)' .
|
||||
\ '\s*\({\s*\)\=\(#.*\)\=$'
|
||||
endfunction
|
||||
|
||||
function! s:find_continued_lnum(lnum)
|
||||
|
||||
+17
-13
@@ -1,6 +1,6 @@
|
||||
" Language: Verilog HDL
|
||||
" Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw>
|
||||
" Last Change: 2017 Feb 24 by Chih-Tsun Huang
|
||||
" Last Change: 2017 Aug 25 by Chih-Tsun Huang
|
||||
" URL: http://www.cs.nthu.edu.tw/~cthuang/vim/indent/verilog.vim
|
||||
"
|
||||
" Credits:
|
||||
@@ -25,7 +25,8 @@ let b:did_indent = 1
|
||||
setlocal indentexpr=GetVerilogIndent()
|
||||
setlocal indentkeys=!^F,o,O,0),=begin,=end,=join,=endcase
|
||||
setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify
|
||||
setlocal indentkeys+==`else,=`endif
|
||||
setlocal indentkeys+==endconfig,=endgenerate,=endprimitive,=endtable
|
||||
setlocal indentkeys+==`else,=`elsif,=`endif
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetVerilogIndent")
|
||||
@@ -84,7 +85,9 @@ function GetVerilogIndent()
|
||||
endif
|
||||
|
||||
" Indent after if/else/for/case/always/initial/specify/fork blocks
|
||||
elseif last_line =~ '`\@<!\<\(if\|else\)\>' ||
|
||||
" Note: We exclude '`if' or '`else' and consider 'end else'
|
||||
" 'end if' is redundant here
|
||||
elseif last_line =~ '^\s*\(end\)\=\s*`\@<!\<\(if\|else\)\>' ||
|
||||
\ last_line =~ '^\s*\<\(for\|case\%[[zx]]\)\>' ||
|
||||
\ last_line =~ '^\s*\<\(always\|initial\)\>' ||
|
||||
\ last_line =~ '^\s*\<\(specify\|fork\)\>'
|
||||
@@ -93,8 +96,8 @@ function GetVerilogIndent()
|
||||
let ind = ind + offset
|
||||
if vverb | echo vverb_str "Indent after a block statement." | endif
|
||||
endif
|
||||
" Indent after function/task blocks
|
||||
elseif last_line =~ '^\s*\<\(function\|task\)\>'
|
||||
" Indent after function/task/config/generate/primitive/table blocks
|
||||
elseif last_line =~ '^\s*\<\(function\|task\|config\|generate\|primitive\|table\)\>'
|
||||
if last_line !~ '\<end\>\s*' . vlog_comment . '*$' ||
|
||||
\ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . vlog_comment . '*$'
|
||||
let ind = ind + offset
|
||||
@@ -161,11 +164,11 @@ function GetVerilogIndent()
|
||||
let ind = ind - offset
|
||||
if vverb | echo vverb_str "De-indent after a close statement." | endif
|
||||
|
||||
" `ifdef and `else
|
||||
elseif last_line =~ '^\s*`\<\(ifdef\|else\)\>'
|
||||
" `ifdef or `ifndef or `elsif or `else
|
||||
elseif last_line =~ '^\s*`\<\(ifn\?def\|elsif\|else\)\>'
|
||||
let ind = ind + offset
|
||||
if vverb
|
||||
echo vverb_str "Indent after a `ifdef or `else statement."
|
||||
echo vverb_str "Indent after a `ifdef or `ifndef or `elsif or `else statement."
|
||||
endif
|
||||
|
||||
endif
|
||||
@@ -175,7 +178,8 @@ function GetVerilogIndent()
|
||||
" De-indent on the end of the block
|
||||
" join/end/endcase/endfunction/endtask/endspecify
|
||||
if curr_line =~ '^\s*\<\(join\|end\|endcase\)\>' ||
|
||||
\ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\)\>'
|
||||
\ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\)\>' ||
|
||||
\ curr_line =~ '^\s*\<\(endconfig\|endgenerate\|endprimitive\|endtable\)\>'
|
||||
let ind = ind - offset
|
||||
if vverb | echo vverb_str "De-indent the end of a block." | endif
|
||||
elseif curr_line =~ '^\s*\<endmodule\>'
|
||||
@@ -186,7 +190,7 @@ function GetVerilogIndent()
|
||||
|
||||
" De-indent on a stand-alone 'begin'
|
||||
elseif curr_line =~ '^\s*\<begin\>'
|
||||
if last_line !~ '^\s*\<\(function\|task\|specify\|module\)\>' &&
|
||||
if last_line !~ '^\s*\<\(function\|task\|specify\|module\|config\|generate\|primitive\|table\)\>' &&
|
||||
\ last_line !~ '^\s*\()*\s*;\|)\+\)\s*' . vlog_comment . '*$' &&
|
||||
\ ( last_line =~
|
||||
\ '\<\(`\@<!if\|`\@<!else\|for\|case\%[[zx]]\|always\|initial\)\>' ||
|
||||
@@ -208,10 +212,10 @@ function GetVerilogIndent()
|
||||
echo vverb_str "De-indent the end of a multiple statement."
|
||||
endif
|
||||
|
||||
" De-indent `else and `endif
|
||||
elseif curr_line =~ '^\s*`\<\(else\|endif\)\>'
|
||||
" De-indent `elsif or `else or `endif
|
||||
elseif curr_line =~ '^\s*`\<\(elsif\|else\|endif\)\>'
|
||||
let ind = ind - offset
|
||||
if vverb | echo vverb_str "De-indent `else and `endif statement." | endif
|
||||
if vverb | echo vverb_str "De-indent `elsif or `else or `endif statement." | endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Menu translations for Catalan
|
||||
"
|
||||
" Maintainer: Ernest Adrogué <eadrogue@gmx.net>
|
||||
" Last Change: 6 Jun 2008
|
||||
" Last Change: 26 Jul 2017
|
||||
"
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
@@ -70,9 +70,9 @@ menutrans Settings\ &Window Fin&estra\ d'opcions
|
||||
menutrans Startup\ &Settings Opcions\ i&nicials
|
||||
menutrans &Global\ Settings Opcions\ &globals
|
||||
" submenú Edita/Opcions Globals
|
||||
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Ressalt\ de\ &patrons<Tab>:set\ hls!
|
||||
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Ressaltat\ de\ &patrons<Tab>:set\ hls!
|
||||
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! Sensibilitat\ a\ les\ ma&júscules<Tab>:set\ ic!
|
||||
menutrans Toggle\ &Showmatch<Tab>:set\ sm! &Ressalt\ de\ coincidències<Tab>:set\ sm!
|
||||
menutrans Toggle\ &Showmatch<Tab>:set\ sm! &Ressaltat\ de\ coincidències<Tab>:set\ sm!
|
||||
menutrans &Context\ lines Línies\ de\ co&ntext
|
||||
menutrans &Virtual\ Edit Edició\ &virtual
|
||||
" submenú Edita/Opcions Globals/Edició virtual
|
||||
@@ -191,7 +191,7 @@ menutrans &Diff &Difer
|
||||
menutrans &Update &Actualitza
|
||||
menutrans &Get\ Block &Obtingues\ un\ bloc
|
||||
menutrans &Put\ Block &Posa\ un\ bloc
|
||||
menutrans &Make<Tab>:make Crida\ a\ &make<Tab>:make
|
||||
menutrans &Make<Tab>:make Crida\ &make<Tab>:make
|
||||
menutrans &List\ Errors<Tab>:cl Llista\ d'&errors<Tab>:cl
|
||||
menutrans L&ist\ Messages<Tab>:cl! &Llista\ de\ missatges<Tab>:cl!
|
||||
menutrans &Next\ Error<Tab>:cn Error\ se&güent<Tab>:cn
|
||||
@@ -203,8 +203,7 @@ menutrans Error\ &Window F&inestra\ d'errors
|
||||
menutrans &Update<Tab>:cwin &Actualitza<Tab>:cwin
|
||||
menutrans &Open<Tab>:copen &Obre<Tab>:copen
|
||||
menutrans &Close<Tab>:cclose &Tanca<Tab>:cclose
|
||||
menutrans &Set\ Compiler &Compilador
|
||||
menutrans &SeT\ Compiler &Compilador
|
||||
menutrans Se&t\ Compiler &Compilador
|
||||
menutrans &Convert\ to\ HEX<Tab>:%!xxd Converteix\ a\ &HEX<Tab>:%!xxd
|
||||
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Torna\ al\ format\ &original<Tab>:%!xxd\ -r
|
||||
|
||||
@@ -303,14 +302,14 @@ menutrans &Syntax &Sintaxi
|
||||
menutrans &Manual &Manual
|
||||
menutrans A&utomatic A&utomàtica
|
||||
menutrans on/off\ for\ &This\ file Activa/Desactiva\ en\ &aquest\ fitxer
|
||||
menutrans &Show\ filetypes\ in\ menu Mostra\ tots\ els\ &tipus\ al\ menú
|
||||
menutrans &Show\ File\ Types\ in\ Menu Mostra\ tots\ els\ &tipus\ al\ menú
|
||||
menutrans &Off &Desactiva
|
||||
menutrans Co&lor\ test Prova\ dels\ &colors
|
||||
menutrans &Highlight\ test Prova\ del\ &ressalt
|
||||
menutrans &Highlight\ test Prova\ del\ &ressaltat
|
||||
menutrans &Convert\ to\ HTML Converteix\ a\ &HTML
|
||||
menutrans Assembly Ensamblador
|
||||
menutrans Config Configuració
|
||||
menutrans Set\ '&syntax'\ only Només\ el\ ressalt\ de\ sintaxi
|
||||
menutrans Set\ '&syntax'\ only Només\ el\ ressaltat\ de\ sintaxi
|
||||
menutrans Set\ '&filetype'\ too Carrega\ també\ els\ plugins
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
|
||||
+15
-12
@@ -1,20 +1,17 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Jul 15
|
||||
" Last Change: 2017 Aug 19
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
if bufwinnr("option-window") > 0
|
||||
let s:thiswin = winnr()
|
||||
while 1
|
||||
if @% == "option-window"
|
||||
let buf = bufnr('option-window')
|
||||
if buf >= 0
|
||||
let winids = win_findbuf(buf)
|
||||
if len(winids) > 0
|
||||
if win_gotoid(winids[0]) == 1
|
||||
finish
|
||||
endif
|
||||
wincmd w
|
||||
if s:thiswin == winnr()
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
endif
|
||||
endif
|
||||
|
||||
" Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would
|
||||
@@ -141,8 +138,8 @@ while exists("b:current_syntax") && b:current_syntax == "help"
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" Open the window
|
||||
new option-window
|
||||
" Open the window. $OPTWIN_CMD is set to "tab" for ":tab options".
|
||||
exe $OPTWIN_CMD . ' new option-window'
|
||||
setlocal ts=15 tw=0 noro buftype=nofile
|
||||
|
||||
" Insert help and a "set" command for each option.
|
||||
@@ -513,6 +510,10 @@ if has("terminal")
|
||||
call append("$", "termkey\tkey that precedes Vim commands in a terminal window")
|
||||
call append("$", "\t(local to window)")
|
||||
call <SID>OptionL("tk")
|
||||
if exists("&winptydll")
|
||||
call append("$", "winptydll\tname of the winpty dynamic library")
|
||||
call <SID>OptionG("winptydll", &winptydll)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -1323,6 +1324,8 @@ endif
|
||||
if has("viminfo")
|
||||
call append("$", "viminfo\tlist that specifies what to write in the viminfo file")
|
||||
call <SID>OptionG("vi", &vi)
|
||||
call append("$", "viminfofile\tfile name used for the viminfo file")
|
||||
call <SID>OptionG("vif", &vif)
|
||||
endif
|
||||
if has("quickfix")
|
||||
call append("$", "bufhidden\twhat happens with a buffer when it's no longer in a window")
|
||||
|
||||
@@ -0,0 +1,293 @@
|
||||
" Debugger plugin using gdb.
|
||||
"
|
||||
" WORK IN PROGRESS - much doesn't work yet
|
||||
"
|
||||
" Open two visible terminal windows:
|
||||
" 1. run a pty, as with ":term NONE"
|
||||
" 2. run gdb, passing the pty
|
||||
" The current window is used to view source code and follows gdb.
|
||||
"
|
||||
" A third terminal window is hidden, it is used for communication with gdb.
|
||||
"
|
||||
" The communication with gdb uses GDB/MI. See:
|
||||
" https://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI.html
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies, see ":help license"
|
||||
|
||||
" The command that starts debugging, e.g. ":Termdebug vim".
|
||||
" To end type "quit" in the gdb window.
|
||||
command -nargs=* -complete=file Termdebug call s:StartDebug(<q-args>)
|
||||
|
||||
" Name of the gdb command, defaults to "gdb".
|
||||
if !exists('termdebugger')
|
||||
let termdebugger = 'gdb'
|
||||
endif
|
||||
|
||||
" Sign used to highlight the line where the program has stopped.
|
||||
" There can be only one.
|
||||
sign define debugPC linehl=debugPC
|
||||
let s:pc_id = 12
|
||||
let s:break_id = 13
|
||||
|
||||
" Sign used to indicate a breakpoint.
|
||||
" Can be used multiple times.
|
||||
sign define debugBreakpoint text=>> texthl=debugBreakpoint
|
||||
|
||||
if &background == 'light'
|
||||
hi default debugPC term=reverse ctermbg=lightblue guibg=lightblue
|
||||
else
|
||||
hi default debugPC term=reverse ctermbg=darkblue guibg=darkblue
|
||||
endif
|
||||
hi default debugBreakpoint term=reverse ctermbg=red guibg=red
|
||||
|
||||
func s:StartDebug(cmd)
|
||||
let s:startwin = win_getid(winnr())
|
||||
let s:startsigncolumn = &signcolumn
|
||||
|
||||
" Open a terminal window without a job, to run the debugged program
|
||||
let s:ptybuf = term_start('NONE', {
|
||||
\ 'term_name': 'gdb program',
|
||||
\ })
|
||||
if s:ptybuf == 0
|
||||
echoerr 'Failed to open the program terminal window'
|
||||
return
|
||||
endif
|
||||
let pty = job_info(term_getjob(s:ptybuf))['tty_out']
|
||||
let s:ptywin = win_getid(winnr())
|
||||
|
||||
" Create a hidden terminal window to communicate with gdb
|
||||
let s:commbuf = term_start('NONE', {
|
||||
\ 'term_name': 'gdb communication',
|
||||
\ 'out_cb': function('s:CommOutput'),
|
||||
\ 'hidden': 1,
|
||||
\ })
|
||||
if s:commbuf == 0
|
||||
echoerr 'Failed to open the communication terminal window'
|
||||
exe 'bwipe! ' . s:ptybuf
|
||||
return
|
||||
endif
|
||||
let commpty = job_info(term_getjob(s:commbuf))['tty_out']
|
||||
|
||||
" Open a terminal window to run the debugger.
|
||||
let cmd = [g:termdebugger, '-tty', pty, a:cmd]
|
||||
echomsg 'executing "' . join(cmd) . '"'
|
||||
let gdbbuf = term_start(cmd, {
|
||||
\ 'exit_cb': function('s:EndDebug'),
|
||||
\ 'term_finish': 'close',
|
||||
\ })
|
||||
if gdbbuf == 0
|
||||
echoerr 'Failed to open the gdb terminal window'
|
||||
exe 'bwipe! ' . s:ptybuf
|
||||
exe 'bwipe! ' . s:commbuf
|
||||
return
|
||||
endif
|
||||
let s:gdbwin = win_getid(winnr())
|
||||
|
||||
" Connect gdb to the communication pty, using the GDB/MI interface
|
||||
call term_sendkeys(gdbbuf, 'new-ui mi ' . commpty . "\r")
|
||||
|
||||
" Install debugger commands in the text window.
|
||||
call win_gotoid(s:startwin)
|
||||
call s:InstallCommands()
|
||||
call win_gotoid(s:gdbwin)
|
||||
|
||||
let s:breakpoints = {}
|
||||
endfunc
|
||||
|
||||
func s:EndDebug(job, status)
|
||||
exe 'bwipe! ' . s:ptybuf
|
||||
exe 'bwipe! ' . s:commbuf
|
||||
|
||||
let curwinid = win_getid(winnr())
|
||||
|
||||
call win_gotoid(s:startwin)
|
||||
let &signcolumn = s:startsigncolumn
|
||||
call s:DeleteCommands()
|
||||
|
||||
call win_gotoid(curwinid)
|
||||
endfunc
|
||||
|
||||
" Handle a message received from gdb on the GDB/MI interface.
|
||||
func s:CommOutput(chan, msg)
|
||||
let msgs = split(a:msg, "\r")
|
||||
|
||||
for msg in msgs
|
||||
" remove prefixed NL
|
||||
if msg[0] == "\n"
|
||||
let msg = msg[1:]
|
||||
endif
|
||||
if msg != ''
|
||||
if msg =~ '^\*\(stopped\|running\)'
|
||||
call s:HandleCursor(msg)
|
||||
elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,'
|
||||
call s:HandleNewBreakpoint(msg)
|
||||
elseif msg =~ '^=breakpoint-deleted,'
|
||||
call s:HandleBreakpointDelete(msg)
|
||||
elseif msg =~ '^\^done,value='
|
||||
call s:HandleEvaluate(msg)
|
||||
elseif msg =~ '^\^error,msg='
|
||||
call s:HandleError(msg)
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
" Install commands in the current window to control the debugger.
|
||||
func s:InstallCommands()
|
||||
command Break call s:SetBreakpoint()
|
||||
command Delete call s:DeleteBreakpoint()
|
||||
command Step call s:SendCommand('-exec-step')
|
||||
command Over call s:SendCommand('-exec-next')
|
||||
command Finish call s:SendCommand('-exec-finish')
|
||||
command Continue call s:SendCommand('-exec-continue')
|
||||
command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>)
|
||||
command Gdb call win_gotoid(s:gdbwin)
|
||||
command Program call win_gotoid(s:ptywin)
|
||||
|
||||
" TODO: can the K mapping be restored?
|
||||
nnoremap K :Evaluate<CR>
|
||||
endfunc
|
||||
|
||||
" Delete installed debugger commands in the current window.
|
||||
func s:DeleteCommands()
|
||||
delcommand Break
|
||||
delcommand Delete
|
||||
delcommand Step
|
||||
delcommand Over
|
||||
delcommand Finish
|
||||
delcommand Continue
|
||||
delcommand Evaluate
|
||||
delcommand Gdb
|
||||
delcommand Program
|
||||
|
||||
nunmap K
|
||||
sign undefine debugPC
|
||||
sign undefine debugBreakpoint
|
||||
exe 'sign unplace ' . s:pc_id
|
||||
for key in keys(s:breakpoints)
|
||||
exe 'sign unplace ' . (s:break_id + key)
|
||||
endfor
|
||||
unlet s:breakpoints
|
||||
endfunc
|
||||
|
||||
" :Break - Set a breakpoint at the cursor position.
|
||||
func s:SetBreakpoint()
|
||||
call term_sendkeys(s:commbuf, '-break-insert --source '
|
||||
\ . fnameescape(expand('%:p')) . ' --line ' . line('.') . "\r")
|
||||
endfunc
|
||||
|
||||
" :Delete - Delete a breakpoint at the cursor position.
|
||||
func s:DeleteBreakpoint()
|
||||
let fname = fnameescape(expand('%:p'))
|
||||
let lnum = line('.')
|
||||
for [key, val] in items(s:breakpoints)
|
||||
if val['fname'] == fname && val['lnum'] == lnum
|
||||
call term_sendkeys(s:commbuf, '-break-delete ' . key . "\r")
|
||||
" Assume this always wors, the reply is simply "^done".
|
||||
exe 'sign unplace ' . (s:break_id + key)
|
||||
unlet s:breakpoints[key]
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
" :Next, :Continue, etc - send a command to gdb
|
||||
func s:SendCommand(cmd)
|
||||
call term_sendkeys(s:commbuf, a:cmd . "\r")
|
||||
endfunc
|
||||
|
||||
" :Evaluate - evaluate what is under the cursor
|
||||
func s:Evaluate(range, arg)
|
||||
if a:arg != ''
|
||||
let expr = a:arg
|
||||
elseif a:range == 2
|
||||
let pos = getcurpos()
|
||||
let reg = getreg('v', 1, 1)
|
||||
let regt = getregtype('v')
|
||||
normal! gv"vy
|
||||
let expr = @v
|
||||
call setpos('.', pos)
|
||||
call setreg('v', reg, regt)
|
||||
else
|
||||
let expr = expand('<cexpr>')
|
||||
endif
|
||||
call term_sendkeys(s:commbuf, '-data-evaluate-expression "' . expr . "\"\r")
|
||||
let s:evalexpr = expr
|
||||
endfunc
|
||||
|
||||
" Handle the result of data-evaluate-expression
|
||||
func s:HandleEvaluate(msg)
|
||||
echomsg '"' . s:evalexpr . '": ' . substitute(a:msg, '.*value="\(.*\)"', '\1', '')
|
||||
endfunc
|
||||
|
||||
" Handle an error.
|
||||
func s:HandleError(msg)
|
||||
echoerr substitute(a:msg, '.*msg="\(.*\)"', '\1', '')
|
||||
endfunc
|
||||
|
||||
" Handle stopping and running message from gdb.
|
||||
" Will update the sign that shows the current position.
|
||||
func s:HandleCursor(msg)
|
||||
let wid = win_getid(winnr())
|
||||
|
||||
if win_gotoid(s:startwin)
|
||||
if a:msg =~ '^\*stopped'
|
||||
let fname = substitute(a:msg, '.*fullname="\([^"]*\)".*', '\1', '')
|
||||
let lnum = substitute(a:msg, '.*line="\([^"]*\)".*', '\1', '')
|
||||
if lnum =~ '^[0-9]*$'
|
||||
if expand('%:h') != fname
|
||||
if &modified
|
||||
" TODO: find existing window
|
||||
exe 'split ' . fnameescape(fname)
|
||||
let s:startwin = win_getid(winnr())
|
||||
else
|
||||
exe 'edit ' . fnameescape(fname)
|
||||
endif
|
||||
endif
|
||||
exe lnum
|
||||
exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC file=' . fnameescape(fname)
|
||||
setlocal signcolumn=yes
|
||||
endif
|
||||
else
|
||||
exe 'sign unplace ' . s:pc_id
|
||||
endif
|
||||
|
||||
call win_gotoid(wid)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Handle setting a breakpoint
|
||||
" Will update the sign that shows the breakpoint
|
||||
func s:HandleNewBreakpoint(msg)
|
||||
let nr = substitute(a:msg, '.*number="\([0-9]\)*\".*', '\1', '') + 0
|
||||
if nr == 0
|
||||
return
|
||||
endif
|
||||
|
||||
if has_key(s:breakpoints, nr)
|
||||
let entry = s:breakpoints[nr]
|
||||
else
|
||||
let entry = {}
|
||||
let s:breakpoints[nr] = entry
|
||||
endif
|
||||
|
||||
let fname = substitute(a:msg, '.*fullname="\([^"]*\)".*', '\1', '')
|
||||
let lnum = substitute(a:msg, '.*line="\([^"]*\)".*', '\1', '')
|
||||
|
||||
exe 'sign place ' . (s:break_id + nr) . ' line=' . lnum . ' name=debugBreakpoint file=' . fnameescape(fname)
|
||||
|
||||
let entry['fname'] = fname
|
||||
let entry['lnum'] = lnum
|
||||
endfunc
|
||||
|
||||
" Handle deleting a breakpoint
|
||||
" Will remove the sign that shows the breakpoint
|
||||
func s:HandleBreakpointDelete(msg)
|
||||
let nr = substitute(a:msg, '.*id="\([0-9]*\)\".*', '\1', '') + 0
|
||||
if nr == 0
|
||||
return
|
||||
endif
|
||||
exe 'sign unplace ' . (s:break_id + nr)
|
||||
unlet s:breakpoints[nr]
|
||||
endfunc
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types in scripts
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2017 Jun 11
|
||||
" Last change: 2017 Aug 27
|
||||
|
||||
" This file is called by an autocommand for every file that has just been
|
||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||
@@ -306,7 +306,7 @@ else
|
||||
set ft=virata
|
||||
|
||||
" Strace
|
||||
elseif s:line1 =~# '^\(\[pid \d\+\] \)\=[0-9:.]* *execve(' || s:line1 =~# '^__libc_start_main'
|
||||
elseif s:line1 =~# '[0-9:.]* *execve(' || s:line1 =~# '^__libc_start_main'
|
||||
set ft=strace
|
||||
|
||||
" VSE JCL
|
||||
|
||||
@@ -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: 2017 Aug 18
|
||||
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debcontrol.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -21,8 +21,8 @@ syn case match
|
||||
syn match debcontrolElse "^.*$"
|
||||
|
||||
" Common seperators
|
||||
syn match debControlComma ", *"
|
||||
syn match debControlSpace " "
|
||||
syn match debControlComma ",[ \t]*"
|
||||
syn match debControlSpace "[ \t]"
|
||||
|
||||
let s:kernels = '\%(linux\|hurd\|kfreebsd\|knetbsd\|kopensolaris\|netbsd\)'
|
||||
let s:archs = '\%(alpha\|amd64\|armeb\|armel\|armhf\|arm64\|avr32\|hppa\|i386'
|
||||
@@ -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|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 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%(script)=|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"
|
||||
@@ -60,7 +60,7 @@ syn match debcontrolComment "^#.*$" contains=@Spell
|
||||
syn case ignore
|
||||
|
||||
" List of all legal keys
|
||||
syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\): *"
|
||||
syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\|\%(XS-\)\=Testsuite\): *"
|
||||
|
||||
syn match debcontrolDeprecatedKey contained "^\%(\%(XS-\)\=DM-Upload-Allowed\): *"
|
||||
|
||||
@@ -79,9 +79,9 @@ syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=deb
|
||||
syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolDeprecatedKey,debcontrolDmUpload oneline
|
||||
|
||||
" Catch-all for the other legal fields
|
||||
syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
|
||||
syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment
|
||||
syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell
|
||||
syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
|
||||
syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Uploaders\|Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment
|
||||
syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell
|
||||
|
||||
" Associate our matches and regions with pretty colours
|
||||
hi def link debcontrolKey Keyword
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: none; used to see highlighting
|
||||
" Maintainer: Ronald Schild <rs@scutum.de>
|
||||
" Last Change: 2001 Sep 02
|
||||
" Last Change: 2017 Jul 28
|
||||
" Version: 5.4n.1
|
||||
|
||||
" To see your current highlight settings, do
|
||||
@@ -111,17 +111,6 @@ endif
|
||||
nohlsearch
|
||||
normal 0
|
||||
|
||||
" add autocommands to remove temporary file from buffer list
|
||||
aug highlighttest
|
||||
au!
|
||||
au BufUnload Highlight\ test if expand("<afile>") == "Highlight test"
|
||||
au BufUnload Highlight\ test bdelete! Highlight\ test
|
||||
au BufUnload Highlight\ test endif
|
||||
au VimLeavePre * if bufexists("Highlight test")
|
||||
au VimLeavePre * bdelete! Highlight\ test
|
||||
au VimLeavePre * endif
|
||||
aug END
|
||||
|
||||
" we don't want to save this temporary file
|
||||
set nomodified
|
||||
|
||||
|
||||
+19
-19
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Murphi model checking language
|
||||
" Maintainer: Matthew Fernandez <matthew.fernandez@gmail.com>
|
||||
" Last Change: 2017 May 3
|
||||
" Last Change: 2017 Aug 27
|
||||
" Version: 2
|
||||
" Remark: Originally authored by Diego Ongaro <ongaro@cs.stanford.edu>
|
||||
|
||||
@@ -105,23 +105,23 @@ syn region murphiComment start="--" end="$" contains=murphiTodo
|
||||
syn region murphiComment start="/\*" end="\*/" contains=murphiTodo
|
||||
|
||||
" Link the rules to some groups.
|
||||
highlight link murphiComment Comment
|
||||
highlight link murphiString String
|
||||
highlight link murphiNumber Number
|
||||
highlight link murphiBoolean Boolean
|
||||
highlight link murphiIdentifier Identifier
|
||||
highlight link murphiFunction Function
|
||||
highlight link murphiStatement Statement
|
||||
highlight link murphiConditional Conditional
|
||||
highlight link murphiRepeat Repeat
|
||||
highlight link murphiLabel Label
|
||||
highlight link murphiOperator Operator
|
||||
highlight link murphiKeyword Keyword
|
||||
highlight link murphiType Type
|
||||
highlight link murphiStructure Structure
|
||||
highlight link murphiSpecial Special
|
||||
highlight link murphiDelimiter Delimiter
|
||||
highlight link murphiError Error
|
||||
highlight link murphiTodo Todo
|
||||
hi def link murphiComment Comment
|
||||
hi def link murphiString String
|
||||
hi def link murphiNumber Number
|
||||
hi def link murphiBoolean Boolean
|
||||
hi def link murphiIdentifier Identifier
|
||||
hi def link murphiFunction Function
|
||||
hi def link murphiStatement Statement
|
||||
hi def link murphiConditional Conditional
|
||||
hi def link murphiRepeat Repeat
|
||||
hi def link murphiLabel Label
|
||||
hi def link murphiOperator Operator
|
||||
hi def link murphiKeyword Keyword
|
||||
hi def link murphiType Type
|
||||
hi def link murphiStructure Structure
|
||||
hi def link murphiSpecial Special
|
||||
hi def link murphiDelimiter Delimiter
|
||||
hi def link murphiError Error
|
||||
hi def link murphiTodo Todo
|
||||
|
||||
let b:current_syntax = "murphi"
|
||||
|
||||
@@ -0,0 +1,434 @@
|
||||
" Vim syntax file
|
||||
" Language: N1QL / Couchbase Server
|
||||
" Maintainer: Eugene Ciurana <n1ql AT cime.net>
|
||||
" Version: 1.0
|
||||
" Source: https://github.com/pr3d4t0r/n1ql-vim-syntax
|
||||
"
|
||||
" License: Vim is Charityware. n1ql.vim syntax is Charityware.
|
||||
" (c) Copyright 2017 by Eugene Ciurana / pr3d4t0r. Licensed
|
||||
" under the standard VIM LICENSE - Vim command :help uganda.txt
|
||||
" for details.
|
||||
"
|
||||
" Questions, comments: <n1ql AT cime.net>
|
||||
" https://ciurana.eu/pgp, https://keybase.io/pr3d4t0r
|
||||
"
|
||||
" vim: set fileencoding=utf-8:
|
||||
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn keyword n1qlSpecial DATASTORES
|
||||
syn keyword n1qlSpecial DUAL
|
||||
syn keyword n1qlSpecial FALSE
|
||||
syn keyword n1qlSpecial INDEXES
|
||||
syn keyword n1qlSpecial KEYSPACES
|
||||
syn keyword n1qlSpecial MISSING
|
||||
syn keyword n1qlSpecial NAMESPACES
|
||||
syn keyword n1qlSpecial NULL
|
||||
syn keyword n1qlSpecial TRUE
|
||||
|
||||
|
||||
"
|
||||
" *** keywords ***
|
||||
"
|
||||
syn keyword n1qlKeyword ALL
|
||||
syn keyword n1qlKeyword ANY
|
||||
syn keyword n1qlKeyword ASC
|
||||
syn keyword n1qlKeyword BEGIN
|
||||
syn keyword n1qlKeyword BETWEEN
|
||||
syn keyword n1qlKeyword BREAK
|
||||
syn keyword n1qlKeyword BUCKET
|
||||
syn keyword n1qlKeyword CALL
|
||||
syn keyword n1qlKeyword CASE
|
||||
syn keyword n1qlKeyword CAST
|
||||
syn keyword n1qlKeyword CLUSTER
|
||||
syn keyword n1qlKeyword COLLATE
|
||||
syn keyword n1qlKeyword COLLECTION
|
||||
syn keyword n1qlKeyword CONNECT
|
||||
syn keyword n1qlKeyword CONTINUE
|
||||
syn keyword n1qlKeyword CORRELATE
|
||||
syn keyword n1qlKeyword COVER
|
||||
syn keyword n1qlKeyword DATABASE
|
||||
syn keyword n1qlKeyword DATASET
|
||||
syn keyword n1qlKeyword DATASTORE
|
||||
syn keyword n1qlKeyword DECLARE
|
||||
syn keyword n1qlKeyword DECREMENT
|
||||
syn keyword n1qlKeyword DERIVED
|
||||
syn keyword n1qlKeyword DESC
|
||||
syn keyword n1qlKeyword DESCRIBE
|
||||
syn keyword n1qlKeyword DO
|
||||
syn keyword n1qlKeyword EACH
|
||||
syn keyword n1qlKeyword ELEMENT
|
||||
syn keyword n1qlKeyword ELSE
|
||||
syn keyword n1qlKeyword END
|
||||
syn keyword n1qlKeyword EVERY
|
||||
syn keyword n1qlKeyword EXCLUDE
|
||||
syn keyword n1qlKeyword EXISTS
|
||||
syn keyword n1qlKeyword FETCH
|
||||
syn keyword n1qlKeyword FIRST
|
||||
syn keyword n1qlKeyword FLATTEN
|
||||
syn keyword n1qlKeyword FOR
|
||||
syn keyword n1qlKeyword FORCE
|
||||
syn keyword n1qlKeyword FROM
|
||||
syn keyword n1qlKeyword FUNCTION
|
||||
syn keyword n1qlKeyword GROUP
|
||||
syn keyword n1qlKeyword GSI
|
||||
syn keyword n1qlKeyword HAVING
|
||||
syn keyword n1qlKeyword IF
|
||||
syn keyword n1qlKeyword IGNORE
|
||||
syn keyword n1qlKeyword INCLUDE
|
||||
syn keyword n1qlKeyword INCREMENT
|
||||
syn keyword n1qlKeyword INDEX
|
||||
syn keyword n1qlKeyword INITIAL
|
||||
syn keyword n1qlKeyword INLINE
|
||||
syn keyword n1qlKeyword INNER
|
||||
syn keyword n1qlKeyword INTO
|
||||
syn keyword n1qlKeyword KEY
|
||||
syn keyword n1qlKeyword KEYS
|
||||
syn keyword n1qlKeyword KEYSPACE
|
||||
syn keyword n1qlKeyword KNOWN
|
||||
syn keyword n1qlKeyword LAST
|
||||
syn keyword n1qlKeyword LET
|
||||
syn keyword n1qlKeyword LETTING
|
||||
syn keyword n1qlKeyword LIMIT
|
||||
syn keyword n1qlKeyword LOOP
|
||||
syn keyword n1qlKeyword LSM
|
||||
syn keyword n1qlKeyword MAP
|
||||
syn keyword n1qlKeyword MAPPING
|
||||
syn keyword n1qlKeyword MATCHED
|
||||
syn keyword n1qlKeyword MATERIALIZED
|
||||
syn keyword n1qlKeyword MERGE
|
||||
syn keyword n1qlKeyword NAMESPACE
|
||||
syn keyword n1qlKeyword NEST
|
||||
syn keyword n1qlKeyword OPTION
|
||||
syn keyword n1qlKeyword ORDER
|
||||
syn keyword n1qlKeyword OUTER
|
||||
syn keyword n1qlKeyword OVER
|
||||
syn keyword n1qlKeyword PARSE
|
||||
syn keyword n1qlKeyword PARTITION
|
||||
syn keyword n1qlKeyword PASSWORD
|
||||
syn keyword n1qlKeyword PATH
|
||||
syn keyword n1qlKeyword POOL
|
||||
syn keyword n1qlKeyword PRIMARY
|
||||
syn keyword n1qlKeyword PRIVATE
|
||||
syn keyword n1qlKeyword PRIVILEGE
|
||||
syn keyword n1qlKeyword PROCEDURE
|
||||
syn keyword n1qlKeyword PUBLIC
|
||||
syn keyword n1qlKeyword REALM
|
||||
syn keyword n1qlKeyword REDUCE
|
||||
syn keyword n1qlKeyword RETURN
|
||||
syn keyword n1qlKeyword RETURNING
|
||||
syn keyword n1qlKeyword ROLE
|
||||
syn keyword n1qlKeyword SATISFIES
|
||||
syn keyword n1qlKeyword SCHEMA
|
||||
syn keyword n1qlKeyword SELF
|
||||
syn keyword n1qlKeyword SEMI
|
||||
syn keyword n1qlKeyword SHOW
|
||||
syn keyword n1qlKeyword START
|
||||
syn keyword n1qlKeyword STATISTICS
|
||||
syn keyword n1qlKeyword SYSTEM
|
||||
syn keyword n1qlKeyword THEN
|
||||
syn keyword n1qlKeyword TRANSACTION
|
||||
syn keyword n1qlKeyword TRIGGER
|
||||
syn keyword n1qlKeyword UNDER
|
||||
syn keyword n1qlKeyword UNKNOWN
|
||||
syn keyword n1qlKeyword UNSET
|
||||
syn keyword n1qlKeyword USE
|
||||
syn keyword n1qlKeyword USER
|
||||
syn keyword n1qlKeyword USING
|
||||
syn keyword n1qlKeyword VALIDATE
|
||||
syn keyword n1qlKeyword VALUE
|
||||
syn keyword n1qlKeyword VALUED
|
||||
syn keyword n1qlKeyword VALUES
|
||||
syn keyword n1qlKeyword VIEW
|
||||
syn keyword n1qlKeyword WHEN
|
||||
syn keyword n1qlKeyword WHERE
|
||||
syn keyword n1qlKeyword WHILE
|
||||
syn keyword n1qlKeyword WITHIN
|
||||
syn keyword n1qlKeyword WORK
|
||||
|
||||
|
||||
"
|
||||
" *** functions ***
|
||||
"
|
||||
syn keyword n1qlOperator ABS
|
||||
syn keyword n1qlOperator ACOS
|
||||
syn keyword n1qlOperator ARRAY_AGG
|
||||
syn keyword n1qlOperator ARRAY_APPEND
|
||||
syn keyword n1qlOperator ARRAY_AVG
|
||||
syn keyword n1qlOperator ARRAY_CONCAT
|
||||
syn keyword n1qlOperator ARRAY_CONTAINS
|
||||
syn keyword n1qlOperator ARRAY_COUNT
|
||||
syn keyword n1qlOperator ARRAY_DISTINCT
|
||||
syn keyword n1qlOperator ARRAY_FLATTEN
|
||||
syn keyword n1qlOperator ARRAY_IFNULL
|
||||
syn keyword n1qlOperator ARRAY_INSERT
|
||||
syn keyword n1qlOperator ARRAY_INTERSECT
|
||||
syn keyword n1qlOperator ARRAY_LENGTH
|
||||
syn keyword n1qlOperator ARRAY_MAX
|
||||
syn keyword n1qlOperator ARRAY_MIN
|
||||
syn keyword n1qlOperator ARRAY_POSITION
|
||||
syn keyword n1qlOperator ARRAY_PREPEND
|
||||
syn keyword n1qlOperator ARRAY_PUT
|
||||
syn keyword n1qlOperator ARRAY_RANGE
|
||||
syn keyword n1qlOperator ARRAY_REMOVE
|
||||
syn keyword n1qlOperator ARRAY_REPEAT
|
||||
syn keyword n1qlOperator ARRAY_REPLACE
|
||||
syn keyword n1qlOperator ARRAY_REVERSE
|
||||
syn keyword n1qlOperator ARRAY_SORT
|
||||
syn keyword n1qlOperator ARRAY_START
|
||||
syn keyword n1qlOperator ARRAY_SUM
|
||||
syn keyword n1qlOperator ARRAY_SYMDIFF
|
||||
syn keyword n1qlOperator ARRAY_UNION
|
||||
syn keyword n1qlOperator ASIN
|
||||
syn keyword n1qlOperator ATAN
|
||||
syn keyword n1qlOperator ATAN2
|
||||
syn keyword n1qlOperator AVG
|
||||
syn keyword n1qlOperator BASE64
|
||||
syn keyword n1qlOperator BASE64_DECODE
|
||||
syn keyword n1qlOperator BASE64_ENCODE
|
||||
syn keyword n1qlOperator CEIL
|
||||
syn keyword n1qlOperator CLOCK_LOCAL
|
||||
syn keyword n1qlOperator CLOCK_STR
|
||||
syn keyword n1qlOperator CLOCK_TZ
|
||||
syn keyword n1qlOperator CLOCK_UTC
|
||||
syn keyword n1qlOperator CLOCL_MILLIS
|
||||
syn keyword n1qlOperator CONTAINS
|
||||
syn keyword n1qlOperator COS
|
||||
syn keyword n1qlOperator COUNT
|
||||
syn keyword n1qlOperator DATE_ADD_MILLIS
|
||||
syn keyword n1qlOperator DATE_ADD_STR
|
||||
syn keyword n1qlOperator DATE_DIFF_MILLIS
|
||||
syn keyword n1qlOperator DATE_DIFF_STR
|
||||
syn keyword n1qlOperator DATE_FORMAT_STR
|
||||
syn keyword n1qlOperator DATE_PART_MILLIS
|
||||
syn keyword n1qlOperator DATE_PART_STR
|
||||
syn keyword n1qlOperator DATE_RANGE_MILLIS
|
||||
syn keyword n1qlOperator DATE_RANGE_STR
|
||||
syn keyword n1qlOperator DATE_TRUC_STR
|
||||
syn keyword n1qlOperator DATE_TRUNC_MILLIS
|
||||
syn keyword n1qlOperator DECODE_JSON
|
||||
syn keyword n1qlOperator DEGREES
|
||||
syn keyword n1qlOperator DURATION_TO_STR
|
||||
syn keyword n1qlOperator E
|
||||
syn keyword n1qlOperator ENCODED_SIZE
|
||||
syn keyword n1qlOperator ENCODE_JSON
|
||||
syn keyword n1qlOperator EXP
|
||||
syn keyword n1qlOperator FLOOR
|
||||
syn keyword n1qlOperator GREATEST
|
||||
syn keyword n1qlOperator IFINF
|
||||
syn keyword n1qlOperator IFMISSING
|
||||
syn keyword n1qlOperator IFMISSINGORNULL
|
||||
syn keyword n1qlOperator IFNAN
|
||||
syn keyword n1qlOperator IFNANORINF
|
||||
syn keyword n1qlOperator IFNULL
|
||||
syn keyword n1qlOperator INITCAP
|
||||
syn keyword n1qlOperator ISARRAY
|
||||
syn keyword n1qlOperator ISATOM
|
||||
syn keyword n1qlOperator ISBOOLEAN
|
||||
syn keyword n1qlOperator ISNUMBER
|
||||
syn keyword n1qlOperator ISOBJECT
|
||||
syn keyword n1qlOperator ISSTRING
|
||||
syn keyword n1qlOperator LEAST
|
||||
syn keyword n1qlOperator LENGTH
|
||||
syn keyword n1qlOperator LN
|
||||
syn keyword n1qlOperator LOG
|
||||
syn keyword n1qlOperator LOWER
|
||||
syn keyword n1qlOperator LTRIM
|
||||
syn keyword n1qlOperator MAX
|
||||
syn keyword n1qlOperator META
|
||||
syn keyword n1qlOperator MILLIS
|
||||
syn keyword n1qlOperator MILLIS_TO_LOCAL
|
||||
syn keyword n1qlOperator MILLIS_TO_STR
|
||||
syn keyword n1qlOperator MILLIS_TO_TZ
|
||||
syn keyword n1qlOperator MILLIS_TO_UTC
|
||||
syn keyword n1qlOperator MILLIS_TO_ZONE_NAME
|
||||
syn keyword n1qlOperator MIN
|
||||
syn keyword n1qlOperator MISSINGIF
|
||||
syn keyword n1qlOperator NANIF
|
||||
syn keyword n1qlOperator NEGINFIF
|
||||
syn keyword n1qlOperator NOW_LOCAL
|
||||
syn keyword n1qlOperator NOW_MILLIS
|
||||
syn keyword n1qlOperator NOW_STR
|
||||
syn keyword n1qlOperator NOW_TZ
|
||||
syn keyword n1qlOperator NOW_UTC
|
||||
syn keyword n1qlOperator NULLIF
|
||||
syn keyword n1qlOperator OBJECT_ADD
|
||||
syn keyword n1qlOperator OBJECT_CONCAT
|
||||
syn keyword n1qlOperator OBJECT_INNER_PAIRS
|
||||
syn keyword n1qlOperator OBJECT_INNER_VALUES
|
||||
syn keyword n1qlOperator OBJECT_LENGTH
|
||||
syn keyword n1qlOperator OBJECT_NAMES
|
||||
syn keyword n1qlOperator OBJECT_PAIRS
|
||||
syn keyword n1qlOperator OBJECT_PUT
|
||||
syn keyword n1qlOperator OBJECT_REMOVE
|
||||
syn keyword n1qlOperator OBJECT_RENAME
|
||||
syn keyword n1qlOperator OBJECT_REPLACE
|
||||
syn keyword n1qlOperator OBJECT_UNWRAP
|
||||
syn keyword n1qlOperator OBJECT_VALUES
|
||||
syn keyword n1qlOperator PI
|
||||
syn keyword n1qlOperator POLY_LENGTH
|
||||
syn keyword n1qlOperator POSINIF
|
||||
syn keyword n1qlOperator POSITION
|
||||
syn keyword n1qlOperator POWER
|
||||
syn keyword n1qlOperator RADIANS
|
||||
syn keyword n1qlOperator RANDOM
|
||||
syn keyword n1qlOperator REGEXP_CONTAINS
|
||||
syn keyword n1qlOperator REGEXP_LIKE
|
||||
syn keyword n1qlOperator REGEXP_POSITION
|
||||
syn keyword n1qlOperator REGEXP_REPLACE
|
||||
syn keyword n1qlOperator REPEAT
|
||||
syn keyword n1qlOperator REPLACE
|
||||
syn keyword n1qlOperator REVERSE
|
||||
syn keyword n1qlOperator ROUND
|
||||
syn keyword n1qlOperator RTRIM
|
||||
syn keyword n1qlOperator SIGN
|
||||
syn keyword n1qlOperator SIN
|
||||
syn keyword n1qlOperator SPLIT
|
||||
syn keyword n1qlOperator SQRT
|
||||
syn keyword n1qlOperator STR_TO_DURATION
|
||||
syn keyword n1qlOperator STR_TO_MILLIS
|
||||
syn keyword n1qlOperator STR_TO_TZ
|
||||
syn keyword n1qlOperator STR_TO_UTC
|
||||
syn keyword n1qlOperator STR_TO_ZONE_NAME
|
||||
syn keyword n1qlOperator SUBSTR
|
||||
syn keyword n1qlOperator SUFFIXES
|
||||
syn keyword n1qlOperator SUM
|
||||
syn keyword n1qlOperator TAN
|
||||
syn keyword n1qlOperator TITLE
|
||||
syn keyword n1qlOperator TOARRAY
|
||||
syn keyword n1qlOperator TOATOM
|
||||
syn keyword n1qlOperator TOBOOLEAN
|
||||
syn keyword n1qlOperator TOKENS
|
||||
syn keyword n1qlOperator TONUMBER
|
||||
syn keyword n1qlOperator TOOBJECT
|
||||
syn keyword n1qlOperator TOSTRING
|
||||
syn keyword n1qlOperator TRIM
|
||||
syn keyword n1qlOperator TRUNC
|
||||
syn keyword n1qlOperator TYPE
|
||||
syn keyword n1qlOperator UPPER
|
||||
syn keyword n1qlOperator UUID
|
||||
syn keyword n1qlOperator WEEKDAY_MILLIS
|
||||
syn keyword n1qlOperator WEEKDAY_STR
|
||||
|
||||
|
||||
"
|
||||
" *** operators ***
|
||||
"
|
||||
syn keyword n1qlOperator AND
|
||||
syn keyword n1qlOperator AS
|
||||
syn keyword n1qlOperator BY
|
||||
syn keyword n1qlOperator DISTINCT
|
||||
syn keyword n1qlOperator EXCEPT
|
||||
syn keyword n1qlOperator ILIKE
|
||||
syn keyword n1qlOperator IN
|
||||
syn keyword n1qlOperator INTERSECT
|
||||
syn keyword n1qlOperator IS
|
||||
syn keyword n1qlOperator JOIN
|
||||
syn keyword n1qlOperator LEFT
|
||||
syn keyword n1qlOperator LIKE
|
||||
syn keyword n1qlOperator MINUS
|
||||
syn keyword n1qlOperator NEST
|
||||
syn keyword n1qlOperator NESTING
|
||||
syn keyword n1qlOperator NOT
|
||||
syn keyword n1qlOperator OFFSET
|
||||
syn keyword n1qlOperator ON
|
||||
syn keyword n1qlOperator OR
|
||||
syn keyword n1qlOperator OUT
|
||||
syn keyword n1qlOperator RIGHT
|
||||
syn keyword n1qlOperator SOME
|
||||
syn keyword n1qlOperator TO
|
||||
syn keyword n1qlOperator UNION
|
||||
syn keyword n1qlOperator UNIQUE
|
||||
syn keyword n1qlOperator UNNEST
|
||||
syn keyword n1qlOperator VIA
|
||||
syn keyword n1qlOperator WITH
|
||||
syn keyword n1qlOperator XOR
|
||||
|
||||
|
||||
"
|
||||
" *** statements ***
|
||||
"
|
||||
syn keyword n1qlStatement ALTER
|
||||
syn keyword n1qlStatement ANALYZE
|
||||
syn keyword n1qlStatement BUILD
|
||||
syn keyword n1qlStatement COMMIT
|
||||
syn keyword n1qlStatement CREATE
|
||||
syn keyword n1qlStatement DELETE
|
||||
syn keyword n1qlStatement DROP
|
||||
syn keyword n1qlStatement EXECUTE
|
||||
syn keyword n1qlStatement EXPLAIN
|
||||
syn keyword n1qlStatement GRANT
|
||||
syn keyword n1qlStatement INFER
|
||||
syn keyword n1qlStatement INSERT
|
||||
syn keyword n1qlStatement MERGE
|
||||
syn keyword n1qlStatement PREPARE
|
||||
syn keyword n1qlStatement RENAME
|
||||
syn keyword n1qlStatement REVOKE
|
||||
syn keyword n1qlStatement ROLLBACK
|
||||
syn keyword n1qlStatement SELECT
|
||||
syn keyword n1qlStatement SET
|
||||
syn keyword n1qlStatement TRUNCATE
|
||||
syn keyword n1qlStatement UPDATE
|
||||
syn keyword n1qlStatement UPSERT
|
||||
|
||||
|
||||
"
|
||||
" *** types ***
|
||||
"
|
||||
syn keyword n1qlType ARRAY
|
||||
syn keyword n1qlType BINARY
|
||||
syn keyword n1qlType BOOLEAN
|
||||
syn keyword n1qlType NUMBER
|
||||
syn keyword n1qlType OBJECT
|
||||
syn keyword n1qlType RAW
|
||||
syn keyword n1qlType STRING
|
||||
|
||||
|
||||
"
|
||||
" *** strings and characters ***
|
||||
"
|
||||
syn region n1qlString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region n1qlString start=+'+ skip=+\\\\\|\\'+ end=+'+
|
||||
syn region n1qlBucketSpec start=+`+ skip=+\\\\\|\\'+ end=+`+
|
||||
|
||||
|
||||
"
|
||||
" *** numbers ***
|
||||
"
|
||||
syn match n1qlNumber "-\=\<\d*\.\=[0-9_]\>"
|
||||
|
||||
|
||||
"
|
||||
" *** comments ***
|
||||
"
|
||||
syn region n1qlComment start="/\*" end="\*/" contains=n1qlTODO
|
||||
syn match n1qlComment "--.*$" contains=n1qlTODO
|
||||
syn sync ccomment n1qlComment
|
||||
|
||||
|
||||
"
|
||||
" *** TODO ***
|
||||
"
|
||||
syn keyword n1qlTODO contained TODO FIXME XXX DEBUG NOTE
|
||||
|
||||
|
||||
"
|
||||
" *** enable ***
|
||||
"
|
||||
hi def link n1qlBucketSpec Underlined
|
||||
hi def link n1qlComment Comment
|
||||
hi def link n1qlKeyword Macro
|
||||
hi def link n1qlOperator Function
|
||||
hi def link n1qlSpecial Special
|
||||
hi def link n1qlStatement Statement
|
||||
hi def link n1qlString String
|
||||
hi def link n1qlTODO Todo
|
||||
hi def link n1qlType Type
|
||||
|
||||
let b:current_syntax = "n1ql"
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Zhen-Huan Hu <wildkeny@gmail.com>
|
||||
" Original Maintainer: James Kidd <james.kidd@covance.com>
|
||||
" Version: 3.0.0
|
||||
" Last Change: Mar 10, 2017
|
||||
" Last Change: Aug 26, 2017
|
||||
"
|
||||
" 2017 Mar 7
|
||||
"
|
||||
@@ -120,7 +120,7 @@ syn match sasDataStepStatement '\v%(^|;)\s*\zs%(dcl|declare)>' display contained
|
||||
syn match sasDataStepStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
syn match sasDataStepStatement '\v%(^|;)\s*\zs%(format|informat|input|put)>' display contained contains=sasDataStepStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty
|
||||
syn match sasDataStepStatement '\v%(^|;)\s*\zs%(cards|datalines|lines)4=\s*;' display contained contains=sasDataStepStatementKeyword nextgroup=sasDataLine skipwhite skipnl skipempty
|
||||
syn region sasDataLine start='^' end='^;'me=s-1 contained
|
||||
syn region sasDataLine start='^' end='^\s*;'me=s-1 contained
|
||||
syn region sasDataStep matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsdata>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,@sasDataStepSyntax
|
||||
syn cluster sasDataStepSyntax contains=sasDataStepFunction,sasDataStepHashOperator,sasDataStepHashAttribute,sasDataStepHashMethod,sasDataStepControl,sasDataStepStatement
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster
|
||||
|
||||
syn match vimHiGroup contained "\i\+"
|
||||
syn case ignore
|
||||
syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl
|
||||
syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl nocombine
|
||||
syn keyword vimFgBgAttrib contained none bg background fg foreground
|
||||
syn case match
|
||||
syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib
|
||||
|
||||
+192
-2
File diff suppressed because one or more lines are too long
+281
-279
File diff suppressed because it is too large
Load Diff
@@ -790,10 +790,10 @@
|
||||
1. Переместите курсор вниз, к первой строке помеченной --->, и в начало
|
||||
первого слова xxx.
|
||||
|
||||
2. Теперь нажмите R и введите число указанный ниже во второй строке чтобы
|
||||
2. Теперь нажмите R и введите число, указанное ниже во второй строке, чтобы
|
||||
заменить xxx.
|
||||
|
||||
3. Нажмите <ESC> для выхода из режима замены. Заметьте что остаток строки
|
||||
3. Нажмите <ESC> для выхода из режима замены. Заметьте, что остаток строки
|
||||
не был изменён.
|
||||
|
||||
4. Повторите эти шаги для замены оставшихся xxx.
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
---> 現在您應該已經學會如何移動到下一講吧。
|
||||
|
||||
3. 現在請使用下行鍵,將光標移動到第二講。
|
||||
3. 現在請使用下行鍵,將光標移動到第一講第二節。
|
||||
|
||||
提示︰如果您不敢確定您所按下的字母,請按下<ESC>鍵回到正常(Normal)模式。
|
||||
然後再次從鍵盤輸入您想要的命令。
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
---> 現在您應該已經學會如何移動到下一講吧。
|
||||
|
||||
3. 現在請使用下行鍵,將光標移動到第二講。
|
||||
3. 現在請使用下行鍵,將光標移動到第一講第二節。
|
||||
|
||||
提示︰如果您不敢確定您所按下的字母,請按下<ESC>鍵回到正常(Normal)模式。
|
||||
然後再次從鍵盤輸入您想要的命令。
|
||||
|
||||
@@ -36,8 +36,16 @@ CPU = i386
|
||||
|
||||
!ifdef SDK_INCLUDE_DIR
|
||||
!include $(SDK_INCLUDE_DIR)\Win32.mak
|
||||
!else
|
||||
!elseif "$(USE_WIN32MAK)"=="yes"
|
||||
!include <Win32.mak>
|
||||
!else
|
||||
cc = cl
|
||||
link = link
|
||||
rc = rc
|
||||
cflags = -nologo -c
|
||||
lflags = -incremental:no -nologo
|
||||
rcflags = /r
|
||||
olelibsdll = ole32.lib uuid.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib
|
||||
!endif
|
||||
|
||||
# include CPUARG
|
||||
|
||||
+4
-1
@@ -481,7 +481,10 @@ You need to set the following variables:
|
||||
MZSCHEME: Where Racket is installed.
|
||||
E.g. C:\Program Files (x86)\Racket
|
||||
DYNAMIC_MZSCHEME: Whether dynamic linking is used. Usually, set to yes.
|
||||
MZSCHEME_VER: Racket DLL version. E.g. 3m_9z0ds0 for Racket 6.3.
|
||||
MZSCHEME_VER: Racket DLL version which is used for the file name.
|
||||
E.g. 3m_9z0ds0 for Racket 6.3.
|
||||
The DLL can be found under the lib directory. E.g.
|
||||
C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll
|
||||
MZSCHEME_COLLECTS: (Optional) Path of the collects directory used at
|
||||
runtime. Default: $(MZSCHEME)\collects
|
||||
User can override this with the PLTCOLLECTS environment
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>135</string>
|
||||
<string>137</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#define DRAW_UNDERC 0x08 /* draw undercurl text */
|
||||
#define DRAW_ITALIC 0x10 /* draw italic text */
|
||||
#define DRAW_CURSOR 0x20
|
||||
#define DRAW_WIDE 0x40 /* draw wide text */
|
||||
#define DRAW_WIDE 0x80 /* draw wide text */
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
|
||||
#define kCTFontOrientationDefault kCTFontDefaultOrientation
|
||||
|
||||
@@ -36,7 +36,7 @@ static void loadSymbols()
|
||||
void *ptr;
|
||||
if ((ptr = dlsym(RTLD_DEFAULT, "NSImageNamePreferencesGeneral")) != NULL)
|
||||
nsImageNamePreferencesGeneral = *(NSString**)ptr;
|
||||
if ((ptr = dlsym(RTLD_DEFAULT, "NSImageNamePreferencesAdvanced")) != NULL)
|
||||
if ((ptr = dlsym(RTLD_DEFAULT, "NSImageNameAdvanced")) != NULL)
|
||||
nsImageNamePreferencesAdvanced = *(NSString**)ptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef struct {
|
||||
|
||||
|
||||
@interface MMTextStorage : NSTextStorage {
|
||||
NSMutableAttributedString *attribString;
|
||||
NSTextStorage *backingStore;
|
||||
int maxRows, maxColumns;
|
||||
int actualRows, actualColumns;
|
||||
NSAttributedString *emptyRowString;
|
||||
|
||||
+40
-40
@@ -51,7 +51,7 @@
|
||||
#define DRAW_UNDERC 0x08 /* draw undercurl text */
|
||||
#define DRAW_ITALIC 0x10 /* draw italic text */
|
||||
#define DRAW_CURSOR 0x20
|
||||
#define DRAW_WIDE 0x40 /* draw wide text */
|
||||
#define DRAW_WIDE 0x80 /* draw wide text */
|
||||
|
||||
|
||||
static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
@@ -72,7 +72,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
attribString = [[NSMutableAttributedString alloc] initWithString:@""];
|
||||
backingStore = [[NSTextStorage alloc] init];
|
||||
// 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];
|
||||
@@ -104,19 +104,19 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
[font release]; font = nil;
|
||||
[defaultBackgroundColor release]; defaultBackgroundColor = nil;
|
||||
[defaultForegroundColor release]; defaultForegroundColor = nil;
|
||||
[attribString release]; attribString = nil;
|
||||
[backingStore release]; backingStore = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *)string
|
||||
{
|
||||
return [attribString string];
|
||||
return [backingStore string];
|
||||
}
|
||||
|
||||
- (NSDictionary *)attributesAtIndex:(NSUInteger)index
|
||||
effectiveRange:(NSRangePointer)range
|
||||
{
|
||||
return [attribString attributesAtIndex:index effectiveRange:range];
|
||||
return [backingStore attributesAtIndex:index effectiveRange:range];
|
||||
}
|
||||
|
||||
- (void)replaceCharactersInRange:(NSRange)range
|
||||
@@ -126,7 +126,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
ASLogWarn(@"Calling %@ on MMTextStorage is unsupported",
|
||||
NSStringFromSelector(_cmd));
|
||||
#endif
|
||||
//[attribString replaceCharactersInRange:range withString:string];
|
||||
//[backingStore replaceCharactersInRange:range withString:string];
|
||||
}
|
||||
|
||||
- (void)setAttributes:(NSDictionary *)attributes range:(NSRange)range
|
||||
@@ -134,7 +134,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
// NOTE! This method must be implemented since the text system calls it
|
||||
// constantly to 'fix attributes', apply font substitution, etc.
|
||||
#if 0
|
||||
[attribString setAttributes:attributes range:range];
|
||||
[backingStore setAttributes:attributes range:range];
|
||||
#elif 1
|
||||
// HACK! If the font attribute is being modified, then ensure that the new
|
||||
// font has a fixed advancement which is either the same as the current
|
||||
@@ -153,7 +153,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return;
|
||||
|
||||
float adv = cellSize.width;
|
||||
if ([attribString attribute:MMWideCharacterAttributeName
|
||||
if ([backingStore attribute:MMWideCharacterAttributeName
|
||||
atIndex:range.location
|
||||
effectiveRange:NULL])
|
||||
adv += adv;
|
||||
@@ -170,9 +170,9 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
dictionaryWithDictionary:attributes];
|
||||
[newAttr setObject:newFont forKey:NSFontAttributeName];
|
||||
|
||||
[attribString setAttributes:newAttr range:range];
|
||||
[backingStore setAttributes:newAttr range:range];
|
||||
} else {
|
||||
[attribString setAttributes:attributes range:range];
|
||||
[backingStore setAttributes:attributes range:range];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -329,15 +329,15 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
}
|
||||
|
||||
// Mark these characters as wide. This attribute is subsequently checked
|
||||
// when translating (row,col) pairs to offsets within 'attribString'.
|
||||
// when translating (row,col) pairs to offsets within 'backingStore'.
|
||||
if (flags & DRAW_WIDE)
|
||||
[attributes setObject:[NSNull null]
|
||||
forKey:MMWideCharacterAttributeName];
|
||||
|
||||
// Replace characters in text storage and apply new attributes.
|
||||
NSRange r = NSMakeRange(range.location, [string length]);
|
||||
[attribString replaceCharactersInRange:range withString:string];
|
||||
[attribString setAttributes:attributes range:r];
|
||||
[backingStore replaceCharactersInRange:range withString:string];
|
||||
[backingStore setAttributes:attributes range:r];
|
||||
|
||||
NSInteger changeInLength = [string length] - range.length;
|
||||
if (acells != cells || acol != col) {
|
||||
@@ -345,18 +345,18 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
// NOTE: A normal width character replaced a double width
|
||||
// character. To maintain the invariant that each row covers the
|
||||
// same amount of cells, we compensate by adding an empty column.
|
||||
[attribString replaceCharactersInRange:NSMakeRange(NSMaxRange(r),0)
|
||||
[backingStore replaceCharactersInRange:NSMakeRange(NSMaxRange(r),0)
|
||||
withAttributedString:[emptyRowString
|
||||
attributedSubstringFromRange:NSMakeRange(0,1)]];
|
||||
++changeInLength;
|
||||
#if 0
|
||||
} else if (acol == col - 1) {
|
||||
[attribString replaceCharactersInRange:NSMakeRange(r.location,0)
|
||||
[backingStore replaceCharactersInRange:NSMakeRange(r.location,0)
|
||||
withAttributedString:[emptyRowString
|
||||
attributedSubstringFromRange:NSMakeRange(0,1)]];
|
||||
++changeInLength;
|
||||
} else if (acol == col + 1) {
|
||||
[attribString replaceCharactersInRange:NSMakeRange(r.location-1,1)
|
||||
[backingStore replaceCharactersInRange:NSMakeRange(r.location-1,1)
|
||||
withAttributedString:[emptyRowString
|
||||
attributedSubstringFromRange:NSMakeRange(0,2)]];
|
||||
++changeInLength;
|
||||
@@ -435,10 +435,10 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return;
|
||||
}
|
||||
|
||||
NSAttributedString *srcString = [attribString
|
||||
NSAttributedString *srcString = [backingStore
|
||||
attributedSubstringFromRange:srcRange];
|
||||
|
||||
[attribString replaceCharactersInRange:destRange
|
||||
[backingStore replaceCharactersInRange:destRange
|
||||
withAttributedString:srcString];
|
||||
[self edited:(NSTextStorageEditedCharacters
|
||||
| NSTextStorageEditedAttributes) range:destRange
|
||||
@@ -471,9 +471,9 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return;
|
||||
}
|
||||
|
||||
[attribString replaceCharactersInRange:destRange
|
||||
[backingStore replaceCharactersInRange:destRange
|
||||
withAttributedString:emptyString];
|
||||
[attribString setAttributes:attribs
|
||||
[backingStore setAttributes:attribs
|
||||
range:NSMakeRange(destRange.location, width)];
|
||||
|
||||
[self edited:(NSTextStorageEditedAttributes
|
||||
@@ -531,9 +531,9 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return;
|
||||
}
|
||||
|
||||
NSAttributedString *srcString = [attribString
|
||||
NSAttributedString *srcString = [backingStore
|
||||
attributedSubstringFromRange:srcRange];
|
||||
[attribString replaceCharactersInRange:destRange
|
||||
[backingStore replaceCharactersInRange:destRange
|
||||
withAttributedString:srcString];
|
||||
[self edited:(NSTextStorageEditedCharacters
|
||||
| NSTextStorageEditedAttributes) range:destRange
|
||||
@@ -566,9 +566,9 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return;
|
||||
}
|
||||
|
||||
[attribString replaceCharactersInRange:destRange
|
||||
[backingStore replaceCharactersInRange:destRange
|
||||
withAttributedString:emptyString];
|
||||
[attribString setAttributes:attribs
|
||||
[backingStore setAttributes:attribs
|
||||
range:NSMakeRange(destRange.location, width)];
|
||||
|
||||
[self edited:(NSTextStorageEditedAttributes
|
||||
@@ -613,9 +613,9 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return;
|
||||
}
|
||||
|
||||
[attribString replaceCharactersInRange:range
|
||||
[backingStore replaceCharactersInRange:range
|
||||
withAttributedString:emptyString];
|
||||
[attribString setAttributes:attribs
|
||||
[backingStore setAttributes:attribs
|
||||
range:NSMakeRange(range.location, cells)];
|
||||
|
||||
[self edited:(NSTextStorageEditedAttributes
|
||||
@@ -917,7 +917,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
int cells = 1;
|
||||
NSRange r = [self charRangeForRow:row column:&col cells:&cells];
|
||||
if (NSNotFound != r.location
|
||||
&& [attribString attribute:MMWideCharacterAttributeName
|
||||
&& [backingStore attribute:MMWideCharacterAttributeName
|
||||
atIndex:r.location
|
||||
effectiveRange:nil])
|
||||
rect.size.width += rect.size.width;
|
||||
@@ -958,7 +958,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
if (!force && actualRows == maxRows && actualColumns == maxColumns)
|
||||
return;
|
||||
|
||||
NSRange oldRange = NSMakeRange(0, [attribString length]);
|
||||
NSRange oldRange = NSMakeRange(0, [backingStore length]);
|
||||
|
||||
actualRows = maxRows;
|
||||
actualColumns = maxColumns;
|
||||
@@ -990,16 +990,16 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
emptyRowString = [[NSAttributedString alloc] initWithString:rowString
|
||||
attributes:dict];
|
||||
|
||||
[attribString release];
|
||||
attribString = [[NSMutableAttributedString alloc] init];
|
||||
[backingStore release];
|
||||
backingStore = [[NSMutableAttributedString alloc] init];
|
||||
for (i=0; i<maxRows; ++i) {
|
||||
#if MM_USE_ROW_CACHE
|
||||
rowCache[i].length = actualColumns + 1;
|
||||
#endif
|
||||
[attribString appendAttributedString:emptyRowString];
|
||||
[backingStore appendAttributedString:emptyRowString];
|
||||
}
|
||||
|
||||
NSRange fullRange = NSMakeRange(0, [attribString length]);
|
||||
NSRange fullRange = NSMakeRange(0, [backingStore length]);
|
||||
[self edited:(NSTextStorageEditedCharacters|NSTextStorageEditedAttributes)
|
||||
range:oldRange changeInLength:fullRange.length-oldRange.length];
|
||||
}
|
||||
@@ -1014,7 +1014,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
if (characterEqualsColumn)
|
||||
return NSMakeRange(row*(actualColumns+1) + col, cells);
|
||||
|
||||
NSString *string = [attribString string];
|
||||
NSString *string = [backingStore string];
|
||||
unsigned stringLen = [string length];
|
||||
NSRange r, range = { NSNotFound, 0 };
|
||||
unsigned idx;
|
||||
@@ -1082,7 +1082,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
r = [string rangeOfComposedCharacterSequenceAtIndex:idx];
|
||||
|
||||
// Wide chars take up two display cells.
|
||||
if ([attribString attribute:MMWideCharacterAttributeName
|
||||
if ([backingStore attribute:MMWideCharacterAttributeName
|
||||
atIndex:idx
|
||||
effectiveRange:nil])
|
||||
++i;
|
||||
@@ -1100,7 +1100,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
--i;
|
||||
|
||||
// Wide chars take up two display cells.
|
||||
if ([attribString attribute:MMWideCharacterAttributeName
|
||||
if ([backingStore attribute:MMWideCharacterAttributeName
|
||||
atIndex:idx
|
||||
effectiveRange:nil])
|
||||
--i;
|
||||
@@ -1127,7 +1127,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
r = [string rangeOfComposedCharacterSequenceAtIndex:idx];
|
||||
|
||||
// Wide chars take up two display cells.
|
||||
if ([attribString attribute:MMWideCharacterAttributeName
|
||||
if ([backingStore attribute:MMWideCharacterAttributeName
|
||||
atIndex:idx
|
||||
effectiveRange:nil])
|
||||
++i;
|
||||
@@ -1149,7 +1149,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
r = [string rangeOfComposedCharacterSequenceAtIndex:idx];
|
||||
|
||||
// Wide chars take up two display cells.
|
||||
if ([attribString attribute:MMWideCharacterAttributeName
|
||||
if ([backingStore attribute:MMWideCharacterAttributeName
|
||||
atIndex:idx
|
||||
effectiveRange:nil])
|
||||
++i;
|
||||
@@ -1166,7 +1166,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
r = [string rangeOfComposedCharacterSequenceAtIndex:idx];
|
||||
|
||||
// Wide chars take up two display cells.
|
||||
if ([attribString attribute:MMWideCharacterAttributeName
|
||||
if ([backingStore attribute:MMWideCharacterAttributeName
|
||||
atIndex:idx
|
||||
effectiveRange:nil])
|
||||
++i;
|
||||
@@ -1218,14 +1218,14 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
// TODO: Treat these separately inside of Vim so we don't have to bother
|
||||
// here.
|
||||
while (range.length > 0) {
|
||||
invalidRange = [[attribString string]
|
||||
invalidRange = [[backingStore string]
|
||||
rangeOfCharacterFromSet:invalidCharacterSet
|
||||
options:NSLiteralSearch
|
||||
range:range];
|
||||
if (NSNotFound == invalidRange.location)
|
||||
break;
|
||||
|
||||
[attribString replaceCharactersInRange:invalidRange withString:@" "];
|
||||
[backingStore replaceCharactersInRange:invalidRange withString:@" "];
|
||||
|
||||
end = NSMaxRange(invalidRange);
|
||||
range.length -= end - range.location;
|
||||
|
||||
+82
-20
@@ -76,6 +76,10 @@ endif
|
||||
# Set to yes to enable terminal support.
|
||||
TERMINAL=no
|
||||
|
||||
ifndef CTAGS
|
||||
# this assumes ctags is Exuberant ctags
|
||||
CTAGS = ctags -I INIT+ --fields=+S
|
||||
endif
|
||||
|
||||
# Link against the shared version of libstdc++ by default. Set
|
||||
# STATIC_STDCPLUS to "yes" to link against static version instead.
|
||||
@@ -340,6 +344,7 @@ endif
|
||||
# TCL_VER=[TCL version, eg 83, 84] (default is 86)
|
||||
# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.6)
|
||||
# You must set TCL_VER_LONG when you set TCL_VER.
|
||||
# TCL_DLL=[TCL dll name, eg tcl86.dll] (default is tcl86.dll)
|
||||
ifdef TCL
|
||||
ifndef DYNAMIC_TCL
|
||||
DYNAMIC_TCL=yes
|
||||
@@ -350,6 +355,9 @@ endif
|
||||
ifndef TCL_VER_LONG
|
||||
TCL_VER_LONG = 8.6
|
||||
endif
|
||||
ifndef TCL_DLL
|
||||
TCL_DLL = tcl$(TCL_VER).dll
|
||||
endif
|
||||
TCLINC += -I$(TCL)/include
|
||||
endif
|
||||
|
||||
@@ -526,7 +534,7 @@ endif
|
||||
ifdef TCL
|
||||
CFLAGS += -DFEAT_TCL $(TCLINC)
|
||||
ifeq (yes, $(DYNAMIC_TCL))
|
||||
CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\" -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
|
||||
CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -561,6 +569,12 @@ endif
|
||||
|
||||
ifeq ($(TERMINAL),yes)
|
||||
DEFINES += -DFEAT_TERMINAL
|
||||
TERM_DEPS = \
|
||||
libvterm/include/vterm.h \
|
||||
libvterm/include/vterm_keycodes.h \
|
||||
libvterm/src/rect.h \
|
||||
libvterm/src/utf8.h \
|
||||
libvterm/src/vterm_internal.h
|
||||
endif
|
||||
|
||||
# DirectWrite (DirectX)
|
||||
@@ -750,8 +764,16 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(TERMINAL),yes)
|
||||
OBJ += $(OUTDIR)/terminal.o
|
||||
VTERM_LIB = libvterm/.libs/libvterm.a
|
||||
OBJ += $(OUTDIR)/terminal.o \
|
||||
$(OUTDIR)/term_encoding.o \
|
||||
$(OUTDIR)/term_keyboard.o \
|
||||
$(OUTDIR)/term_mouse.o \
|
||||
$(OUTDIR)/term_parser.o \
|
||||
$(OUTDIR)/term_pen.o \
|
||||
$(OUTDIR)/term_screen.o \
|
||||
$(OUTDIR)/term_state.o \
|
||||
$(OUTDIR)/term_unicode.o \
|
||||
$(OUTDIR)/term_vterm.o
|
||||
endif
|
||||
|
||||
|
||||
@@ -851,7 +873,7 @@ uninstal.exe: uninstal.c
|
||||
$(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
|
||||
|
||||
$(TARGET): $(OUTDIR) $(OBJ)
|
||||
$(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB) $(VTERM_LIB)
|
||||
$(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
|
||||
|
||||
upx: exes
|
||||
upx gvim.exe
|
||||
@@ -867,8 +889,11 @@ xxd/xxd.exe: xxd/xxd.c
|
||||
GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
|
||||
$(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS)
|
||||
|
||||
libvterm/.libs/libvterm.a :
|
||||
cd libvterm && $(MAKE) libvterm.la
|
||||
tags: notags
|
||||
$(CTAGS) *.c *.cpp *.h if_perl.xs
|
||||
|
||||
notags:
|
||||
-$(DEL) tags
|
||||
|
||||
clean:
|
||||
-$(DEL) $(OUTDIR)$(DIRSLASH)*.o
|
||||
@@ -907,34 +932,43 @@ $(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
|
||||
$(OUTDIR):
|
||||
$(MKDIR) $(OUTDIR)
|
||||
|
||||
$(OUTDIR)/channel.o: channel.c $(INCL)
|
||||
$(CC) -c $(CFLAGS) channel.c -o $(OUTDIR)/channel.o
|
||||
|
||||
$(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
|
||||
$(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
|
||||
|
||||
$(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
|
||||
$(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
|
||||
|
||||
$(OUTDIR)/gui_w32.o: gui_w32.c $(INCL)
|
||||
$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
|
||||
|
||||
$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
|
||||
$(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
|
||||
|
||||
$(OUTDIR)/gui_w32.o: gui_w32.c $(INCL)
|
||||
$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
|
||||
|
||||
$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
|
||||
$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
|
||||
|
||||
$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP)
|
||||
$(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
|
||||
|
||||
mzscheme_base.c:
|
||||
$(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
|
||||
|
||||
# Remove -D__IID_DEFINED__ for newer versions of the w32api
|
||||
$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
|
||||
$(CC) $(CFLAGS) $(CXXFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp
|
||||
|
||||
if_perl.c: if_perl.xs typemap
|
||||
$(XSUBPP) -prototypes -typemap \
|
||||
$(PERLTYPEMAP) if_perl.xs -output $@
|
||||
|
||||
$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
|
||||
ifeq (16, $(RUBY))
|
||||
$(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c
|
||||
endif
|
||||
|
||||
if_perl.c: if_perl.xs typemap
|
||||
$(XSUBPP) -prototypes -typemap \
|
||||
$(PERLTYPEMAP) if_perl.xs > $@
|
||||
|
||||
$(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL)
|
||||
$(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
|
||||
|
||||
@@ -944,17 +978,45 @@ $(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL)
|
||||
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
|
||||
$(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
|
||||
|
||||
$(OUTDIR)/channel.o: channel.c $(INCL)
|
||||
$(CC) -c $(CFLAGS) channel.c -o $(OUTDIR)/channel.o
|
||||
|
||||
$(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL)
|
||||
$(CC) -c $(CFLAGS) regexp.c -o $(OUTDIR)/regexp.o
|
||||
|
||||
$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP)
|
||||
$(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
|
||||
$(OUTDIR)/terminal.o: terminal.c $(INCL) $(TERM_DEPS)
|
||||
$(CC) -c $(CFLAGS) terminal.c -o $(OUTDIR)/terminal.o
|
||||
|
||||
|
||||
CCCTERM = $(CC) -c $(CFLAGS) -Ilibvterm/include -DINLINE="" \
|
||||
-DVSNPRINTF=vim_vsnprintf \
|
||||
-DIS_COMBINING_FUNCTION=utf_iscomposing_uint \
|
||||
-DWCWIDTH_FUNCTION=utf_uint2cells
|
||||
|
||||
$(OUTDIR)/term_encoding.o: libvterm/src/encoding.c $(TERM_DEPS)
|
||||
$(CCCTERM) libvterm/src/encoding.c -o $@
|
||||
|
||||
$(OUTDIR)/term_keyboard.o: libvterm/src/keyboard.c $(TERM_DEPS)
|
||||
$(CCCTERM) libvterm/src/keyboard.c -o $@
|
||||
|
||||
$(OUTDIR)/term_mouse.o: libvterm/src/mouse.c $(TERM_DEPS)
|
||||
$(CCCTERM) libvterm/src/mouse.c -o $@
|
||||
|
||||
$(OUTDIR)/term_parser.o: libvterm/src/parser.c $(TERM_DEPS)
|
||||
$(CCCTERM) libvterm/src/parser.c -o $@
|
||||
|
||||
$(OUTDIR)/term_pen.o: libvterm/src/pen.c $(TERM_DEPS)
|
||||
$(CCCTERM) libvterm/src/pen.c -o $@
|
||||
|
||||
$(OUTDIR)/term_screen.o: libvterm/src/screen.c $(TERM_DEPS)
|
||||
$(CCCTERM) libvterm/src/screen.c -o $@
|
||||
|
||||
$(OUTDIR)/term_state.o: libvterm/src/state.c $(TERM_DEPS)
|
||||
$(CCCTERM) libvterm/src/state.c -o $@
|
||||
|
||||
$(OUTDIR)/term_unicode.o: libvterm/src/unicode.c $(TERM_DEPS)
|
||||
$(CCCTERM) libvterm/src/unicode.c -o $@
|
||||
|
||||
$(OUTDIR)/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
|
||||
$(CCCTERM) libvterm/src/vterm.c -o $@
|
||||
|
||||
mzscheme_base.c:
|
||||
$(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
|
||||
|
||||
pathdef.c: $(INCL)
|
||||
ifneq (sh.exe, $(SHELL))
|
||||
|
||||
+91
-40
@@ -15,7 +15,8 @@
|
||||
# This will build the console version of Vim with no additional interfaces.
|
||||
# To add features, define any of the following:
|
||||
#
|
||||
# For MSVC 11 you need to specify where the Win32.mak file is, e.g.:
|
||||
# For MSVC 11, if you want to include Win32.mak, you need to specify
|
||||
# where the file is, e.g.:
|
||||
# SDK_INCLUDE_DIR="C:\Program Files\Microsoft SDKs\Windows\v7.1\Include"
|
||||
#
|
||||
# !!!! After changing features do "nmake clean" first !!!!
|
||||
@@ -83,6 +84,7 @@
|
||||
# TCL_VER=[Tcl version, e.g. 80, 83] (default is 86)
|
||||
# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.6)
|
||||
# You must set TCL_VER_LONG when you set TCL_VER.
|
||||
# TCL_DLL=[Tcl dll name, e.g. tcl86.dll] (default is tcl86.dll)
|
||||
#
|
||||
# Cscope support: CSCOPE=yes
|
||||
#
|
||||
@@ -212,7 +214,7 @@ OBJDIR = $(OBJDIR)Z
|
||||
OBJDIR = $(OBJDIR)d
|
||||
!endif
|
||||
|
||||
# Win32.mak requires that CPU be set appropriately.
|
||||
# If you include Win32.mak, it requires that CPU be set appropriately.
|
||||
# To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
|
||||
|
||||
!ifdef PROCESSOR_ARCHITECTURE
|
||||
@@ -253,12 +255,15 @@ MAKEFLAGS_GVIMEXT = DEBUG=yes
|
||||
!endif
|
||||
|
||||
|
||||
# Get all sorts of useful, standard macros from the Platform SDK.
|
||||
# Get all sorts of useful, standard macros from the Platform SDK,
|
||||
# if SDK_INCLUDE_DIR is set or USE_WIN32MAK is set to "yes".
|
||||
|
||||
!ifdef SDK_INCLUDE_DIR
|
||||
!include $(SDK_INCLUDE_DIR)\Win32.mak
|
||||
!else
|
||||
!elseif "$(USE_WIN32MAK)"=="yes"
|
||||
!include <Win32.mak>
|
||||
!else
|
||||
link = link
|
||||
!endif
|
||||
|
||||
|
||||
@@ -339,7 +344,8 @@ FEATURES = HUGE
|
||||
!endif
|
||||
|
||||
!ifndef CTAGS
|
||||
CTAGS = ctags
|
||||
# this assumes ctags is Exuberant ctags
|
||||
CTAGS = ctags -I INIT+ --fields=+S
|
||||
!endif
|
||||
|
||||
!ifndef CSCOPE
|
||||
@@ -354,13 +360,24 @@ CSCOPE_DEFS = -DFEAT_CSCOPE
|
||||
!endif
|
||||
|
||||
!if "$(TERMINAL)" == "yes"
|
||||
TERMINAL_OBJ = $(OBJDIR)/terminal.obj
|
||||
TERMINAL_DEFS = -DFEAT_TERMINAL
|
||||
!if $(MSVC_MAJOR) <= 11
|
||||
TERMINAL_DEFS = $(TERMINAL_DEFS) /I if_perl_msvc
|
||||
!endif
|
||||
TERMINAL_SRC = terminal.c
|
||||
VTERM_LIB = libvterm/vterm.lib
|
||||
TERM_OBJ = \
|
||||
$(OBJDIR)/terminal.obj \
|
||||
$(OBJDIR)/term_encoding.obj \
|
||||
$(OBJDIR)/term_keyboard.obj \
|
||||
$(OBJDIR)/term_mouse.obj \
|
||||
$(OBJDIR)/term_parser.obj \
|
||||
$(OBJDIR)/term_pen.obj \
|
||||
$(OBJDIR)/term_screen.obj \
|
||||
$(OBJDIR)/term_state.obj \
|
||||
$(OBJDIR)/term_unicode.obj \
|
||||
$(OBJDIR)/term_vterm.obj
|
||||
TERM_DEFS = -DFEAT_TERMINAL
|
||||
TERM_DEPS = \
|
||||
libvterm/include/vterm.h \
|
||||
libvterm/include/vterm_keycodes.h \
|
||||
libvterm/src/rect.h \
|
||||
libvterm/src/utf8.h \
|
||||
libvterm/src/vterm_internal.h
|
||||
!endif
|
||||
|
||||
!ifndef NETBEANS
|
||||
@@ -470,10 +487,9 @@ WINVER = 0x0501
|
||||
#VIMRUNTIMEDIR = somewhere
|
||||
|
||||
CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
|
||||
$(CSCOPE_DEFS) $(TERMINAL_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \
|
||||
$(CSCOPE_DEFS) $(TERM_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \
|
||||
$(NBDEBUG_DEFS) $(XPM_DEFS) \
|
||||
$(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
|
||||
/Fo$(OUTDIR)/
|
||||
$(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
|
||||
|
||||
#>>>>> end of choices
|
||||
###########################################################################
|
||||
@@ -818,7 +834,9 @@ TCL_VER_LONG = 8.6
|
||||
!message Tcl requested (version $(TCL_VER)) - root dir is "$(TCL)"
|
||||
!if "$(DYNAMIC_TCL)" == "yes"
|
||||
!message Tcl DLL will be loaded dynamically
|
||||
!ifndef TCL_DLL
|
||||
TCL_DLL = tcl$(TCL_VER).dll
|
||||
!endif
|
||||
CFLAGS = $(CFLAGS) -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" \
|
||||
-DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
|
||||
TCL_OBJ = $(OUTDIR)\if_tcl.obj
|
||||
@@ -1121,6 +1139,9 @@ LINK_PDB = /PDB:$(VIM).pdb -debug
|
||||
#
|
||||
!message
|
||||
|
||||
# CFLAGS with /Fo$(OUTDIR)/
|
||||
CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/
|
||||
|
||||
conflags = /nologo /subsystem:$(SUBSYSTEM)
|
||||
|
||||
PATHDEF_SRC = $(OUTDIR)\pathdef.c
|
||||
@@ -1136,7 +1157,7 @@ conflags = $(conflags) /map /mapinfo:lines
|
||||
LINKARGS1 = $(linkdebug) $(conflags)
|
||||
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib \
|
||||
$(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
|
||||
$(TCL_LIB) $(NETBEANS_LIB) $(VTERM_LIB) $(XPM_LIB) $(LINK_PDB)
|
||||
$(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
|
||||
|
||||
# Report link time code generation progress if used.
|
||||
!ifdef NODEBUG
|
||||
@@ -1157,12 +1178,12 @@ all: $(VIM).exe \
|
||||
|
||||
$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
|
||||
$(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
|
||||
$(CSCOPE_OBJ) $(TERMINAL_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) $(VTERM_LIB) \
|
||||
$(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
|
||||
version.c version.h
|
||||
$(CC) $(CFLAGS) version.c
|
||||
$(CC) $(CFLAGS_OUTDIR) version.c
|
||||
$(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \
|
||||
$(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
|
||||
$(TCL_OBJ) $(CSCOPE_OBJ) $(TERMINAL_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
|
||||
$(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
|
||||
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
|
||||
if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1
|
||||
|
||||
@@ -1200,7 +1221,7 @@ GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
|
||||
|
||||
|
||||
tags: notags
|
||||
$(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro
|
||||
$(CTAGS) *.c *.cpp *.h if_perl.xs
|
||||
|
||||
notags:
|
||||
- if exist tags del tags
|
||||
@@ -1256,7 +1277,7 @@ testclean:
|
||||
!ELSE
|
||||
.c{$(OUTDIR)/}.obj::
|
||||
!ENDIF
|
||||
$(CC) $(CFLAGS) $<
|
||||
$(CC) $(CFLAGS_OUTDIR) $<
|
||||
|
||||
# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
|
||||
# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
|
||||
@@ -1265,7 +1286,7 @@ testclean:
|
||||
!ELSE
|
||||
.cpp{$(OUTDIR)/}.obj::
|
||||
!ENDIF
|
||||
$(CC) $(CFLAGS) $<
|
||||
$(CC) $(CFLAGS_OUTDIR) $<
|
||||
|
||||
$(OUTDIR)/arabic.obj: $(OUTDIR) arabic.c $(INCL)
|
||||
|
||||
@@ -1324,41 +1345,41 @@ $(OUTDIR)/gui_dwrite.obj: $(OUTDIR) gui_dwrite.cpp $(INCL) $(GUI_INCL)
|
||||
$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
|
||||
|
||||
$(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL)
|
||||
$(CC) $(CFLAGS) $(LUA_INC) if_lua.c
|
||||
$(CC) $(CFLAGS_OUTDIR) $(LUA_INC) if_lua.c
|
||||
|
||||
if_perl.c : if_perl.xs typemap
|
||||
$(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \
|
||||
-typemap typemap if_perl.xs > if_perl.c
|
||||
-typemap typemap if_perl.xs -output if_perl.c
|
||||
|
||||
$(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL)
|
||||
$(CC) $(CFLAGS) $(PERL_INC) if_perl.c
|
||||
$(CC) $(CFLAGS_OUTDIR) $(PERL_INC) if_perl.c
|
||||
|
||||
$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
|
||||
$(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c
|
||||
$(CC) $(CFLAGS_OUTDIR) $(PERL_INC) if_perlsfio.c
|
||||
|
||||
$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c if_mzsch.h $(INCL) $(MZSCHEME_EXTRA_DEP)
|
||||
$(CC) $(CFLAGS) if_mzsch.c \
|
||||
$(CC) $(CFLAGS_OUTDIR) if_mzsch.c \
|
||||
-DMZSCHEME_COLLECTS="\"$(MZSCHEME_COLLECTS:\=\\)\""
|
||||
|
||||
lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib:
|
||||
lib /DEF:"$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).def"
|
||||
|
||||
$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c if_py_both.h $(INCL)
|
||||
$(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
|
||||
$(CC) $(CFLAGS_OUTDIR) $(PYTHON_INC) if_python.c
|
||||
|
||||
$(OUTDIR)/if_python3.obj: $(OUTDIR) if_python3.c if_py_both.h $(INCL)
|
||||
$(CC) $(CFLAGS) $(PYTHON3_INC) if_python3.c
|
||||
$(CC) $(CFLAGS_OUTDIR) $(PYTHON3_INC) if_python3.c
|
||||
|
||||
$(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h
|
||||
|
||||
$(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
|
||||
$(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c
|
||||
$(CC) $(CFLAGS_OUTDIR) $(RUBY_INC) if_ruby.c
|
||||
|
||||
$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
|
||||
$(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
|
||||
$(CC) $(CFLAGS_OUTDIR) $(TCL_INC) if_tcl.c
|
||||
|
||||
$(OUTDIR)/iscygpty.obj: $(OUTDIR) iscygpty.c $(CUI_INCL)
|
||||
$(CC) $(CFLAGS) iscygpty.c -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
|
||||
$(CC) $(CFLAGS_OUTDIR) iscygpty.c -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
|
||||
|
||||
$(OUTDIR)/json.obj: $(OUTDIR) json.c $(INCL)
|
||||
|
||||
@@ -1396,7 +1417,7 @@ $(OUTDIR)/ops.obj: $(OUTDIR) ops.c $(INCL)
|
||||
|
||||
$(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL)
|
||||
|
||||
$(OUTDIR)/terminal.obj: $(OUTDIR) terminal.c $(INCL)
|
||||
$(OUTDIR)/terminal.obj: $(OUTDIR) terminal.c $(INCL) $(TERM_DEPS)
|
||||
|
||||
$(OUTDIR)/winclip.obj: $(OUTDIR) winclip.c $(INCL)
|
||||
|
||||
@@ -1405,7 +1426,7 @@ $(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h
|
||||
$(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
|
||||
|
||||
$(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
|
||||
$(CC) $(CFLAGS) $(PATHDEF_SRC)
|
||||
$(CC) $(CFLAGS_OUTDIR) $(PATHDEF_SRC)
|
||||
|
||||
$(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL)
|
||||
|
||||
@@ -1438,7 +1459,7 @@ $(OUTDIR)/userfunc.obj: $(OUTDIR) userfunc.c $(INCL)
|
||||
$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
|
||||
|
||||
$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
|
||||
$(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c
|
||||
$(CC) $(CFLAGS_OUTDIR) $(XPM_INC) xpm_w32.c
|
||||
|
||||
$(OUTDIR)/vim.res: $(OUTDIR) vim.rc gvim.exe.mnf version.h tools.bmp \
|
||||
tearoff.bmp vim.ico vim_error.ico \
|
||||
@@ -1456,6 +1477,41 @@ $(OUTDIR)/dimm_i.obj: $(OUTDIR) dimm_i.c $(INCL)
|
||||
|
||||
$(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL)
|
||||
|
||||
|
||||
CCCTERM = $(CC) $(CFLAGS) -Ilibvterm/include -DINLINE="" \
|
||||
-DVSNPRINTF=vim_vsnprintf \
|
||||
-DIS_COMBINING_FUNCTION=utf_iscomposing_uint \
|
||||
-DWCWIDTH_FUNCTION=utf_uint2cells \
|
||||
-D_CRT_SECURE_NO_WARNINGS
|
||||
|
||||
$(OUTDIR)/term_encoding.obj: $(OUTDIR) libvterm/src/encoding.c $(TERM_DEPS)
|
||||
$(CCCTERM) -Fo$@ libvterm/src/encoding.c
|
||||
|
||||
$(OUTDIR)/term_keyboard.obj: $(OUTDIR) libvterm/src/keyboard.c $(TERM_DEPS)
|
||||
$(CCCTERM) -Fo$@ libvterm/src/keyboard.c
|
||||
|
||||
$(OUTDIR)/term_mouse.obj: $(OUTDIR) libvterm/src/mouse.c $(TERM_DEPS)
|
||||
$(CCCTERM) -Fo$@ libvterm/src/mouse.c
|
||||
|
||||
$(OUTDIR)/term_parser.obj: $(OUTDIR) libvterm/src/parser.c $(TERM_DEPS)
|
||||
$(CCCTERM) -Fo$@ libvterm/src/parser.c
|
||||
|
||||
$(OUTDIR)/term_pen.obj: $(OUTDIR) libvterm/src/pen.c $(TERM_DEPS)
|
||||
$(CCCTERM) -Fo$@ libvterm/src/pen.c
|
||||
|
||||
$(OUTDIR)/term_screen.obj: $(OUTDIR) libvterm/src/screen.c $(TERM_DEPS)
|
||||
$(CCCTERM) -Fo$@ libvterm/src/screen.c
|
||||
|
||||
$(OUTDIR)/term_state.obj: $(OUTDIR) libvterm/src/state.c $(TERM_DEPS)
|
||||
$(CCCTERM) -Fo$@ libvterm/src/state.c
|
||||
|
||||
$(OUTDIR)/term_unicode.obj: $(OUTDIR) libvterm/src/unicode.c $(TERM_DEPS)
|
||||
$(CCCTERM) -Fo$@ libvterm/src/unicode.c
|
||||
|
||||
$(OUTDIR)/term_vterm.obj: $(OUTDIR) libvterm/src/vterm.c $(TERM_DEPS)
|
||||
$(CCCTERM) -Fo$@ libvterm/src/vterm.c
|
||||
|
||||
|
||||
# $CFLAGS may contain backslashes and double quotes, escape them both.
|
||||
E0_CFLAGS = $(CFLAGS:\=\\)
|
||||
E_CFLAGS = $(E0_CFLAGS:"=\")
|
||||
@@ -1550,9 +1606,4 @@ proto.h: \
|
||||
.c.i:
|
||||
$(CC) $(CFLAGS) /P /C $<
|
||||
|
||||
libvterm/vterm.lib :
|
||||
cd libvterm
|
||||
$(MAKE) /NOLOGO -f Makefile.msc "MSVC_MAJOR=$(MSVC_MAJOR)"
|
||||
cd ..
|
||||
|
||||
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:
|
||||
|
||||
+25
-9
@@ -2117,17 +2117,17 @@ test1 \
|
||||
test_listchars \
|
||||
test_search_mbyte \
|
||||
test_wordcount \
|
||||
test3 test4 test5 test6 test7 test8 test9 \
|
||||
test11 test12 test14 test15 test17 test18 test19 \
|
||||
test20 test21 test22 test25 test27 test28 test29 \
|
||||
test3 test4 test5 test7 test8 \
|
||||
test11 test12 test14 test15 test17 test19 \
|
||||
test20 test25 test28 test29 \
|
||||
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
|
||||
test40 test41 test42 test43 test44 test45 test48 test49 \
|
||||
test50 test51 test52 test53 test54 test55 test56 test57 test59 \
|
||||
test50 test52 test53 test54 test55 test56 test57 test59 \
|
||||
test60 test64 test66 test68 test69 \
|
||||
test70 test72 test73 test74 test77 test78 test79 \
|
||||
test80 test83 test84 test85 test86 test87 test88 \
|
||||
test91 test94 test95 test98 test99 \
|
||||
test100 test101 test103 test104 test107 test108:
|
||||
test70 test72 test73 test77 test78 test79 \
|
||||
test83 test85 test86 test87 test88 \
|
||||
test94 test95 test99 \
|
||||
test108:
|
||||
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
|
||||
# Run individual NEW style test, assuming that Vim was already compiled.
|
||||
@@ -2139,6 +2139,7 @@ test_arglist \
|
||||
test_autocmd \
|
||||
test_backspace_opt \
|
||||
test_breakindent \
|
||||
test_bufline \
|
||||
test_bufwintabinfo \
|
||||
test_cd \
|
||||
test_cdo \
|
||||
@@ -2154,6 +2155,7 @@ test_arglist \
|
||||
test_crypt \
|
||||
test_cscope \
|
||||
test_cursor_func \
|
||||
test_curswant \
|
||||
test_delete \
|
||||
test_diffmode \
|
||||
test_digraph \
|
||||
@@ -2172,6 +2174,7 @@ test_arglist \
|
||||
test_farsi \
|
||||
test_feedkeys \
|
||||
test_file_perm \
|
||||
test_file_size \
|
||||
test_fileformat \
|
||||
test_filetype \
|
||||
test_filter_cmd \
|
||||
@@ -2184,6 +2187,7 @@ test_arglist \
|
||||
test_functions \
|
||||
test_ga \
|
||||
test_getcwd \
|
||||
test_getvar \
|
||||
test_gf \
|
||||
test_glob2regpat \
|
||||
test_global \
|
||||
@@ -2195,6 +2199,7 @@ test_arglist \
|
||||
test_help \
|
||||
test_help_tagjump \
|
||||
test_hide \
|
||||
test_highlight \
|
||||
test_history \
|
||||
test_hlsearch \
|
||||
test_increment \
|
||||
@@ -2206,6 +2211,8 @@ test_arglist \
|
||||
test_lambda \
|
||||
test_langmap \
|
||||
test_largefile \
|
||||
test_let \
|
||||
test_lineending \
|
||||
test_lispwords \
|
||||
test_listlbr \
|
||||
test_listlbr_utf8 \
|
||||
@@ -2250,6 +2257,7 @@ test_arglist \
|
||||
test_reltime \
|
||||
test_retab \
|
||||
test_ruby \
|
||||
test_scrollbind \
|
||||
test_search \
|
||||
test_searchpos \
|
||||
test_set \
|
||||
@@ -2273,6 +2281,8 @@ test_arglist \
|
||||
test_tagjump \
|
||||
test_taglist \
|
||||
test_tcl \
|
||||
test_terminal \
|
||||
test_terminal_fail \
|
||||
test_textobjects \
|
||||
test_timers \
|
||||
test_true_false \
|
||||
@@ -2283,9 +2293,11 @@ test_arglist \
|
||||
test_utf8_comparisons \
|
||||
test_viminfo \
|
||||
test_vimscript \
|
||||
test_virtualedit \
|
||||
test_visual \
|
||||
test_window_cmd \
|
||||
test_window_id \
|
||||
test_windows_home \
|
||||
test_writefile \
|
||||
test_alot_latin \
|
||||
test_alot_utf8 \
|
||||
@@ -3313,7 +3325,11 @@ objects/channel.o: channel.c
|
||||
Makefile:
|
||||
@echo The name of the makefile MUST be "Makefile" (with capital M)!!!!
|
||||
|
||||
CCCTERM = $(CCC) -Ilibvterm/include -DINLINE="" -DVSNPRINTF=vim_vsnprintf
|
||||
CCCTERM = $(CCC_NF) -Ilibvterm/include $(ALL_CFLAGS) -DINLINE="" \
|
||||
-DVSNPRINTF=vim_vsnprintf \
|
||||
-DIS_COMBINING_FUNCTION=utf_iscomposing_uint \
|
||||
-DWCWIDTH_FUNCTION=utf_uint2cells
|
||||
|
||||
objects/term_encoding.o: libvterm/src/encoding.c $(TERM_DEPS)
|
||||
$(CCCTERM) -o $@ libvterm/src/encoding.c
|
||||
|
||||
|
||||
Vendored
+17
-3
@@ -7557,20 +7557,34 @@ $as_echo_n "checking --enable-terminal argument... " >&6; }
|
||||
# Check whether --enable-terminal was given.
|
||||
if test "${enable_terminal+set}" = set; then :
|
||||
enableval=$enable_terminal; enable_terminal="yes"
|
||||
else
|
||||
enable_terminal="auto"
|
||||
fi
|
||||
|
||||
if test "$enable_terminal" = "yes"; then
|
||||
if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
|
||||
if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny or small features" >&5
|
||||
$as_echo "cannot use terminal emulator with tiny or small features" >&6; }
|
||||
enable_terminal="no"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
if test "$enable_terminal" = "auto"; then
|
||||
enable_terminal="yes"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
|
||||
$as_echo "defaulting to yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
fi
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
if test "$enable_terminal" = "auto"; then
|
||||
enable_terminal="no"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
|
||||
$as_echo "defaulting to no" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
fi
|
||||
if test "$enable_terminal" = "yes"; then
|
||||
$as_echo "#define FEAT_TERMINAL 1" >>confdefs.h
|
||||
|
||||
+217
-22
@@ -249,7 +249,7 @@ open_buffer(
|
||||
netbeansFireChanges = oldFire;
|
||||
#endif
|
||||
/* Help buffer is filtered. */
|
||||
if (curbuf->b_help)
|
||||
if (bt_help(curbuf))
|
||||
fix_help_buffer();
|
||||
}
|
||||
else if (read_stdin)
|
||||
@@ -468,6 +468,31 @@ close_buffer(
|
||||
int del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE);
|
||||
int wipe_buf = (action == DOBUF_WIPE);
|
||||
|
||||
#ifdef FEAT_TERMINAL
|
||||
if (bt_terminal(buf))
|
||||
{
|
||||
if (term_job_running(buf->b_term))
|
||||
{
|
||||
if (wipe_buf || unload_buf)
|
||||
/* Wiping out or unloading a terminal buffer kills the job. */
|
||||
free_terminal(buf);
|
||||
else
|
||||
{
|
||||
/* The job keeps running, hide the buffer. */
|
||||
del_buf = FALSE;
|
||||
unload_buf = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* A terminal buffer is wiped out if the job has finished. */
|
||||
del_buf = TRUE;
|
||||
unload_buf = TRUE;
|
||||
wipe_buf = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
/*
|
||||
* Force unloading or deleting when 'bufhidden' says so.
|
||||
* The caller must take care of NOT deleting/freeing when 'bufhidden' is
|
||||
@@ -862,7 +887,7 @@ free_buffer(buf_T *buf)
|
||||
channel_buffer_free(buf);
|
||||
#endif
|
||||
#ifdef FEAT_TERMINAL
|
||||
free_terminal(buf->b_term);
|
||||
free_terminal(buf);
|
||||
#endif
|
||||
|
||||
buf_hashtab_remove(buf);
|
||||
@@ -1627,7 +1652,7 @@ do_buffer(
|
||||
if (bufIsChanged(curbuf))
|
||||
#endif
|
||||
{
|
||||
EMSG(_(e_nowrtmsg));
|
||||
no_write_message();
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
@@ -1715,7 +1740,7 @@ set_curbuf(buf_T *buf, int action)
|
||||
u_sync(FALSE);
|
||||
close_buffer(prevbuf == curwin->w_buffer ? curwin : NULL, prevbuf,
|
||||
unload ? action : (action == DOBUF_GOTO
|
||||
&& !P_HID(prevbuf)
|
||||
&& !buf_hide(prevbuf)
|
||||
&& !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0, FALSE);
|
||||
#ifdef FEAT_WINDOWS
|
||||
if (curwin != previouswin && win_valid(previouswin))
|
||||
@@ -1876,6 +1901,28 @@ do_autochdir(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
no_write_message(void)
|
||||
{
|
||||
#ifdef FEAT_TERMINAL
|
||||
if (term_job_running(curbuf->b_term))
|
||||
EMSG(_("E948: Job still running (add ! to end the job)"));
|
||||
else
|
||||
#endif
|
||||
EMSG(_("E37: No write since last change (add ! to override)"));
|
||||
}
|
||||
|
||||
void
|
||||
no_write_message_nobang(void)
|
||||
{
|
||||
#ifdef FEAT_TERMINAL
|
||||
if (term_job_running(curbuf->b_term))
|
||||
EMSG(_("E948: Job still running"));
|
||||
else
|
||||
#endif
|
||||
EMSG(_("E37: No write since last change"));
|
||||
}
|
||||
|
||||
/*
|
||||
* functions for dealing with the buffer list
|
||||
*/
|
||||
@@ -3013,6 +3060,8 @@ buflist_list(exarg_T *eap)
|
||||
buf_T *buf;
|
||||
int len;
|
||||
int i;
|
||||
int ro_char;
|
||||
int changed_char;
|
||||
|
||||
for (buf = firstbuf; buf != NULL && !got_int; buf = buf->b_next)
|
||||
{
|
||||
@@ -3039,6 +3088,21 @@ buflist_list(exarg_T *eap)
|
||||
if (message_filtered(NameBuff))
|
||||
continue;
|
||||
|
||||
changed_char = (buf->b_flags & BF_READERR) ? 'x'
|
||||
: (bufIsChanged(buf) ? '+' : ' ');
|
||||
#ifdef FEAT_TERMINAL
|
||||
if (term_job_running(buf->b_term))
|
||||
{
|
||||
ro_char = 'R';
|
||||
changed_char = ' '; /* bufIsChanged() returns TRUE to avoid
|
||||
* closing, but it's not actually changed. */
|
||||
}
|
||||
else if (buf->b_term != NULL)
|
||||
ro_char = 'F';
|
||||
else
|
||||
#endif
|
||||
ro_char = !buf->b_p_ma ? '-' : (buf->b_p_ro ? '=' : ' ');
|
||||
|
||||
msg_putchar('\n');
|
||||
len = vim_snprintf((char *)IObuff, IOSIZE - 20, "%3d%c%c%c%c%c \"%s\"",
|
||||
buf->b_fnum,
|
||||
@@ -3047,9 +3111,8 @@ buflist_list(exarg_T *eap)
|
||||
(curwin->w_alt_fnum == buf->b_fnum ? '#' : ' '),
|
||||
buf->b_ml.ml_mfp == NULL ? ' ' :
|
||||
(buf->b_nwindows == 0 ? 'h' : 'a'),
|
||||
!buf->b_p_ma ? '-' : (buf->b_p_ro ? '=' : ' '),
|
||||
(buf->b_flags & BF_READERR) ? 'x'
|
||||
: (bufIsChanged(buf) ? '+' : ' '),
|
||||
ro_char,
|
||||
changed_char,
|
||||
NameBuff);
|
||||
if (len > IOSIZE - 20)
|
||||
len = IOSIZE - 20;
|
||||
@@ -3862,8 +3925,8 @@ build_stl_str_hl(
|
||||
char_u *t;
|
||||
int byteval;
|
||||
#ifdef FEAT_EVAL
|
||||
win_T *o_curwin;
|
||||
buf_T *o_curbuf;
|
||||
win_T *save_curwin;
|
||||
buf_T *save_curbuf;
|
||||
#endif
|
||||
int empty_line;
|
||||
colnr_T virtcol;
|
||||
@@ -3905,6 +3968,9 @@ build_stl_str_hl(
|
||||
char_u tmp[TMPLEN];
|
||||
char_u *usefmt = fmt;
|
||||
struct stl_hlrec *sp;
|
||||
int save_must_redraw = must_redraw;
|
||||
int save_redr_type = curwin->w_redr_type;
|
||||
int save_highlight_shcnaged = need_highlight_changed;
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
/*
|
||||
@@ -4214,15 +4280,15 @@ build_stl_str_hl(
|
||||
vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
|
||||
set_internal_string_var((char_u *)"actual_curbuf", tmp);
|
||||
|
||||
o_curbuf = curbuf;
|
||||
o_curwin = curwin;
|
||||
save_curbuf = curbuf;
|
||||
save_curwin = curwin;
|
||||
curwin = wp;
|
||||
curbuf = wp->w_buffer;
|
||||
|
||||
str = eval_to_string_safe(p, &t, use_sandbox);
|
||||
|
||||
curwin = o_curwin;
|
||||
curbuf = o_curbuf;
|
||||
curwin = save_curwin;
|
||||
curbuf = save_curbuf;
|
||||
do_unlet((char_u *)"g:actual_curbuf", TRUE);
|
||||
|
||||
if (str != NULL && *str != 0)
|
||||
@@ -4677,6 +4743,13 @@ build_stl_str_hl(
|
||||
sp->userhl = 0;
|
||||
}
|
||||
|
||||
/* We do not want redrawing a stausline, ruler, title, etc. to trigger
|
||||
* another redraw, it may cause an endless loop. This happens when a
|
||||
* statusline changes a highlight group. */
|
||||
must_redraw = save_must_redraw;
|
||||
curwin->w_redr_type = save_redr_type;
|
||||
need_highlight_changed = save_highlight_shcnaged;
|
||||
|
||||
return width;
|
||||
}
|
||||
#endif /* FEAT_STL_OPT */
|
||||
@@ -4971,12 +5044,12 @@ do_arg_all(
|
||||
|
||||
if (i == opened_len && !keep_tabs)/* close this window */
|
||||
{
|
||||
if (P_HID(buf) || forceit || buf->b_nwindows > 1
|
||||
if (buf_hide(buf) || forceit || buf->b_nwindows > 1
|
||||
|| !bufIsChanged(buf))
|
||||
{
|
||||
/* If the buffer was changed, and we would like to hide it,
|
||||
* try autowriting. */
|
||||
if (!P_HID(buf) && buf->b_nwindows <= 1
|
||||
if (!buf_hide(buf) && buf->b_nwindows <= 1
|
||||
&& bufIsChanged(buf))
|
||||
{
|
||||
#ifdef FEAT_AUTOCMD
|
||||
@@ -5003,7 +5076,7 @@ do_arg_all(
|
||||
#ifdef FEAT_WINDOWS
|
||||
else
|
||||
{
|
||||
win_close(wp, !P_HID(buf) && !bufIsChanged(buf));
|
||||
win_close(wp, !buf_hide(buf) && !bufIsChanged(buf));
|
||||
# ifdef FEAT_AUTOCMD
|
||||
/* check if autocommands removed the next window */
|
||||
if (!win_valid(wpnext))
|
||||
@@ -5102,7 +5175,7 @@ do_arg_all(
|
||||
}
|
||||
(void)do_ecmd(0, alist_name(&AARGLIST(alist)[i]), NULL, NULL,
|
||||
ECMD_ONE,
|
||||
((P_HID(curwin->w_buffer)
|
||||
((buf_hide(curwin->w_buffer)
|
||||
|| bufIsChanged(curwin->w_buffer)) ? ECMD_HIDE : 0)
|
||||
+ ECMD_OLDBUF, curwin);
|
||||
#ifdef FEAT_AUTOCMD
|
||||
@@ -5357,7 +5430,7 @@ ex_buffer_all(exarg_T *eap)
|
||||
*/
|
||||
for (wp = lastwin; open_wins > count; )
|
||||
{
|
||||
r = (P_HID(wp->w_buffer) || !bufIsChanged(wp->w_buffer)
|
||||
r = (buf_hide(wp->w_buffer) || !bufIsChanged(wp->w_buffer)
|
||||
|| autowrite(wp->w_buffer, FALSE) == OK);
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (!win_valid(wp))
|
||||
@@ -5369,7 +5442,7 @@ ex_buffer_all(exarg_T *eap)
|
||||
#endif
|
||||
if (r)
|
||||
{
|
||||
win_close(wp, !P_HID(wp->w_buffer));
|
||||
win_close(wp, !buf_hide(wp->w_buffer));
|
||||
--open_wins;
|
||||
wp = lastwin;
|
||||
}
|
||||
@@ -5643,6 +5716,9 @@ write_viminfo_bufferlist(FILE *fp)
|
||||
|| !buf->b_p_bl
|
||||
#ifdef FEAT_QUICKFIX
|
||||
|| bt_quickfix(buf)
|
||||
#endif
|
||||
#ifdef FEAT_TERMINAL
|
||||
|| bt_terminal(buf)
|
||||
#endif
|
||||
|| removable(buf->b_ffname))
|
||||
continue;
|
||||
@@ -5660,6 +5736,82 @@ write_viminfo_bufferlist(FILE *fp)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return TRUE if "buf" is the quickfix buffer.
|
||||
*/
|
||||
int
|
||||
bt_quickfix(buf_T *buf)
|
||||
{
|
||||
return buf != NULL && buf->b_p_bt[0] == 'q';
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "buf" is a terminal buffer.
|
||||
*/
|
||||
int
|
||||
bt_terminal(buf_T *buf)
|
||||
{
|
||||
return buf != NULL && buf->b_p_bt[0] == 't';
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "buf" is a help buffer.
|
||||
*/
|
||||
int
|
||||
bt_help(buf_T *buf)
|
||||
{
|
||||
return buf != NULL && buf->b_help;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "buf" is a "nofile", "acwrite" or "terminal" buffer.
|
||||
* This means the buffer name is not a file name.
|
||||
*/
|
||||
int
|
||||
bt_nofile(buf_T *buf)
|
||||
{
|
||||
return buf != NULL && ((buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f')
|
||||
|| buf->b_p_bt[0] == 'a'
|
||||
|| buf->b_p_bt[0] == 't');
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "buf" is a "nowrite", "nofile" or "terminal" buffer.
|
||||
*/
|
||||
int
|
||||
bt_dontwrite(buf_T *buf)
|
||||
{
|
||||
return buf != NULL && (buf->b_p_bt[0] == 'n' || buf->b_p_bt[0] == 't');
|
||||
}
|
||||
|
||||
int
|
||||
bt_dontwrite_msg(buf_T *buf)
|
||||
{
|
||||
if (bt_dontwrite(buf))
|
||||
{
|
||||
EMSG(_("E382: Cannot write, 'buftype' option is set"));
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if the buffer should be hidden, according to 'hidden', ":hide"
|
||||
* and 'bufhidden'.
|
||||
*/
|
||||
int
|
||||
buf_hide(buf_T *buf)
|
||||
{
|
||||
/* 'bufhidden' overrules 'hidden' and ":hide", check it first */
|
||||
switch (buf->b_p_bh[0])
|
||||
{
|
||||
case 'u': /* "unload" */
|
||||
case 'w': /* "wipe" */
|
||||
case 'd': return FALSE; /* "delete" */
|
||||
case 'h': return TRUE; /* "hide" */
|
||||
}
|
||||
return (p_hid || cmdmod.hide);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return special buffer name.
|
||||
@@ -5693,8 +5845,8 @@ buf_spname(buf_T *buf)
|
||||
if (buf->b_term != NULL)
|
||||
return term_get_status_text(buf->b_term);
|
||||
#endif
|
||||
if (buf->b_sfname != NULL)
|
||||
return buf->b_sfname;
|
||||
if (buf->b_fname != NULL)
|
||||
return buf->b_fname;
|
||||
return (char_u *)_("[Scratch]");
|
||||
}
|
||||
|
||||
@@ -5703,9 +5855,52 @@ buf_spname(buf_T *buf)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \
|
||||
#if defined(FEAT_JOB_CHANNEL) \
|
||||
|| defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) \
|
||||
|| defined(PROTO)
|
||||
# define SWITCH_TO_WIN
|
||||
|
||||
/*
|
||||
* Find a window that contains "buf" and switch to it.
|
||||
* If there is no such window, use the current window and change "curbuf".
|
||||
* Caller must initialize save_curbuf to NULL.
|
||||
* restore_win_for_buf() MUST be called later!
|
||||
*/
|
||||
void
|
||||
switch_to_win_for_buf(
|
||||
buf_T *buf,
|
||||
win_T **save_curwinp,
|
||||
tabpage_T **save_curtabp,
|
||||
bufref_T *save_curbuf)
|
||||
{
|
||||
win_T *wp;
|
||||
tabpage_T *tp;
|
||||
|
||||
if (find_win_for_buf(buf, &wp, &tp) == FAIL)
|
||||
switch_buffer(save_curbuf, buf);
|
||||
else if (switch_win(save_curwinp, save_curtabp, wp, tp, TRUE) == FAIL)
|
||||
{
|
||||
restore_win(*save_curwinp, *save_curtabp, TRUE);
|
||||
switch_buffer(save_curbuf, buf);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
restore_win_for_buf(
|
||||
win_T *save_curwin,
|
||||
tabpage_T *save_curtab,
|
||||
bufref_T *save_curbuf)
|
||||
{
|
||||
if (save_curbuf->br_buf == NULL)
|
||||
restore_win(save_curwin, save_curtab, TRUE);
|
||||
else
|
||||
restore_buffer(save_curbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \
|
||||
|| defined(SWITCH_TO_WIN) \
|
||||
|| defined(PROTO)
|
||||
/*
|
||||
* Find a window for buffer "buf".
|
||||
* If found OK is returned and "wp" and "tp" are set to the window and tabpage.
|
||||
|
||||
+657
-271
File diff suppressed because it is too large
Load Diff
@@ -1535,6 +1535,22 @@ skipwhite(char_u *q)
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
* getwhitecols: return the number of whitespace
|
||||
* columns (bytes) at the start of a given line
|
||||
*/
|
||||
int
|
||||
getwhitecols_curline()
|
||||
{
|
||||
return getwhitecols(ml_get_curline());
|
||||
}
|
||||
|
||||
int
|
||||
getwhitecols(char_u *p)
|
||||
{
|
||||
return skipwhite(p) - p;
|
||||
}
|
||||
|
||||
/*
|
||||
* skip over digits
|
||||
*/
|
||||
|
||||
+14
-4
@@ -2095,16 +2095,26 @@ fi
|
||||
AC_MSG_CHECKING(--enable-terminal argument)
|
||||
AC_ARG_ENABLE(terminal,
|
||||
[ --enable-terminal Enable terminal emulation support.],
|
||||
[enable_terminal="yes"], )
|
||||
if test "$enable_terminal" = "yes"; then
|
||||
[enable_terminal="yes"], [enable_terminal="auto"])
|
||||
if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
|
||||
if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
|
||||
AC_MSG_RESULT([cannot use terminal emulator with tiny or small features])
|
||||
enable_terminal="no"
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
if test "$enable_terminal" = "auto"; then
|
||||
enable_terminal="yes"
|
||||
AC_MSG_RESULT(defaulting to yes)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$enable_terminal" = "auto"; then
|
||||
enable_terminal="no"
|
||||
AC_MSG_RESULT(defaulting to no)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
if test "$enable_terminal" = "yes"; then
|
||||
AC_DEFINE(FEAT_TERMINAL)
|
||||
|
||||
+52
-31
@@ -1660,6 +1660,40 @@ diff_equal_entry(diff_T *dp, int idx1, int idx2)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare the characters at "p1" and "p2". If they are equal (possibly
|
||||
* ignoring case) return TRUE and set "len" to the number of bytes.
|
||||
*/
|
||||
static int
|
||||
diff_equal_char(char_u *p1, char_u *p2, int *len)
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
int l = (*mb_ptr2len)(p1);
|
||||
|
||||
if (l != (*mb_ptr2len)(p2))
|
||||
return FALSE;
|
||||
if (l > 1)
|
||||
{
|
||||
if (STRNCMP(p1, p2, l) != 0
|
||||
&& (!enc_utf8
|
||||
|| !(diff_flags & DIFF_ICASE)
|
||||
|| utf_fold(utf_ptr2char(p1))
|
||||
!= utf_fold(utf_ptr2char(p2))))
|
||||
return FALSE;
|
||||
*len = l;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if ((*p1 != *p2)
|
||||
&& (!(diff_flags & DIFF_ICASE)
|
||||
|| TOLOWER_LOC(*p1) != TOLOWER_LOC(*p2)))
|
||||
return FALSE;
|
||||
*len = 1;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare strings "s1" and "s2" according to 'diffopt'.
|
||||
* Return non-zero when they are different.
|
||||
@@ -1668,9 +1702,7 @@ diff_equal_entry(diff_T *dp, int idx1, int idx2)
|
||||
diff_cmp(char_u *s1, char_u *s2)
|
||||
{
|
||||
char_u *p1, *p2;
|
||||
#ifdef FEAT_MBYTE
|
||||
int l;
|
||||
#endif
|
||||
|
||||
if ((diff_flags & (DIFF_ICASE | DIFF_IWHITE)) == 0)
|
||||
return STRCMP(s1, s2);
|
||||
@@ -1689,30 +1721,10 @@ diff_cmp(char_u *s1, char_u *s2)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
l = (*mb_ptr2len)(p1);
|
||||
if (l != (*mb_ptr2len)(p2))
|
||||
if (!diff_equal_char(p1, p2, &l))
|
||||
break;
|
||||
if (l > 1)
|
||||
{
|
||||
if (STRNCMP(p1, p2, l) != 0
|
||||
&& (!enc_utf8
|
||||
|| !(diff_flags & DIFF_ICASE)
|
||||
|| utf_fold(utf_ptr2char(p1))
|
||||
!= utf_fold(utf_ptr2char(p2))))
|
||||
break;
|
||||
p1 += l;
|
||||
p2 += l;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (*p1 != *p2 && (!(diff_flags & DIFF_ICASE)
|
||||
|| TOLOWER_LOC(*p1) != TOLOWER_LOC(*p2)))
|
||||
break;
|
||||
++p1;
|
||||
++p2;
|
||||
}
|
||||
p1 += l;
|
||||
p2 += l;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1969,6 +1981,8 @@ diff_find_change(
|
||||
int idx;
|
||||
int off;
|
||||
int added = TRUE;
|
||||
char_u *p1, *p2;
|
||||
int l;
|
||||
|
||||
/* Make a copy of the line, the next ml_get() will invalidate it. */
|
||||
line_org = vim_strsave(ml_get_buf(wp->w_buffer, lnum, FALSE));
|
||||
@@ -2017,10 +2031,11 @@ diff_find_change(
|
||||
}
|
||||
else
|
||||
{
|
||||
if (line_org[si_org] != line_new[si_new])
|
||||
if (!diff_equal_char(line_org + si_org, line_new + si_new,
|
||||
&l))
|
||||
break;
|
||||
++si_org;
|
||||
++si_new;
|
||||
si_org += l;
|
||||
si_new += l;
|
||||
}
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
@@ -2056,10 +2071,16 @@ diff_find_change(
|
||||
}
|
||||
else
|
||||
{
|
||||
if (line_org[ei_org] != line_new[ei_new])
|
||||
p1 = line_org + ei_org;
|
||||
p2 = line_new + ei_new;
|
||||
#ifdef FEAT_MBYTE
|
||||
p1 -= (*mb_head_off)(line_org, p1);
|
||||
p2 -= (*mb_head_off)(line_new, p2);
|
||||
#endif
|
||||
if (!diff_equal_char(p1, p2, &l))
|
||||
break;
|
||||
--ei_org;
|
||||
--ei_new;
|
||||
ei_org -= l;
|
||||
ei_new -= l;
|
||||
}
|
||||
}
|
||||
if (*endp < ei_org)
|
||||
|
||||
+9
-7
@@ -5196,7 +5196,7 @@ ins_complete(int c, int enable_pum)
|
||||
* first non_blank in the line, if it is not a wordchar
|
||||
* include it to get a better pattern, but then we don't
|
||||
* want the "\\<" prefix, check it bellow */
|
||||
compl_col = (colnr_T)(skipwhite(line) - line);
|
||||
compl_col = (colnr_T)getwhitecols(line);
|
||||
compl_startpos.col = compl_col;
|
||||
compl_startpos.lnum = curwin->w_cursor.lnum;
|
||||
compl_cont_status &= ~CONT_SOL; /* clear SOL if present */
|
||||
@@ -5362,7 +5362,7 @@ ins_complete(int c, int enable_pum)
|
||||
}
|
||||
else if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
{
|
||||
compl_col = (colnr_T)(skipwhite(line) - line);
|
||||
compl_col = (colnr_T)getwhitecols(line);
|
||||
compl_length = (int)curs_col - (int)compl_col;
|
||||
if (compl_length < 0) /* cursor in indent: empty pattern */
|
||||
compl_length = 0;
|
||||
@@ -8222,8 +8222,7 @@ in_cinkeys(
|
||||
{
|
||||
/* "0=word": Check if there are only blanks before the
|
||||
* word. */
|
||||
line = ml_get_curline();
|
||||
if ((int)(skipwhite(line) - line) !=
|
||||
if (getwhitecols(line) !=
|
||||
(int)(curwin->w_cursor.col - (p - look)))
|
||||
match = FALSE;
|
||||
}
|
||||
@@ -9432,7 +9431,7 @@ ins_mousescroll(int dir)
|
||||
{
|
||||
pos_T tpos;
|
||||
# if defined(FEAT_WINDOWS)
|
||||
win_T *old_curwin = curwin;
|
||||
win_T *old_curwin = curwin, *wp;
|
||||
# endif
|
||||
# ifdef FEAT_INS_EXPAND
|
||||
int did_scroll = FALSE;
|
||||
@@ -9452,7 +9451,10 @@ ins_mousescroll(int dir)
|
||||
col = mouse_col;
|
||||
|
||||
/* find the window at the pointer coordinates */
|
||||
curwin = mouse_find_win(&row, &col);
|
||||
wp = mouse_find_win(&row, &col);
|
||||
if (wp == NULL)
|
||||
return;
|
||||
curwin = wp;
|
||||
curbuf = curwin->w_buffer;
|
||||
}
|
||||
if (curwin == old_curwin)
|
||||
@@ -9713,7 +9715,7 @@ ins_left(
|
||||
#if defined(FEAT_XIM) && (defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MACVIM))
|
||||
/* Only call start_arrow() when not busy with preediting, it will
|
||||
* break undo. K_LEFT is inserted in im_correct_cursor(). */
|
||||
if (!im_is_preediting())
|
||||
if (p_imst == IM_OVER_THE_SPOT || !im_is_preediting())
|
||||
#endif
|
||||
{
|
||||
start_arrow_with_change(&tpos, end_change);
|
||||
|
||||
+28
-8
@@ -187,6 +187,10 @@ static struct vimvar
|
||||
{VV_NAME("t_none", VAR_NUMBER), VV_RO},
|
||||
{VV_NAME("t_job", VAR_NUMBER), VV_RO},
|
||||
{VV_NAME("t_channel", VAR_NUMBER), VV_RO},
|
||||
{VV_NAME("termrgbresp", VAR_STRING), VV_RO},
|
||||
{VV_NAME("termu7resp", VAR_STRING), VV_RO},
|
||||
{VV_NAME("termstyleresp", VAR_STRING), VV_RO},
|
||||
{VV_NAME("termblinkresp", VAR_STRING), VV_RO},
|
||||
};
|
||||
|
||||
/* shorthand */
|
||||
@@ -5329,6 +5333,10 @@ garbage_collect(int testing)
|
||||
abort = abort || set_ref_in_quickfix(copyID);
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_TERMINAL
|
||||
abort = abort || set_ref_in_term(copyID);
|
||||
#endif
|
||||
|
||||
if (!abort)
|
||||
{
|
||||
/*
|
||||
@@ -5679,9 +5687,9 @@ get_var_special_name(int nr)
|
||||
* If the memory is allocated "tofree" is set to it, otherwise NULL.
|
||||
* "numbuf" is used for a number.
|
||||
* When "copyID" is not NULL replace recursive lists and dicts with "...".
|
||||
* When both "echo_style" and "dict_val" are FALSE, put quotes around stings as
|
||||
* "string()", otherwise does not put quotes around strings, as ":echo"
|
||||
* displays values.
|
||||
* When both "echo_style" and "composite_val" are FALSE, put quotes around
|
||||
* stings as "string()", otherwise does not put quotes around strings, as
|
||||
* ":echo" displays values.
|
||||
* When "restore_copyID" is FALSE, repeated items in dictionaries and lists
|
||||
* are replaced with "...".
|
||||
* May return NULL.
|
||||
@@ -5694,7 +5702,7 @@ echo_string_core(
|
||||
int copyID,
|
||||
int echo_style,
|
||||
int restore_copyID,
|
||||
int dict_val)
|
||||
int composite_val)
|
||||
{
|
||||
static int recurse = 0;
|
||||
char_u *r = NULL;
|
||||
@@ -5717,10 +5725,12 @@ echo_string_core(
|
||||
switch (tv->v_type)
|
||||
{
|
||||
case VAR_STRING:
|
||||
if (echo_style && !dict_val)
|
||||
if (echo_style && !composite_val)
|
||||
{
|
||||
*tofree = NULL;
|
||||
r = get_tv_string_buf(tv, numbuf);
|
||||
r = tv->vval.v_string;
|
||||
if (r == NULL)
|
||||
r = (char_u *)"";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5837,10 +5847,19 @@ echo_string_core(
|
||||
|
||||
case VAR_NUMBER:
|
||||
case VAR_UNKNOWN:
|
||||
*tofree = NULL;
|
||||
r = get_tv_string_buf(tv, numbuf);
|
||||
break;
|
||||
|
||||
case VAR_JOB:
|
||||
case VAR_CHANNEL:
|
||||
*tofree = NULL;
|
||||
r = get_tv_string_buf(tv, numbuf);
|
||||
if (composite_val)
|
||||
{
|
||||
*tofree = string_quote(r, FALSE);
|
||||
r = *tofree;
|
||||
}
|
||||
break;
|
||||
|
||||
case VAR_FLOAT:
|
||||
@@ -8066,8 +8085,9 @@ get_user_input(
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
#ifdef NO_CONSOLE_INPUT
|
||||
/* While starting up, there is no place to enter text. */
|
||||
if (no_console_input())
|
||||
/* While starting up, there is no place to enter text. When running tests
|
||||
* with --not-a-term we assume feedkeys() will be used. */
|
||||
if (no_console_input() && !is_not_a_term())
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
||||
+250
-100
@@ -328,6 +328,7 @@ static void f_searchpairpos(typval_T *argvars, typval_T *rettv);
|
||||
static void f_searchpos(typval_T *argvars, typval_T *rettv);
|
||||
static void f_server2client(typval_T *argvars, typval_T *rettv);
|
||||
static void f_serverlist(typval_T *argvars, typval_T *rettv);
|
||||
static void f_setbufline(typval_T *argvars, typval_T *rettv);
|
||||
static void f_setbufvar(typval_T *argvars, typval_T *rettv);
|
||||
static void f_setcharsearch(typval_T *argvars, typval_T *rettv);
|
||||
static void f_setcmdpos(typval_T *argvars, typval_T *rettv);
|
||||
@@ -392,6 +393,7 @@ static void f_tagfiles(typval_T *argvars, typval_T *rettv);
|
||||
static void f_tempname(typval_T *argvars, typval_T *rettv);
|
||||
static void f_test_alloc_fail(typval_T *argvars, typval_T *rettv);
|
||||
static void f_test_autochdir(typval_T *argvars, typval_T *rettv);
|
||||
static void f_test_feedinput(typval_T *argvars, typval_T *rettv);
|
||||
static void f_test_override(typval_T *argvars, typval_T *rettv);
|
||||
static void f_test_garbagecollect_now(typval_T *argvars, typval_T *rettv);
|
||||
static void f_test_ignore_error(typval_T *argvars, typval_T *rettv);
|
||||
@@ -764,6 +766,7 @@ static struct fst
|
||||
{"searchpos", 1, 4, f_searchpos},
|
||||
{"server2client", 2, 2, f_server2client},
|
||||
{"serverlist", 0, 0, f_serverlist},
|
||||
{"setbufline", 3, 3, f_setbufline},
|
||||
{"setbufvar", 3, 3, f_setbufvar},
|
||||
{"setcharsearch", 1, 1, f_setcharsearch},
|
||||
{"setcmdpos", 1, 1, f_setcmdpos},
|
||||
@@ -830,8 +833,26 @@ static struct fst
|
||||
{"tanh", 1, 1, f_tanh},
|
||||
#endif
|
||||
{"tempname", 0, 0, f_tempname},
|
||||
#ifdef FEAT_TERMINAL
|
||||
{"term_getaltscreen", 1, 1, f_term_getaltscreen},
|
||||
{"term_getattr", 2, 2, f_term_getattr},
|
||||
{"term_getcursor", 1, 1, f_term_getcursor},
|
||||
{"term_getjob", 1, 1, f_term_getjob},
|
||||
{"term_getline", 2, 2, f_term_getline},
|
||||
{"term_getscrolled", 1, 1, f_term_getscrolled},
|
||||
{"term_getsize", 1, 1, f_term_getsize},
|
||||
{"term_getstatus", 1, 1, f_term_getstatus},
|
||||
{"term_gettitle", 1, 1, f_term_gettitle},
|
||||
{"term_gettty", 1, 2, f_term_gettty},
|
||||
{"term_list", 0, 0, f_term_list},
|
||||
{"term_scrape", 2, 2, f_term_scrape},
|
||||
{"term_sendkeys", 2, 2, f_term_sendkeys},
|
||||
{"term_start", 1, 2, f_term_start},
|
||||
{"term_wait", 1, 2, f_term_wait},
|
||||
#endif
|
||||
{"test_alloc_fail", 3, 3, f_test_alloc_fail},
|
||||
{"test_autochdir", 0, 0, f_test_autochdir},
|
||||
{"test_feedinput", 1, 1, f_test_feedinput},
|
||||
{"test_garbagecollect_now", 0, 0, f_test_garbagecollect_now},
|
||||
{"test_ignore_error", 1, 1, f_test_ignore_error},
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
@@ -1540,7 +1561,7 @@ buflist_find_by_name(char_u *name, int curtab_only)
|
||||
/*
|
||||
* Get buffer by number or pattern.
|
||||
*/
|
||||
static buf_T *
|
||||
buf_T *
|
||||
get_buf_tv(typval_T *tv, int curtab_only)
|
||||
{
|
||||
char_u *name = tv->vval.v_string;
|
||||
@@ -1915,6 +1936,9 @@ f_ch_logfile(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
char_u *opt = (char_u *)"";
|
||||
char_u buf[NUMBUFLEN];
|
||||
|
||||
/* Don't open a file in restricted mode. */
|
||||
if (check_restricted() || check_secure())
|
||||
return;
|
||||
fname = get_tv_string(&argvars[0]);
|
||||
if (argvars[1].v_type == VAR_STRING)
|
||||
opt = get_tv_string_buf(&argvars[1], buf);
|
||||
@@ -2001,7 +2025,7 @@ f_ch_setoptions(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
return;
|
||||
clear_job_options(&opt);
|
||||
if (get_job_options(&argvars[1], &opt,
|
||||
JO_CB_ALL + JO_TIMEOUT_ALL + JO_MODE_ALL) == OK)
|
||||
JO_CB_ALL + JO_TIMEOUT_ALL + JO_MODE_ALL, 0) == OK)
|
||||
channel_set_options(channel, &opt);
|
||||
free_job_options(&opt);
|
||||
}
|
||||
@@ -2025,7 +2049,7 @@ f_ch_status(typval_T *argvars, typval_T *rettv)
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
clear_job_options(&opt);
|
||||
if (get_job_options(&argvars[1], &opt, JO_PART) == OK
|
||||
if (get_job_options(&argvars[1], &opt, JO_PART, 0) == OK
|
||||
&& (opt.jo_set & JO_PART))
|
||||
part = opt.jo_part;
|
||||
}
|
||||
@@ -2314,8 +2338,45 @@ f_count(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
long n = 0;
|
||||
int ic = FALSE;
|
||||
int error = FALSE;
|
||||
|
||||
if (argvars[0].v_type == VAR_LIST)
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
ic = (int)get_tv_number_chk(&argvars[2], &error);
|
||||
|
||||
if (argvars[0].v_type == VAR_STRING)
|
||||
{
|
||||
char_u *expr = get_tv_string_chk(&argvars[1]);
|
||||
char_u *p = argvars[0].vval.v_string;
|
||||
char_u *next;
|
||||
|
||||
if (!error && expr != NULL && p != NULL)
|
||||
{
|
||||
if (ic)
|
||||
{
|
||||
size_t len = STRLEN(expr);
|
||||
|
||||
while (*p != NUL)
|
||||
{
|
||||
if (MB_STRNICMP(p, expr, len) == 0)
|
||||
{
|
||||
++n;
|
||||
p += len;
|
||||
}
|
||||
else
|
||||
MB_PTR_ADV(p);
|
||||
}
|
||||
}
|
||||
else
|
||||
while ((next = (char_u *)strstr((char *)p, (char *)expr))
|
||||
!= NULL)
|
||||
{
|
||||
++n;
|
||||
p = next + STRLEN(expr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (argvars[0].v_type == VAR_LIST)
|
||||
{
|
||||
listitem_T *li;
|
||||
list_T *l;
|
||||
@@ -2326,9 +2387,6 @@ f_count(typval_T *argvars, typval_T *rettv)
|
||||
li = l->lv_first;
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
int error = FALSE;
|
||||
|
||||
ic = (int)get_tv_number_chk(&argvars[2], &error);
|
||||
if (argvars[3].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
idx = (long)get_tv_number_chk(&argvars[3], &error);
|
||||
@@ -2356,11 +2414,8 @@ f_count(typval_T *argvars, typval_T *rettv)
|
||||
|
||||
if ((d = argvars[0].vval.v_dict) != NULL)
|
||||
{
|
||||
int error = FALSE;
|
||||
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
ic = (int)get_tv_number_chk(&argvars[2], &error);
|
||||
if (argvars[3].v_type != VAR_UNKNOWN)
|
||||
EMSG(_(e_invarg));
|
||||
}
|
||||
@@ -4338,6 +4393,8 @@ f_getchar(typval_T *argvars, typval_T *rettv)
|
||||
/* Find the window at the mouse coordinates and compute the
|
||||
* text position. */
|
||||
win = mouse_find_win(&row, &col);
|
||||
if (win == NULL)
|
||||
return;
|
||||
(void)mouse_comp_pos(win, &row, &col, &lnum);
|
||||
# ifdef FEAT_WINDOWS
|
||||
for (wp = firstwin; wp != win; wp = wp->w_next)
|
||||
@@ -4764,7 +4821,7 @@ get_qf_loc_list(int is_qf, win_T *wp, typval_T *what_arg, typval_T *rettv)
|
||||
{
|
||||
if (rettv_list_alloc(rettv) == OK)
|
||||
if (is_qf || wp != NULL)
|
||||
(void)get_errorlist(wp, -1, rettv->vval.v_list);
|
||||
(void)get_errorlist(NULL, wp, -1, rettv->vval.v_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4776,7 +4833,7 @@ get_qf_loc_list(int is_qf, win_T *wp, typval_T *what_arg, typval_T *rettv)
|
||||
dict_T *d = what_arg->vval.v_dict;
|
||||
|
||||
if (d != NULL)
|
||||
get_errorlist_properties(wp, d, rettv->vval.v_dict);
|
||||
qf_get_properties(wp, d, rettv->vval.v_dict);
|
||||
}
|
||||
else
|
||||
EMSG(_(e_dictreq));
|
||||
@@ -5184,6 +5241,9 @@ get_win_info(win_T *wp, short tpnr, short winnr)
|
||||
dict_add_nr_str(dict, "width", wp->w_width, NULL);
|
||||
dict_add_nr_str(dict, "bufnr", wp->w_buffer->b_fnum, NULL);
|
||||
|
||||
#ifdef FEAT_TERMINAL
|
||||
dict_add_nr_str(dict, "terminal", bt_terminal(wp->w_buffer), NULL);
|
||||
#endif
|
||||
#ifdef FEAT_QUICKFIX
|
||||
dict_add_nr_str(dict, "quickfix", bt_quickfix(wp->w_buffer), NULL);
|
||||
dict_add_nr_str(dict, "loclist",
|
||||
@@ -5886,7 +5946,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
"termguicolors",
|
||||
#endif
|
||||
#ifdef FEAT_TERMINAL
|
||||
#if defined(FEAT_TERMINAL) && !defined(WIN3264)
|
||||
"terminal",
|
||||
#endif
|
||||
#ifdef TERMINFO
|
||||
@@ -6096,6 +6156,10 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
#ifdef FEAT_NETBEANS_INTG
|
||||
else if (STRICMP(name, "netbeans_enabled") == 0)
|
||||
n = netbeans_active();
|
||||
#endif
|
||||
#if defined(FEAT_TERMINAL) && defined(WIN3264)
|
||||
else if (STRICMP(name, "terminal") == 0)
|
||||
n = terminal_enabled();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -6459,8 +6523,9 @@ f_inputlist(typval_T *argvars, typval_T *rettv)
|
||||
int mouse_used;
|
||||
|
||||
#ifdef NO_CONSOLE_INPUT
|
||||
/* While starting up, there is no place to enter text. */
|
||||
if (no_console_input())
|
||||
/* While starting up, there is no place to enter text. When running tests
|
||||
* with --not-a-term we assume feedkeys() will be used. */
|
||||
if (no_console_input() && !is_not_a_term())
|
||||
return;
|
||||
#endif
|
||||
if (argvars[0].v_type != VAR_LIST || argvars[0].vval.v_list == NULL)
|
||||
@@ -6750,7 +6815,7 @@ f_job_setoptions(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
if (job == NULL)
|
||||
return;
|
||||
clear_job_options(&opt);
|
||||
if (get_job_options(&argvars[1], &opt, JO_STOPONEXIT + JO_EXIT_CB) == OK)
|
||||
if (get_job_options(&argvars[1], &opt, JO_STOPONEXIT + JO_EXIT_CB, 0) == OK)
|
||||
job_set_options(job, &opt);
|
||||
free_job_options(&opt);
|
||||
}
|
||||
@@ -7208,10 +7273,17 @@ f_mapcheck(typval_T *argvars, typval_T *rettv)
|
||||
get_maparg(argvars, rettv, FALSE);
|
||||
}
|
||||
|
||||
static void find_some_match(typval_T *argvars, typval_T *rettv, int start);
|
||||
typedef enum
|
||||
{
|
||||
MATCH_END, /* matchend() */
|
||||
MATCH_MATCH, /* match() */
|
||||
MATCH_STR, /* matchstr() */
|
||||
MATCH_LIST, /* matchlist() */
|
||||
MATCH_POS /* matchstrpos() */
|
||||
} matchtype_T;
|
||||
|
||||
static void
|
||||
find_some_match(typval_T *argvars, typval_T *rettv, int type)
|
||||
find_some_match(typval_T *argvars, typval_T *rettv, matchtype_T type)
|
||||
{
|
||||
char_u *str = NULL;
|
||||
long len = 0;
|
||||
@@ -7235,13 +7307,13 @@ find_some_match(typval_T *argvars, typval_T *rettv, int type)
|
||||
p_cpo = (char_u *)"";
|
||||
|
||||
rettv->vval.v_number = -1;
|
||||
if (type == 3 || type == 4)
|
||||
if (type == MATCH_LIST || type == MATCH_POS)
|
||||
{
|
||||
/* type 3: return empty list when there are no matches.
|
||||
* type 4: return ["", -1, -1, -1] */
|
||||
/* type MATCH_LIST: return empty list when there are no matches.
|
||||
* type MATCH_POS: return ["", -1, -1, -1] */
|
||||
if (rettv_list_alloc(rettv) == FAIL)
|
||||
goto theend;
|
||||
if (type == 4
|
||||
if (type == MATCH_POS
|
||||
&& (list_append_string(rettv->vval.v_list,
|
||||
(char_u *)"", 0) == FAIL
|
||||
|| list_append_number(rettv->vval.v_list,
|
||||
@@ -7256,7 +7328,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, int type)
|
||||
goto theend;
|
||||
}
|
||||
}
|
||||
else if (type == 2)
|
||||
else if (type == MATCH_STR)
|
||||
{
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
@@ -7368,7 +7440,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, int type)
|
||||
|
||||
if (match)
|
||||
{
|
||||
if (type == 4)
|
||||
if (type == MATCH_POS)
|
||||
{
|
||||
listitem_T *li1 = rettv->vval.v_list->lv_first;
|
||||
listitem_T *li2 = li1->li_next;
|
||||
@@ -7385,7 +7457,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, int type)
|
||||
if (l != NULL)
|
||||
li2->li_tv.vval.v_number = (varnumber_T)idx;
|
||||
}
|
||||
else if (type == 3)
|
||||
else if (type == MATCH_LIST)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -7405,7 +7477,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, int type)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (type == 2)
|
||||
else if (type == MATCH_STR)
|
||||
{
|
||||
/* return matched string */
|
||||
if (l != NULL)
|
||||
@@ -7418,7 +7490,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, int type)
|
||||
rettv->vval.v_number = idx;
|
||||
else
|
||||
{
|
||||
if (type != 0)
|
||||
if (type != MATCH_END)
|
||||
rettv->vval.v_number =
|
||||
(varnumber_T)(regmatch.startp[0] - str);
|
||||
else
|
||||
@@ -7430,12 +7502,11 @@ find_some_match(typval_T *argvars, typval_T *rettv, int type)
|
||||
vim_regfree(regmatch.regprog);
|
||||
}
|
||||
|
||||
if (type == 4 && l == NULL)
|
||||
theend:
|
||||
if (type == MATCH_POS && l == NULL && rettv->vval.v_list != NULL)
|
||||
/* matchstrpos() without a list: drop the second item. */
|
||||
listitem_remove(rettv->vval.v_list,
|
||||
rettv->vval.v_list->lv_first->li_next);
|
||||
|
||||
theend:
|
||||
vim_free(tofree);
|
||||
p_cpo = save_cpo;
|
||||
}
|
||||
@@ -7446,7 +7517,7 @@ theend:
|
||||
static void
|
||||
f_match(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
find_some_match(argvars, rettv, 1);
|
||||
find_some_match(argvars, rettv, MATCH_MATCH);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7614,7 +7685,7 @@ f_matchdelete(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
static void
|
||||
f_matchend(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
find_some_match(argvars, rettv, 0);
|
||||
find_some_match(argvars, rettv, MATCH_END);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7623,7 +7694,7 @@ f_matchend(typval_T *argvars, typval_T *rettv)
|
||||
static void
|
||||
f_matchlist(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
find_some_match(argvars, rettv, 3);
|
||||
find_some_match(argvars, rettv, MATCH_LIST);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7632,7 +7703,7 @@ f_matchlist(typval_T *argvars, typval_T *rettv)
|
||||
static void
|
||||
f_matchstr(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
find_some_match(argvars, rettv, 2);
|
||||
find_some_match(argvars, rettv, MATCH_STR);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7641,7 +7712,7 @@ f_matchstr(typval_T *argvars, typval_T *rettv)
|
||||
static void
|
||||
f_matchstrpos(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
find_some_match(argvars, rettv, 4);
|
||||
find_some_match(argvars, rettv, MATCH_POS);
|
||||
}
|
||||
|
||||
static void max_min(typval_T *argvars, typval_T *rettv, int domax);
|
||||
@@ -7813,6 +7884,10 @@ f_mode(typval_T *argvars, typval_T *rettv)
|
||||
buf[0] = 'x';
|
||||
buf[1] = '!';
|
||||
}
|
||||
#ifdef FEAT_TERMINAL
|
||||
else if (term_use_loop())
|
||||
buf[0] = 't';
|
||||
#endif
|
||||
else if (VIsual_active)
|
||||
{
|
||||
if (VIsual_select)
|
||||
@@ -8584,7 +8659,10 @@ remote_common(typval_T *argvars, typval_T *rettv, int expr)
|
||||
# endif
|
||||
{
|
||||
if (r != NULL)
|
||||
{
|
||||
EMSG(r); /* sending worked but evaluation failed */
|
||||
vim_free(r);
|
||||
}
|
||||
else
|
||||
EMSG2(_("E241: Unable to send to %s"), server_name);
|
||||
return;
|
||||
@@ -8644,6 +8722,8 @@ f_remote_foreground(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
argvars[1].v_type = VAR_STRING;
|
||||
argvars[1].vval.v_string = vim_strsave((char_u *)"foreground()");
|
||||
argvars[2].v_type = VAR_UNKNOWN;
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
remote_common(argvars, rettv, TRUE);
|
||||
vim_free(argvars[1].vval.v_string);
|
||||
# endif
|
||||
@@ -9823,6 +9903,118 @@ f_serverlist(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
rettv->vval.v_string = r;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set line or list of lines in buffer "buf".
|
||||
*/
|
||||
static void
|
||||
set_buffer_lines(buf_T *buf, linenr_T lnum, typval_T *lines, typval_T *rettv)
|
||||
{
|
||||
char_u *line = NULL;
|
||||
list_T *l = NULL;
|
||||
listitem_T *li = NULL;
|
||||
long added = 0;
|
||||
linenr_T lcount;
|
||||
buf_T *curbuf_save;
|
||||
int is_curbuf = buf == curbuf;
|
||||
|
||||
/* When using the current buffer ml_mfp will be set if needed. Useful when
|
||||
* setline() is used on startup. For other buffers the buffer must be
|
||||
* loaded. */
|
||||
if (buf == NULL || (!is_curbuf && buf->b_ml.ml_mfp == NULL) || lnum < 1)
|
||||
{
|
||||
rettv->vval.v_number = 1; /* FAIL */
|
||||
return;
|
||||
}
|
||||
|
||||
curbuf_save = curbuf;
|
||||
curbuf = buf;
|
||||
|
||||
lcount = curbuf->b_ml.ml_line_count;
|
||||
|
||||
if (lines->v_type == VAR_LIST)
|
||||
{
|
||||
l = lines->vval.v_list;
|
||||
li = l->lv_first;
|
||||
}
|
||||
else
|
||||
line = get_tv_string_chk(lines);
|
||||
|
||||
/* default result is zero == OK */
|
||||
for (;;)
|
||||
{
|
||||
if (l != NULL)
|
||||
{
|
||||
/* list argument, get next string */
|
||||
if (li == NULL)
|
||||
break;
|
||||
line = get_tv_string_chk(&li->li_tv);
|
||||
li = li->li_next;
|
||||
}
|
||||
|
||||
rettv->vval.v_number = 1; /* FAIL */
|
||||
if (line == NULL || lnum < 1 || lnum > curbuf->b_ml.ml_line_count + 1)
|
||||
break;
|
||||
|
||||
/* When coming here from Insert mode, sync undo, so that this can be
|
||||
* undone separately from what was previously inserted. */
|
||||
if (u_sync_once == 2)
|
||||
{
|
||||
u_sync_once = 1; /* notify that u_sync() was called */
|
||||
u_sync(TRUE);
|
||||
}
|
||||
|
||||
if (lnum <= curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
/* existing line, replace it */
|
||||
if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK)
|
||||
{
|
||||
changed_bytes(lnum, 0);
|
||||
if (is_curbuf && lnum == curwin->w_cursor.lnum)
|
||||
check_cursor_col();
|
||||
rettv->vval.v_number = 0; /* OK */
|
||||
}
|
||||
}
|
||||
else if (added > 0 || u_save(lnum - 1, lnum) == OK)
|
||||
{
|
||||
/* lnum is one past the last line, append the line */
|
||||
++added;
|
||||
if (ml_append(lnum - 1, line, (colnr_T)0, FALSE) == OK)
|
||||
rettv->vval.v_number = 0; /* OK */
|
||||
}
|
||||
|
||||
if (l == NULL) /* only one string argument */
|
||||
break;
|
||||
++lnum;
|
||||
}
|
||||
|
||||
if (added > 0)
|
||||
appended_lines_mark(lcount, added);
|
||||
|
||||
curbuf = curbuf_save;
|
||||
}
|
||||
|
||||
/*
|
||||
* "setbufline()" function
|
||||
*/
|
||||
static void
|
||||
f_setbufline(argvars, rettv)
|
||||
typval_T *argvars;
|
||||
typval_T *rettv;
|
||||
{
|
||||
linenr_T lnum;
|
||||
buf_T *buf;
|
||||
|
||||
buf = get_buf_tv(&argvars[0], FALSE);
|
||||
if (buf == NULL)
|
||||
rettv->vval.v_number = 1; /* FAIL */
|
||||
else
|
||||
{
|
||||
lnum = get_tv_lnum_buf(&argvars[1], buf);
|
||||
|
||||
set_buffer_lines(buf, lnum, &argvars[2], rettv);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* "setbufvar()" function
|
||||
*/
|
||||
@@ -9977,72 +10169,9 @@ f_setfperm(typval_T *argvars, typval_T *rettv)
|
||||
static void
|
||||
f_setline(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
linenr_T lnum;
|
||||
char_u *line = NULL;
|
||||
list_T *l = NULL;
|
||||
listitem_T *li = NULL;
|
||||
long added = 0;
|
||||
linenr_T lcount = curbuf->b_ml.ml_line_count;
|
||||
linenr_T lnum = get_tv_lnum(&argvars[0]);
|
||||
|
||||
lnum = get_tv_lnum(&argvars[0]);
|
||||
if (argvars[1].v_type == VAR_LIST)
|
||||
{
|
||||
l = argvars[1].vval.v_list;
|
||||
li = l->lv_first;
|
||||
}
|
||||
else
|
||||
line = get_tv_string_chk(&argvars[1]);
|
||||
|
||||
/* default result is zero == OK */
|
||||
for (;;)
|
||||
{
|
||||
if (l != NULL)
|
||||
{
|
||||
/* list argument, get next string */
|
||||
if (li == NULL)
|
||||
break;
|
||||
line = get_tv_string_chk(&li->li_tv);
|
||||
li = li->li_next;
|
||||
}
|
||||
|
||||
rettv->vval.v_number = 1; /* FAIL */
|
||||
if (line == NULL || lnum < 1 || lnum > curbuf->b_ml.ml_line_count + 1)
|
||||
break;
|
||||
|
||||
/* When coming here from Insert mode, sync undo, so that this can be
|
||||
* undone separately from what was previously inserted. */
|
||||
if (u_sync_once == 2)
|
||||
{
|
||||
u_sync_once = 1; /* notify that u_sync() was called */
|
||||
u_sync(TRUE);
|
||||
}
|
||||
|
||||
if (lnum <= curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
/* existing line, replace it */
|
||||
if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK)
|
||||
{
|
||||
changed_bytes(lnum, 0);
|
||||
if (lnum == curwin->w_cursor.lnum)
|
||||
check_cursor_col();
|
||||
rettv->vval.v_number = 0; /* OK */
|
||||
}
|
||||
}
|
||||
else if (added > 0 || u_save(lnum - 1, lnum) == OK)
|
||||
{
|
||||
/* lnum is one past the last line, append the line */
|
||||
++added;
|
||||
if (ml_append(lnum - 1, line, (colnr_T)0, FALSE) == OK)
|
||||
rettv->vval.v_number = 0; /* OK */
|
||||
}
|
||||
|
||||
if (l == NULL) /* only one string argument */
|
||||
break;
|
||||
++lnum;
|
||||
}
|
||||
|
||||
if (added > 0)
|
||||
appended_lines_mark(lcount, added);
|
||||
set_buffer_lines(curbuf, lnum, &argvars[1], rettv);
|
||||
}
|
||||
|
||||
static void set_qf_ll_list(win_T *wp, typval_T *list_arg, typval_T *action_arg, typval_T *what_arg, typval_T *rettv);
|
||||
@@ -11799,6 +11928,10 @@ f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
case 's':
|
||||
if (TOLOWER_ASC(what[1]) == 'p') /* sp[#] */
|
||||
p = highlight_color(id, what, modec);
|
||||
/* strikeout */
|
||||
else if (TOLOWER_ASC(what[1]) == 't' &&
|
||||
TOLOWER_ASC(what[2]) == 'r')
|
||||
p = highlight_has_attr(id, HL_STRIKETHROUGH, modec);
|
||||
else /* standout */
|
||||
p = highlight_has_attr(id, HL_STANDOUT, modec);
|
||||
break;
|
||||
@@ -12421,6 +12554,23 @@ f_test_autochdir(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "test_feedinput()"
|
||||
*/
|
||||
static void
|
||||
f_test_feedinput(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
{
|
||||
#ifdef USE_INPUT_BUF
|
||||
char_u *val = get_tv_string_chk(&argvars[0]);
|
||||
|
||||
if (val != NULL)
|
||||
{
|
||||
trash_input_buf();
|
||||
add_to_input_buf_csi(val, (int)STRLEN(val));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "test_disable({name}, {val})" function
|
||||
*/
|
||||
|
||||
+13
-8
@@ -2098,11 +2098,16 @@ viminfo_filename(char_u *file)
|
||||
else if ((file = find_viminfo_parameter('n')) == NULL || *file == NUL)
|
||||
{
|
||||
#ifdef VIMINFO_FILE2
|
||||
/* don't use $HOME when not defined (turned into "c:/"!). */
|
||||
# ifdef VMS
|
||||
if (mch_getenv((char_u *)"SYS$LOGIN") == NULL)
|
||||
# else
|
||||
# ifdef MSWIN
|
||||
/* Use $VIM only if $HOME is the default "C:/". */
|
||||
if (STRCMP(vim_getenv((char_u *)"HOME", NULL), "C:/") == 0
|
||||
&& mch_getenv((char_u *)"HOME") == NULL)
|
||||
# else
|
||||
if (mch_getenv((char_u *)"HOME") == NULL)
|
||||
# endif
|
||||
# endif
|
||||
{
|
||||
/* don't use $VIM when not available. */
|
||||
@@ -3561,7 +3566,7 @@ getfile(
|
||||
|
||||
if (other)
|
||||
++no_wait_return; /* don't wait for autowrite message */
|
||||
if (other && !forceit && curbuf->b_nwindows == 1 && !P_HID(curbuf)
|
||||
if (other && !forceit && curbuf->b_nwindows == 1 && !buf_hide(curbuf)
|
||||
&& curbufIsChanged() && autowrite(curbuf, forceit) == FAIL)
|
||||
{
|
||||
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
@@ -3572,7 +3577,7 @@ getfile(
|
||||
{
|
||||
if (other)
|
||||
--no_wait_return;
|
||||
EMSG(_(e_nowrtmsg));
|
||||
no_write_message();
|
||||
retval = GETFILE_NOT_WRITTEN; /* file has been changed */
|
||||
goto theend;
|
||||
}
|
||||
@@ -3590,7 +3595,7 @@ getfile(
|
||||
retval = GETFILE_SAME_FILE; /* it's in the same file */
|
||||
}
|
||||
else if (do_ecmd(fnum, ffname, sfname, NULL, lnum,
|
||||
(P_HID(curbuf) ? ECMD_HIDE : 0) + (forceit ? ECMD_FORCEIT : 0),
|
||||
(buf_hide(curbuf) ? ECMD_HIDE : 0) + (forceit ? ECMD_FORCEIT : 0),
|
||||
curwin) == OK)
|
||||
retval = GETFILE_OPEN_OTHER; /* opened another file */
|
||||
else
|
||||
@@ -6314,7 +6319,7 @@ ex_help(exarg_T *eap)
|
||||
* Re-use an existing help window or open a new one.
|
||||
* Always open a new one for ":tab help".
|
||||
*/
|
||||
if (!curwin->w_buffer->b_help
|
||||
if (!bt_help(curwin->w_buffer)
|
||||
#ifdef FEAT_WINDOWS
|
||||
|| cmdmod.tab != 0
|
||||
#endif
|
||||
@@ -6325,7 +6330,7 @@ ex_help(exarg_T *eap)
|
||||
wp = NULL;
|
||||
else
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
if (wp->w_buffer != NULL && wp->w_buffer->b_help)
|
||||
if (bt_help(wp->w_buffer))
|
||||
break;
|
||||
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
|
||||
win_enter(wp, TRUE);
|
||||
@@ -6425,7 +6430,7 @@ ex_helpclose(exarg_T *eap UNUSED)
|
||||
|
||||
FOR_ALL_WINDOWS(win)
|
||||
{
|
||||
if (win->w_buffer->b_help)
|
||||
if (bt_help(win->w_buffer))
|
||||
{
|
||||
win_close(win, FALSE);
|
||||
return;
|
||||
@@ -8401,7 +8406,7 @@ ex_drop(exarg_T *eap)
|
||||
* Skip the check if the 'hidden' option is set, as in this case the
|
||||
* buffer won't be lost.
|
||||
*/
|
||||
if (!P_HID(curbuf))
|
||||
if (!buf_hide(curbuf))
|
||||
{
|
||||
# ifdef FEAT_WINDOWS
|
||||
++emsg_off;
|
||||
|
||||
+2
-2
@@ -1490,8 +1490,8 @@ EX(CMD_tearoff, "tearoff", ex_tearoff,
|
||||
NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_terminal, "terminal", ex_terminal,
|
||||
RANGE|NOTADR|EXTRA|TRLBAR|CMDWIN,
|
||||
ADDR_OTHER),
|
||||
RANGE|BANG|FILES|TRLBAR|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_tfirst, "tfirst", ex_tag,
|
||||
RANGE|NOTADR|BANG|TRLBAR|ZEROR,
|
||||
ADDR_LINES),
|
||||
|
||||
+56
-27
@@ -1194,6 +1194,7 @@ check_due_timer(void)
|
||||
long next_due = -1;
|
||||
proftime_T now;
|
||||
int did_one = FALSE;
|
||||
int need_update_screen = FALSE;
|
||||
long current_id = last_timer_id;
|
||||
# ifdef WIN3264
|
||||
LARGE_INTEGER fr;
|
||||
@@ -1218,28 +1219,44 @@ check_due_timer(void)
|
||||
{
|
||||
int save_timer_busy = timer_busy;
|
||||
int save_vgetc_busy = vgetc_busy;
|
||||
int did_emsg_save = did_emsg;
|
||||
int called_emsg_save = called_emsg;
|
||||
int did_throw_save = did_throw;
|
||||
int save_did_emsg = did_emsg;
|
||||
int save_called_emsg = called_emsg;
|
||||
int save_must_redraw = must_redraw;
|
||||
int save_trylevel = trylevel;
|
||||
int save_did_throw = did_throw;
|
||||
except_T *save_current_exception = current_exception;
|
||||
|
||||
/* Create a scope for running the timer callback, ignoring most of
|
||||
* the current scope, such as being inside a try/catch. */
|
||||
timer_busy = timer_busy > 0 || vgetc_busy > 0;
|
||||
vgetc_busy = 0;
|
||||
called_emsg = FALSE;
|
||||
did_emsg = FALSE;
|
||||
did_uncaught_emsg = FALSE;
|
||||
must_redraw = 0;
|
||||
trylevel = 0;
|
||||
did_throw = FALSE;
|
||||
current_exception = NULL;
|
||||
|
||||
timer->tr_firing = TRUE;
|
||||
timer_callback(timer);
|
||||
timer->tr_firing = FALSE;
|
||||
|
||||
timer_next = timer->tr_next;
|
||||
did_one = TRUE;
|
||||
timer_busy = save_timer_busy;
|
||||
vgetc_busy = save_vgetc_busy;
|
||||
if (called_emsg)
|
||||
{
|
||||
if (did_uncaught_emsg)
|
||||
++timer->tr_emsg_count;
|
||||
if (!did_throw_save && did_throw && current_exception != NULL)
|
||||
discard_current_exception();
|
||||
}
|
||||
did_emsg = did_emsg_save;
|
||||
called_emsg = called_emsg_save;
|
||||
did_emsg = save_did_emsg;
|
||||
called_emsg = save_called_emsg;
|
||||
trylevel = save_trylevel;
|
||||
did_throw = save_did_throw;
|
||||
current_exception = save_current_exception;
|
||||
if (must_redraw != 0)
|
||||
need_update_screen = TRUE;
|
||||
must_redraw = must_redraw > save_must_redraw
|
||||
? must_redraw : save_must_redraw;
|
||||
|
||||
/* Only fire the timer again if it repeats and stop_timer() wasn't
|
||||
* called while inside the callback (tr_id == -1). */
|
||||
@@ -1265,7 +1282,7 @@ check_due_timer(void)
|
||||
}
|
||||
|
||||
if (did_one)
|
||||
redraw_after_callback();
|
||||
redraw_after_callback(need_update_screen);
|
||||
|
||||
return current_id != last_timer_id ? 1 : next_due;
|
||||
}
|
||||
@@ -1934,9 +1951,9 @@ check_changed(buf_T *buf, int flags)
|
||||
}
|
||||
#endif
|
||||
if (flags & CCGD_EXCMD)
|
||||
EMSG(_(e_nowrtmsg));
|
||||
no_write_message();
|
||||
else
|
||||
EMSG(_(e_nowrtmsg_nobang));
|
||||
no_write_message_nobang();
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -2051,9 +2068,7 @@ dialog_changed(
|
||||
else
|
||||
{
|
||||
#endif
|
||||
dialog_msg(buff, _("Save changes to \"%s\"?"),
|
||||
(buf->b_fname != NULL) ?
|
||||
buf->b_fname : (char_u *)_("Untitled"));
|
||||
dialog_msg(buff, _("Save changes to \"%s\"?"), buf->b_fname);
|
||||
if (checkall)
|
||||
ret = vim_dialog_yesnoallcancel(VIM_QUESTION, NULL, buff, 1);
|
||||
else
|
||||
@@ -2137,7 +2152,7 @@ dialog_changed(
|
||||
int
|
||||
can_abandon(buf_T *buf, int forceit)
|
||||
{
|
||||
return ( P_HID(buf)
|
||||
return ( buf_hide(buf)
|
||||
|| !bufIsChanged(buf)
|
||||
|| buf->b_nwindows > 1
|
||||
|| autowrite(buf, forceit) == OK
|
||||
@@ -2253,7 +2268,14 @@ check_changed_any(
|
||||
msg_col = 0;
|
||||
msg_didout = FALSE;
|
||||
}
|
||||
if (EMSG2(_("E162: No write since last change for buffer \"%s\""),
|
||||
if (
|
||||
#ifdef FEAT_TERMINAL
|
||||
term_job_running(buf->b_term)
|
||||
? EMSG2(_("E947: Job still running in buffer \"%s\""),
|
||||
buf->b_fname)
|
||||
:
|
||||
#endif
|
||||
EMSG2(_("E162: No write since last change for buffer \"%s\""),
|
||||
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname))
|
||||
{
|
||||
save = no_wait_return;
|
||||
@@ -2393,8 +2415,8 @@ do_one_arg(char_u *str)
|
||||
* Separate the arguments in "str" and return a list of pointers in the
|
||||
* growarray "gap".
|
||||
*/
|
||||
int
|
||||
get_arglist(garray_T *gap, char_u *str)
|
||||
static int
|
||||
get_arglist(garray_T *gap, char_u *str, int escaped)
|
||||
{
|
||||
ga_init2(gap, (int)sizeof(char_u *), 20);
|
||||
while (*str != NUL)
|
||||
@@ -2406,6 +2428,10 @@ get_arglist(garray_T *gap, char_u *str)
|
||||
}
|
||||
((char_u **)gap->ga_data)[gap->ga_len++] = str;
|
||||
|
||||
/* If str is escaped, don't handle backslashes or spaces */
|
||||
if (!escaped)
|
||||
return OK;
|
||||
|
||||
/* Isolate one argument, change it in-place, put a NUL after it. */
|
||||
str = do_one_arg(str);
|
||||
}
|
||||
@@ -2428,7 +2454,7 @@ get_arglist_exp(
|
||||
garray_T ga;
|
||||
int i;
|
||||
|
||||
if (get_arglist(&ga, str) == FAIL)
|
||||
if (get_arglist(&ga, str, TRUE) == FAIL)
|
||||
return FAIL;
|
||||
if (wig == TRUE)
|
||||
i = expand_wildcards(ga.ga_len, (char_u **)ga.ga_data,
|
||||
@@ -2474,6 +2500,7 @@ do_arglist(
|
||||
char_u *p;
|
||||
int match;
|
||||
#endif
|
||||
int arg_escaped = TRUE;
|
||||
|
||||
/*
|
||||
* Set default argument for ":argadd" command.
|
||||
@@ -2483,12 +2510,13 @@ do_arglist(
|
||||
if (curbuf->b_ffname == NULL)
|
||||
return FAIL;
|
||||
str = curbuf->b_fname;
|
||||
arg_escaped = FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Collect all file name arguments in "new_ga".
|
||||
*/
|
||||
if (get_arglist(&new_ga, str) == FAIL)
|
||||
if (get_arglist(&new_ga, str, arg_escaped) == FAIL)
|
||||
return FAIL;
|
||||
|
||||
#ifdef FEAT_LISTCMDS
|
||||
@@ -2801,13 +2829,13 @@ do_argfile(exarg_T *eap, int argn)
|
||||
* the same buffer
|
||||
*/
|
||||
other = TRUE;
|
||||
if (P_HID(curbuf))
|
||||
if (buf_hide(curbuf))
|
||||
{
|
||||
p = fix_fname(alist_name(&ARGLIST[argn]));
|
||||
other = otherfile(p);
|
||||
vim_free(p);
|
||||
}
|
||||
if ((!P_HID(curbuf) || !other)
|
||||
if ((!buf_hide(curbuf) || !other)
|
||||
&& check_changed(curbuf, CCGD_AW
|
||||
| (other ? 0 : CCGD_MULTWIN)
|
||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||
@@ -2828,7 +2856,7 @@ do_argfile(exarg_T *eap, int argn)
|
||||
* argument index. */
|
||||
if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL,
|
||||
eap, ECMD_LAST,
|
||||
(P_HID(curwin->w_buffer) ? ECMD_HIDE : 0)
|
||||
(buf_hide(curwin->w_buffer) ? ECMD_HIDE : 0)
|
||||
+ (eap->forceit ? ECMD_FORCEIT : 0), curwin) == FAIL)
|
||||
curwin->w_arg_idx = old_arg_idx;
|
||||
/* like Vi: set the mark where the cursor is in the file. */
|
||||
@@ -2849,7 +2877,7 @@ ex_next(exarg_T *eap)
|
||||
* check for changed buffer now, if this fails the argument list is not
|
||||
* redefined.
|
||||
*/
|
||||
if ( P_HID(curbuf)
|
||||
if ( buf_hide(curbuf)
|
||||
|| eap->cmdidx == CMD_snext
|
||||
|| !check_changed(curbuf, CCGD_AW
|
||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||
@@ -3004,7 +3032,7 @@ ex_listdo(exarg_T *eap)
|
||||
|
||||
if (eap->cmdidx == CMD_windo
|
||||
|| eap->cmdidx == CMD_tabdo
|
||||
|| P_HID(curbuf)
|
||||
|| buf_hide(curbuf)
|
||||
|| !check_changed(curbuf, CCGD_AW
|
||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||
| CCGD_EXCMD))
|
||||
@@ -3809,6 +3837,7 @@ ex_packadd(exarg_T *eap)
|
||||
ex_options(
|
||||
exarg_T *eap UNUSED)
|
||||
{
|
||||
vim_setenv((char_u *)"OPTWIN_CMD", (char_u *)(cmdmod.tab ? "tab" : ""));
|
||||
cmd_source((char_u *)SYS_OPTWIN_FILE, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
+106
-48
@@ -2639,6 +2639,7 @@ do_one_cmd(
|
||||
* Any others?
|
||||
*/
|
||||
else if (ea.cmdidx == CMD_bang
|
||||
|| ea.cmdidx == CMD_terminal
|
||||
|| ea.cmdidx == CMD_global
|
||||
|| ea.cmdidx == CMD_vglobal
|
||||
|| ea.usefilter)
|
||||
@@ -3795,7 +3796,7 @@ set_one_cmd_context(
|
||||
xp->xp_context = EXPAND_FILES;
|
||||
|
||||
/* For a shell command more chars need to be escaped. */
|
||||
if (usefilter || ea.cmdidx == CMD_bang)
|
||||
if (usefilter || ea.cmdidx == CMD_bang || ea.cmdidx == CMD_terminal)
|
||||
{
|
||||
#ifndef BACKSLASH_IN_FILENAME
|
||||
xp->xp_shell = TRUE;
|
||||
@@ -4229,6 +4230,19 @@ set_one_cmd_context(
|
||||
case CMD_xunmap:
|
||||
return set_context_in_map_cmd(xp, cmd, arg, forceit,
|
||||
FALSE, TRUE, ea.cmdidx);
|
||||
case CMD_mapclear:
|
||||
case CMD_nmapclear:
|
||||
case CMD_vmapclear:
|
||||
case CMD_omapclear:
|
||||
case CMD_imapclear:
|
||||
case CMD_cmapclear:
|
||||
case CMD_lmapclear:
|
||||
case CMD_smapclear:
|
||||
case CMD_xmapclear:
|
||||
xp->xp_context = EXPAND_MAPCLEAR;
|
||||
xp->xp_pattern = arg;
|
||||
break;
|
||||
|
||||
case CMD_abbreviate: case CMD_noreabbrev:
|
||||
case CMD_cabbrev: case CMD_cnoreabbrev:
|
||||
case CMD_iabbrev: case CMD_inoreabbrev:
|
||||
@@ -5057,13 +5071,14 @@ expand_filename(
|
||||
if (!eap->usefilter
|
||||
&& !escaped
|
||||
&& eap->cmdidx != CMD_bang
|
||||
&& eap->cmdidx != CMD_make
|
||||
&& eap->cmdidx != CMD_lmake
|
||||
&& eap->cmdidx != CMD_grep
|
||||
&& eap->cmdidx != CMD_lgrep
|
||||
&& eap->cmdidx != CMD_grepadd
|
||||
&& eap->cmdidx != CMD_lgrepadd
|
||||
&& eap->cmdidx != CMD_hardcopy
|
||||
&& eap->cmdidx != CMD_lgrep
|
||||
&& eap->cmdidx != CMD_lgrepadd
|
||||
&& eap->cmdidx != CMD_lmake
|
||||
&& eap->cmdidx != CMD_make
|
||||
&& eap->cmdidx != CMD_terminal
|
||||
#ifndef UNIX
|
||||
&& !(eap->argt & NOSPC)
|
||||
#endif
|
||||
@@ -5093,7 +5108,8 @@ expand_filename(
|
||||
}
|
||||
|
||||
/* For a shell command a '!' must be escaped. */
|
||||
if ((eap->usefilter || eap->cmdidx == CMD_bang)
|
||||
if ((eap->usefilter || eap->cmdidx == CMD_bang
|
||||
|| eap->cmdidx == CMD_terminal)
|
||||
&& vim_strpbrk(repl, (char_u *)"!") != NULL)
|
||||
{
|
||||
char_u *l;
|
||||
@@ -5978,6 +5994,7 @@ static struct
|
||||
&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
|
||||
{EXPAND_LOCALES, "locale"},
|
||||
#endif
|
||||
{EXPAND_MAPCLEAR, "mapclear"},
|
||||
{EXPAND_MAPPINGS, "mapping"},
|
||||
{EXPAND_MENUS, "menu"},
|
||||
{EXPAND_MESSAGES, "messages"},
|
||||
@@ -6331,7 +6348,8 @@ ex_command(exarg_T *eap)
|
||||
{
|
||||
++p;
|
||||
end = skiptowhite(p);
|
||||
if (uc_scan_attr(p, end - p, &argt, &def, &flags, &compl, &compl_arg, &addr_type_arg)
|
||||
if (uc_scan_attr(p, end - p, &argt, &def, &flags, &compl,
|
||||
&compl_arg, &addr_type_arg)
|
||||
== FAIL)
|
||||
return;
|
||||
p = skipwhite(end);
|
||||
@@ -6372,7 +6390,7 @@ ex_command(exarg_T *eap)
|
||||
}
|
||||
else
|
||||
uc_add_command(name, end - name, p, argt, def, flags, compl, compl_arg,
|
||||
addr_type_arg, eap->forceit);
|
||||
addr_type_arg, eap->forceit);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6592,8 +6610,18 @@ uc_check_code(
|
||||
char_u *p = code + 1;
|
||||
size_t l = len - 2;
|
||||
int quote = 0;
|
||||
enum { ct_ARGS, ct_BANG, ct_COUNT, ct_LINE1, ct_LINE2, ct_MODS,
|
||||
ct_REGISTER, ct_LT, ct_NONE } type = ct_NONE;
|
||||
enum {
|
||||
ct_ARGS,
|
||||
ct_BANG,
|
||||
ct_COUNT,
|
||||
ct_LINE1,
|
||||
ct_LINE2,
|
||||
ct_RANGE,
|
||||
ct_MODS,
|
||||
ct_REGISTER,
|
||||
ct_LT,
|
||||
ct_NONE
|
||||
} type = ct_NONE;
|
||||
|
||||
if ((vim_strchr((char_u *)"qQfF", *p) != NULL) && p[1] == '-')
|
||||
{
|
||||
@@ -6615,6 +6643,8 @@ uc_check_code(
|
||||
type = ct_LINE1;
|
||||
else if (STRNICMP(p, "line2>", l) == 0)
|
||||
type = ct_LINE2;
|
||||
else if (STRNICMP(p, "range>", l) == 0)
|
||||
type = ct_RANGE;
|
||||
else if (STRNICMP(p, "lt>", l) == 0)
|
||||
type = ct_LT;
|
||||
else if (STRNICMP(p, "reg>", l) == 0 || STRNICMP(p, "register>", l) == 0)
|
||||
@@ -6716,11 +6746,13 @@ uc_check_code(
|
||||
|
||||
case ct_LINE1:
|
||||
case ct_LINE2:
|
||||
case ct_RANGE:
|
||||
case ct_COUNT:
|
||||
{
|
||||
char num_buf[20];
|
||||
long num = (type == ct_LINE1) ? eap->line1 :
|
||||
(type == ct_LINE2) ? eap->line2 :
|
||||
(type == ct_RANGE) ? eap->addr_count :
|
||||
(eap->addr_count > 0) ? eap->line2 : cmd->uc_def;
|
||||
size_t num_len;
|
||||
|
||||
@@ -7305,7 +7337,7 @@ ex_quit(exarg_T *eap)
|
||||
*/
|
||||
if (check_more(FALSE, eap->forceit) == OK && only_one_window())
|
||||
exiting = TRUE;
|
||||
if ((!P_HID(curbuf)
|
||||
if ((!buf_hide(curbuf)
|
||||
&& check_changed(curbuf, (p_awa ? CCGD_AW : 0)
|
||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||
| CCGD_EXCMD))
|
||||
@@ -7332,7 +7364,7 @@ ex_quit(exarg_T *eap)
|
||||
need_mouse_correct = TRUE;
|
||||
# endif
|
||||
/* close window; may free buffer */
|
||||
win_close(wp, !P_HID(wp->w_buffer) || eap->forceit);
|
||||
win_close(wp, !buf_hide(wp->w_buffer) || eap->forceit);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -7452,7 +7484,7 @@ ex_win_close(
|
||||
buf_T *buf = win->w_buffer;
|
||||
|
||||
need_hide = (bufIsChanged(buf) && buf->b_nwindows <= 1);
|
||||
if (need_hide && !P_HID(buf) && !forceit)
|
||||
if (need_hide && !buf_hide(buf) && !forceit)
|
||||
{
|
||||
# if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
if ((p_confirm || cmdmod.confirm) && p_write)
|
||||
@@ -7468,7 +7500,7 @@ ex_win_close(
|
||||
else
|
||||
# endif
|
||||
{
|
||||
EMSG(_(e_nowrtmsg));
|
||||
no_write_message();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -7479,9 +7511,9 @@ ex_win_close(
|
||||
|
||||
/* free buffer when not hiding it or when it's a scratch buffer */
|
||||
if (tp == NULL)
|
||||
win_close(win, !need_hide && !P_HID(buf));
|
||||
win_close(win, !need_hide && !buf_hide(buf));
|
||||
else
|
||||
win_close_othertab(win, !need_hide && !P_HID(buf), tp);
|
||||
win_close_othertab(win, !need_hide && !buf_hide(buf), tp);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7878,7 +7910,7 @@ ex_exit(exarg_T *eap)
|
||||
need_mouse_correct = TRUE;
|
||||
# endif
|
||||
/* Quit current window, may free the buffer. */
|
||||
win_close(curwin, !P_HID(curwin->w_buffer));
|
||||
win_close(curwin, !buf_hide(curwin->w_buffer));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -7975,7 +8007,7 @@ handle_drop(
|
||||
* We don't need to check if the 'hidden' option is set, as in this
|
||||
* case the buffer won't be lost.
|
||||
*/
|
||||
if (!P_HID(curbuf) && !split)
|
||||
if (!buf_hide(curbuf) && !split)
|
||||
{
|
||||
++emsg_off;
|
||||
split = check_changed(curbuf, CCGD_AW);
|
||||
@@ -8762,7 +8794,7 @@ do_exedit(
|
||||
(*eap->arg == NUL && eap->do_ecmd_lnum == 0
|
||||
&& vim_strchr(p_cpo, CPO_GOTO1) != NULL)
|
||||
? ECMD_ONE : eap->do_ecmd_lnum,
|
||||
(P_HID(curbuf) ? ECMD_HIDE : 0)
|
||||
(buf_hide(curbuf) ? ECMD_HIDE : 0)
|
||||
+ (eap->forceit ? ECMD_FORCEIT : 0)
|
||||
/* after a split we can use an existing buffer */
|
||||
+ (old_curwin != NULL ? ECMD_OLDBUF : 0)
|
||||
@@ -8776,7 +8808,7 @@ do_exedit(
|
||||
if (old_curwin != NULL)
|
||||
{
|
||||
need_hide = (curbufIsChanged() && curbuf->b_nwindows <= 1);
|
||||
if (!need_hide || P_HID(curbuf))
|
||||
if (!need_hide || buf_hide(curbuf))
|
||||
{
|
||||
# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||
cleanup_T cs;
|
||||
@@ -8788,7 +8820,7 @@ do_exedit(
|
||||
# ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
# endif
|
||||
win_close(curwin, !need_hide && !P_HID(curbuf));
|
||||
win_close(curwin, !need_hide && !buf_hide(curbuf));
|
||||
|
||||
# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||
/* Restore the error/interrupt/exception state if not
|
||||
@@ -10543,7 +10575,7 @@ ex_pedit(exarg_T *eap)
|
||||
|
||||
g_do_tagpreview = p_pvh;
|
||||
prepare_tagpreview(TRUE);
|
||||
keep_help_flag = curwin_save->w_buffer->b_help;
|
||||
keep_help_flag = bt_help(curwin_save->w_buffer);
|
||||
do_exedit(eap, NULL);
|
||||
keep_help_flag = FALSE;
|
||||
if (curwin != curwin_save && win_valid(curwin_save))
|
||||
@@ -10645,31 +10677,33 @@ find_cmdline_var(char_u *src, int *usedlen)
|
||||
"%",
|
||||
#define SPEC_PERC 0
|
||||
"#",
|
||||
#define SPEC_HASH 1
|
||||
#define SPEC_HASH (SPEC_PERC + 1)
|
||||
"<cword>", /* cursor word */
|
||||
#define SPEC_CWORD 2
|
||||
#define SPEC_CWORD (SPEC_HASH + 1)
|
||||
"<cWORD>", /* cursor WORD */
|
||||
#define SPEC_CCWORD 3
|
||||
#define SPEC_CCWORD (SPEC_CWORD + 1)
|
||||
"<cexpr>", /* expr under cursor */
|
||||
#define SPEC_CEXPR (SPEC_CCWORD + 1)
|
||||
"<cfile>", /* cursor path name */
|
||||
#define SPEC_CFILE 4
|
||||
#define SPEC_CFILE (SPEC_CEXPR + 1)
|
||||
"<sfile>", /* ":so" file name */
|
||||
#define SPEC_SFILE 5
|
||||
#define SPEC_SFILE (SPEC_CFILE + 1)
|
||||
"<slnum>", /* ":so" file line number */
|
||||
#define SPEC_SLNUM 6
|
||||
#define SPEC_SLNUM (SPEC_SFILE + 1)
|
||||
#ifdef FEAT_AUTOCMD
|
||||
"<afile>", /* autocommand file name */
|
||||
# define SPEC_AFILE 7
|
||||
# define SPEC_AFILE (SPEC_SLNUM + 1)
|
||||
"<abuf>", /* autocommand buffer number */
|
||||
# define SPEC_ABUF 8
|
||||
# define SPEC_ABUF (SPEC_AFILE + 1)
|
||||
"<amatch>", /* autocommand match name */
|
||||
# define SPEC_AMATCH 9
|
||||
# define SPEC_AMATCH (SPEC_ABUF + 1)
|
||||
#endif
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
"<client>"
|
||||
# ifdef FEAT_AUTOCMD
|
||||
# define SPEC_CLIENT 10
|
||||
# define SPEC_CLIENT (SPEC_AMATCH + 1)
|
||||
# else
|
||||
# define SPEC_CLIENT 7
|
||||
# define SPEC_CLIENT (SPEC_SLNUM + 1)
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
@@ -10757,10 +10791,13 @@ eval_vars(
|
||||
/*
|
||||
* word or WORD under cursor
|
||||
*/
|
||||
if (spec_idx == SPEC_CWORD || spec_idx == SPEC_CCWORD)
|
||||
if (spec_idx == SPEC_CWORD || spec_idx == SPEC_CCWORD
|
||||
|| spec_idx == SPEC_CEXPR)
|
||||
{
|
||||
resultlen = find_ident_under_cursor(&result, spec_idx == SPEC_CWORD ?
|
||||
(FIND_IDENT|FIND_STRING) : FIND_STRING);
|
||||
resultlen = find_ident_under_cursor(&result,
|
||||
spec_idx == SPEC_CWORD ? (FIND_IDENT | FIND_STRING)
|
||||
: spec_idx == SPEC_CEXPR ? (FIND_IDENT | FIND_STRING | FIND_EVAL)
|
||||
: FIND_STRING);
|
||||
if (resultlen == 0)
|
||||
{
|
||||
*errormsg = (char_u *)"";
|
||||
@@ -11109,7 +11146,7 @@ static int ses_do_frame(frame_T *fr);
|
||||
static int ses_do_win(win_T *wp);
|
||||
static int ses_arglist(FILE *fd, char *cmd, garray_T *gap, int fullname, unsigned *flagp);
|
||||
static int ses_put_fname(FILE *fd, char_u *name, unsigned *flagp);
|
||||
static int ses_fname(FILE *fd, buf_T *buf, unsigned *flagp);
|
||||
static int ses_fname(FILE *fd, buf_T *buf, unsigned *flagp, int add_eol);
|
||||
|
||||
/*
|
||||
* Write openfile commands for the current buffers to an .exrc file.
|
||||
@@ -11205,7 +11242,7 @@ makeopens(
|
||||
{
|
||||
if (fprintf(fd, "badd +%ld ", buf->b_wininfo == NULL ? 1L
|
||||
: buf->b_wininfo->wi_fpos.lnum) < 0
|
||||
|| ses_fname(fd, buf, &ssop_flags) == FAIL)
|
||||
|| ses_fname(fd, buf, &ssop_flags, TRUE) == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
@@ -11300,14 +11337,15 @@ makeopens(
|
||||
{
|
||||
if (ses_do_win(wp)
|
||||
&& wp->w_buffer->b_ffname != NULL
|
||||
&& !wp->w_buffer->b_help
|
||||
&& !bt_help(wp->w_buffer)
|
||||
#ifdef FEAT_QUICKFIX
|
||||
&& !bt_nofile(wp->w_buffer)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (fputs(need_tabnew ? "tabedit " : "edit ", fd) < 0
|
||||
|| ses_fname(fd, wp->w_buffer, &ssop_flags) == FAIL)
|
||||
|| ses_fname(fd, wp->w_buffer, &ssop_flags, TRUE)
|
||||
== FAIL)
|
||||
return FAIL;
|
||||
need_tabnew = FALSE;
|
||||
if (!wp->w_arg_idx_invalid)
|
||||
@@ -11584,7 +11622,7 @@ ses_do_win(win_T *wp)
|
||||
#endif
|
||||
)
|
||||
return (ssop_flags & SSOP_BLANK);
|
||||
if (wp->w_buffer->b_help)
|
||||
if (bt_help(wp->w_buffer))
|
||||
return (ssop_flags & SSOP_HELP);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -11654,9 +11692,20 @@ put_view(
|
||||
/*
|
||||
* Editing a file in this buffer: use ":edit file".
|
||||
* This may have side effects! (e.g., compressed or network file).
|
||||
*
|
||||
* Note, if a buffer for that file already exists, use :badd to
|
||||
* edit that buffer, to not lose folding information (:edit resets
|
||||
* folds in other buffers)
|
||||
*/
|
||||
if (fputs("edit ", fd) < 0
|
||||
|| ses_fname(fd, wp->w_buffer, flagp) == FAIL)
|
||||
if (fputs("if bufexists('", fd) < 0
|
||||
|| ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
|
||||
|| fputs("') | buffer ", fd) < 0
|
||||
|| ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
|
||||
|| fputs(" | else | edit ", fd) < 0
|
||||
|| ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
|
||||
|| fputs(" | endif", fd) < 0
|
||||
||
|
||||
put_eol(fd) == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
else
|
||||
@@ -11669,7 +11718,7 @@ put_view(
|
||||
{
|
||||
/* The buffer does have a name, but it's not a file name. */
|
||||
if (fputs("file ", fd) < 0
|
||||
|| ses_fname(fd, wp->w_buffer, flagp) == FAIL)
|
||||
|| ses_fname(fd, wp->w_buffer, flagp, TRUE) == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
#endif
|
||||
@@ -11714,7 +11763,7 @@ put_view(
|
||||
*/
|
||||
if ((*flagp & SSOP_FOLDS)
|
||||
&& wp->w_buffer->b_ffname != NULL
|
||||
&& (*wp->w_buffer->b_p_bt == NUL || wp->w_buffer->b_help))
|
||||
&& (*wp->w_buffer->b_p_bt == NUL || bt_help(wp->w_buffer)))
|
||||
{
|
||||
if (put_folds(fd, wp) == FAIL)
|
||||
return FAIL;
|
||||
@@ -11841,11 +11890,11 @@ ses_arglist(
|
||||
|
||||
/*
|
||||
* Write a buffer name to the session file.
|
||||
* Also ends the line.
|
||||
* Also ends the line, if "add_eol" is TRUE.
|
||||
* Returns FAIL if writing fails.
|
||||
*/
|
||||
static int
|
||||
ses_fname(FILE *fd, buf_T *buf, unsigned *flagp)
|
||||
ses_fname(FILE *fd, buf_T *buf, unsigned *flagp, int add_eol)
|
||||
{
|
||||
char_u *name;
|
||||
|
||||
@@ -11864,7 +11913,8 @@ ses_fname(FILE *fd, buf_T *buf, unsigned *flagp)
|
||||
name = buf->b_sfname;
|
||||
else
|
||||
name = buf->b_ffname;
|
||||
if (ses_put_fname(fd, name, flagp) == FAIL || put_eol(fd) == FAIL)
|
||||
if (ses_put_fname(fd, name, flagp) == FAIL
|
||||
|| (add_eol && put_eol(fd) == FAIL))
|
||||
return FAIL;
|
||||
return OK;
|
||||
}
|
||||
@@ -12115,6 +12165,14 @@ get_messages_arg(expand_T *xp UNUSED, int idx)
|
||||
}
|
||||
#endif
|
||||
|
||||
char_u *
|
||||
get_mapclear_arg(expand_T *xp UNUSED, int idx)
|
||||
{
|
||||
if (idx == 0)
|
||||
return (char_u *)"<buffer>";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
static int filetype_detect = FALSE;
|
||||
static int filetype_plugin = FALSE;
|
||||
|
||||
+3
-1
@@ -3479,7 +3479,8 @@ cursorcmd(void)
|
||||
|
||||
windgoto(msg_row, msg_col);
|
||||
#if defined(FEAT_XIM) && (defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MACVIM))
|
||||
redrawcmd_preedit();
|
||||
if (p_imst == IM_ON_THE_SPOT)
|
||||
redrawcmd_preedit();
|
||||
#endif
|
||||
#ifdef MCH_CURSOR_SHAPE
|
||||
mch_update_cursor();
|
||||
@@ -4890,6 +4891,7 @@ ExpandFromContext(
|
||||
{
|
||||
{EXPAND_COMMANDS, get_command_name, FALSE, TRUE},
|
||||
{EXPAND_BEHAVE, get_behave_arg, TRUE, TRUE},
|
||||
{EXPAND_MAPCLEAR, get_mapclear_arg, TRUE, TRUE},
|
||||
{EXPAND_MESSAGES, get_messages_arg, TRUE, TRUE},
|
||||
#ifdef FEAT_CMDHIST
|
||||
{EXPAND_HISTORY, get_history_arg, TRUE, TRUE},
|
||||
|
||||
+6
-1
@@ -1283,10 +1283,15 @@
|
||||
|
||||
/*
|
||||
* +terminal ":terminal" command. Runs a terminal in a window.
|
||||
* requires +channel and +multibyte
|
||||
*/
|
||||
#if !defined(FEAT_JOB_CHANNEL) && defined(FEAT_TERMINAL)
|
||||
#if defined(FEAT_TERMINAL) && \
|
||||
!(defined(FEAT_JOB_CHANNEL) && defined(FEAT_MBYTE))
|
||||
# undef FEAT_TERMINAL
|
||||
#endif
|
||||
#if defined(FEAT_TERMINAL) && !defined(CURSOR_SHAPE)
|
||||
# define CURSOR_SHAPE
|
||||
#endif
|
||||
|
||||
/*
|
||||
* +signs Allow signs to be displayed to the left of text lines.
|
||||
|
||||
+5
-1
@@ -1370,7 +1370,8 @@ retry:
|
||||
* Decrypt the read bytes. This is done before checking for
|
||||
* EOF because the crypt layer may be buffering.
|
||||
*/
|
||||
if (cryptkey != NULL && size > 0)
|
||||
if (cryptkey != NULL && curbuf->b_cryptstate != NULL
|
||||
&& size > 0)
|
||||
{
|
||||
if (crypt_works_inplace(curbuf->b_cryptstate))
|
||||
{
|
||||
@@ -6903,6 +6904,9 @@ buf_check_timestamp(
|
||||
#endif
|
||||
#ifdef FEAT_NETBEANS_INTG
|
||||
|| isNetbeansBuffer(buf)
|
||||
#endif
|
||||
#ifdef FEAT_TERMINAL
|
||||
|| buf->b_term != NULL
|
||||
#endif
|
||||
)
|
||||
return 0;
|
||||
|
||||
+21
-11
@@ -125,7 +125,7 @@ static int vgetorpeek(int);
|
||||
static void map_free(mapblock_T **);
|
||||
static void validate_maphash(void);
|
||||
static void showmap(mapblock_T *mp, int local);
|
||||
static int inchar(char_u *buf, int maxlen, long wait_time, int tb_change_cnt);
|
||||
static int inchar(char_u *buf, int maxlen, long wait_time);
|
||||
#ifdef FEAT_EVAL
|
||||
static char_u *eval_map_expr(char_u *str, int c);
|
||||
#endif
|
||||
@@ -462,8 +462,7 @@ flush_buffers(int flush_typeahead)
|
||||
* of an escape sequence.
|
||||
* In an xterm we get one char at a time and we have to get them all.
|
||||
*/
|
||||
while (inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 10L,
|
||||
typebuf.tb_change_cnt) != 0)
|
||||
while (inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 10L) != 0)
|
||||
;
|
||||
typebuf.tb_off = MAXMAPLEN;
|
||||
typebuf.tb_len = 0;
|
||||
@@ -1599,8 +1598,13 @@ vgetc(void)
|
||||
{
|
||||
int did_inc = FALSE;
|
||||
|
||||
if (mod_mask) /* no mapping after modifier has been read */
|
||||
if (mod_mask
|
||||
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
|
||||
|| im_is_preediting()
|
||||
#endif
|
||||
)
|
||||
{
|
||||
/* no mapping after modifier has been read */
|
||||
++no_mapping;
|
||||
++allow_keys;
|
||||
did_inc = TRUE; /* mod_mask may change value */
|
||||
@@ -2046,8 +2050,7 @@ vgetorpeek(int advance)
|
||||
if (got_int)
|
||||
{
|
||||
/* flush all input */
|
||||
c = inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 0L,
|
||||
typebuf.tb_change_cnt);
|
||||
c = inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 0L);
|
||||
/*
|
||||
* If inchar() returns TRUE (script file was active) or we
|
||||
* are inside a mapping, get out of insert mode.
|
||||
@@ -2610,8 +2613,7 @@ vgetorpeek(int advance)
|
||||
&& (p_timeout
|
||||
|| (keylen == KEYLEN_PART_KEY && p_ttimeout))
|
||||
&& (c = inchar(typebuf.tb_buf + typebuf.tb_off
|
||||
+ typebuf.tb_len, 3, 25L,
|
||||
typebuf.tb_change_cnt)) == 0)
|
||||
+ typebuf.tb_len, 3, 25L)) == 0)
|
||||
{
|
||||
colnr_T col = 0, vcol;
|
||||
char_u *ptr;
|
||||
@@ -2848,7 +2850,7 @@ vgetorpeek(int advance)
|
||||
? -1L
|
||||
: ((keylen == KEYLEN_PART_KEY && p_ttm >= 0)
|
||||
? p_ttm
|
||||
: p_tm)), typebuf.tb_change_cnt);
|
||||
: p_tm)));
|
||||
|
||||
#ifdef FEAT_CMDL_INFO
|
||||
if (i != 0)
|
||||
@@ -2954,12 +2956,12 @@ vgetorpeek(int advance)
|
||||
inchar(
|
||||
char_u *buf,
|
||||
int maxlen,
|
||||
long wait_time, /* milli seconds */
|
||||
int tb_change_cnt)
|
||||
long wait_time) /* milli seconds */
|
||||
{
|
||||
int len = 0; /* init for GCC */
|
||||
int retesc = FALSE; /* return ESC with gotint */
|
||||
int script_char;
|
||||
int tb_change_cnt = typebuf.tb_change_cnt;
|
||||
|
||||
if (wait_time == -1L || wait_time > 100L) /* flush output before waiting */
|
||||
{
|
||||
@@ -3065,9 +3067,17 @@ inchar(
|
||||
len = ui_inchar(buf, maxlen / 3, wait_time, tb_change_cnt);
|
||||
}
|
||||
|
||||
/* If the typebuf was changed further down, it is like nothing was added by
|
||||
* this call. */
|
||||
if (typebuf_changed(tb_change_cnt))
|
||||
return 0;
|
||||
|
||||
/* Note the change in the typeahead buffer, this matters for when
|
||||
* vgetorpeek() is called recursively, e.g. using getchar(1) in a timer
|
||||
* function. */
|
||||
if (len > 0 && ++typebuf.tb_change_cnt == 0)
|
||||
typebuf.tb_change_cnt = 1;
|
||||
|
||||
return fix_input_buffer(buf, len);
|
||||
}
|
||||
|
||||
|
||||
+12
-2
@@ -182,6 +182,10 @@ EXTERN dict_T globvardict; /* Dictionary with g: variables */
|
||||
#endif
|
||||
EXTERN int did_emsg; /* set by emsg() when the message
|
||||
is displayed or thrown */
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN int did_uncaught_emsg; /* emsg() was called and did not
|
||||
cause an exception */
|
||||
#endif
|
||||
EXTERN int did_emsg_syntax; /* did_emsg set because of a
|
||||
syntax error */
|
||||
EXTERN int called_emsg; /* always set by emsg() */
|
||||
@@ -362,6 +366,10 @@ EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */
|
||||
EXTERN int highlight_user[9]; /* User[1-9] attributes */
|
||||
# ifdef FEAT_STL_OPT
|
||||
EXTERN int highlight_stlnc[9]; /* On top of user */
|
||||
# ifdef FEAT_TERMINAL
|
||||
EXTERN int highlight_stlterm[9]; /* On top of user */
|
||||
EXTERN int highlight_stltermnc[9]; /* On top of user */
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#ifdef FEAT_GUI
|
||||
@@ -1516,8 +1524,6 @@ EXTERN char_u e_notcreate[] INIT(= N_("E482: Can't create file %s"));
|
||||
EXTERN char_u e_notmp[] INIT(= N_("E483: Can't get temp file name"));
|
||||
EXTERN char_u e_notopen[] INIT(= N_("E484: Can't open file %s"));
|
||||
EXTERN char_u e_notread[] INIT(= N_("E485: Can't read file %s"));
|
||||
EXTERN char_u e_nowrtmsg[] INIT(= N_("E37: No write since last change (add ! to override)"));
|
||||
EXTERN char_u e_nowrtmsg_nobang[] INIT(= N_("E37: No write since last change"));
|
||||
EXTERN char_u e_null[] INIT(= N_("E38: Null argument"));
|
||||
#if defined(FEAT_DIGRAPHS) || defined(FEAT_TIMERS)
|
||||
EXTERN char_u e_number_exp[] INIT(= N_("E39: Number expected"));
|
||||
@@ -1675,6 +1681,10 @@ EXTERN int did_echo_string_emsg INIT(= FALSE);
|
||||
EXTERN int *eval_lavars_used INIT(= NULL);
|
||||
#endif
|
||||
|
||||
#ifdef WIN3264
|
||||
EXTERN int ctrl_break_was_pressed INIT(= FALSE);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Optional Farsi support. Include it here, so EXTERN and INIT are defined.
|
||||
*/
|
||||
|
||||
@@ -1066,8 +1066,12 @@ gui_update_cursor(
|
||||
int cur_width = 0;
|
||||
int cur_height = 0;
|
||||
int old_hl_mask;
|
||||
int idx;
|
||||
cursorentry_T *shape;
|
||||
int id;
|
||||
#ifdef FEAT_TERMINAL
|
||||
guicolor_T shape_fg = INVALCOLOR;
|
||||
guicolor_T shape_bg = INVALCOLOR;
|
||||
#endif
|
||||
guicolor_T cfg, cbg, cc; /* cursor fore-/background color */
|
||||
int cattr; /* cursor attributes */
|
||||
int attr;
|
||||
@@ -1109,20 +1113,35 @@ gui_update_cursor(
|
||||
|
||||
/*
|
||||
* How the cursor is drawn depends on the current mode.
|
||||
* When in a terminal window use the shape/color specified there.
|
||||
*/
|
||||
idx = get_shape_idx(FALSE);
|
||||
if (State & LANGMAP)
|
||||
id = shape_table[idx].id_lm;
|
||||
#ifdef FEAT_TERMINAL
|
||||
if (use_terminal_cursor())
|
||||
shape = term_get_cursor_shape(&shape_fg, &shape_bg);
|
||||
else
|
||||
id = shape_table[idx].id;
|
||||
#endif
|
||||
shape = &shape_table[get_shape_idx(FALSE)];
|
||||
if (State & LANGMAP)
|
||||
id = shape->id_lm;
|
||||
else
|
||||
id = shape->id;
|
||||
|
||||
/* get the colors and attributes for the cursor. Default is inverted */
|
||||
cfg = INVALCOLOR;
|
||||
cbg = INVALCOLOR;
|
||||
cattr = HL_INVERSE;
|
||||
gui_mch_set_blinking(shape_table[idx].blinkwait,
|
||||
shape_table[idx].blinkon,
|
||||
shape_table[idx].blinkoff);
|
||||
gui_mch_set_blinking(shape->blinkwait,
|
||||
shape->blinkon,
|
||||
shape->blinkoff);
|
||||
#ifdef FEAT_TERMINAL
|
||||
if (shape_bg != INVALCOLOR)
|
||||
{
|
||||
cattr = 0;
|
||||
cfg = shape_fg;
|
||||
cbg = shape_bg;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (id > 0)
|
||||
{
|
||||
cattr = syn_id2colors(id, &cfg, &cbg);
|
||||
@@ -1217,7 +1236,7 @@ gui_update_cursor(
|
||||
}
|
||||
|
||||
old_hl_mask = gui.highlight_mask;
|
||||
if (shape_table[idx].shape == SHAPE_BLOCK
|
||||
if (shape->shape == SHAPE_BLOCK
|
||||
#ifdef FEAT_HANGULIN
|
||||
|| composing_hangul
|
||||
#endif
|
||||
@@ -1257,16 +1276,14 @@ gui_update_cursor(
|
||||
* First draw the partial cursor, then overwrite with the text
|
||||
* character, using a transparent background.
|
||||
*/
|
||||
if (shape_table[idx].shape == SHAPE_VER)
|
||||
if (shape->shape == SHAPE_VER)
|
||||
{
|
||||
cur_height = gui.char_height;
|
||||
cur_width = (gui.char_width * shape_table[idx].percentage
|
||||
+ 99) / 100;
|
||||
cur_width = (gui.char_width * shape->percentage + 99) / 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
cur_height = (gui.char_height * shape_table[idx].percentage
|
||||
+ 99) / 100;
|
||||
cur_height = (gui.char_height * shape->percentage + 99) / 100;
|
||||
cur_width = gui.char_width;
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
@@ -1274,7 +1291,7 @@ gui_update_cursor(
|
||||
LineOffset[gui.row] + screen_Columns) > 1)
|
||||
{
|
||||
/* Double wide character. */
|
||||
if (shape_table[idx].shape != SHAPE_VER)
|
||||
if (shape->shape != SHAPE_VER)
|
||||
cur_width += gui.char_width;
|
||||
# ifdef FEAT_RIGHTLEFT
|
||||
if (CURSOR_BAR_RIGHT)
|
||||
@@ -1745,7 +1762,7 @@ gui_clear_block(
|
||||
void
|
||||
gui_update_cursor_later(void)
|
||||
{
|
||||
OUT_STR(IF_EB("\033|s", ESC_STR "|s"));
|
||||
OUT_STR(IF_EB("\033|s", ESC_STR "|s"));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2396,6 +2413,7 @@ gui_outstr_nowrap(
|
||||
/* Do we underline the text? */
|
||||
if (hl_mask_todo & HL_UNDERLINE)
|
||||
draw_flags |= DRAW_UNDERL;
|
||||
|
||||
#else
|
||||
/* Do we underline the text? */
|
||||
if ((hl_mask_todo & HL_UNDERLINE) || (hl_mask_todo & HL_ITALIC))
|
||||
@@ -2405,6 +2423,10 @@ gui_outstr_nowrap(
|
||||
if (hl_mask_todo & HL_UNDERCURL)
|
||||
draw_flags |= DRAW_UNDERC;
|
||||
|
||||
/* Do we strikethrough the text? */
|
||||
if (hl_mask_todo & HL_STRIKETHROUGH)
|
||||
draw_flags |= DRAW_STRIKE;
|
||||
|
||||
/* Do we draw transparently? */
|
||||
if (flags & GUI_MON_TRS_CURSOR)
|
||||
draw_flags |= DRAW_TRANSP;
|
||||
@@ -4965,7 +4987,7 @@ gui_mouse_correct(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Find window where the mouse pointer "y" coordinate is in.
|
||||
* Find window where the mouse pointer "x" / "y" coordinate is in.
|
||||
*/
|
||||
static win_T *
|
||||
xy2win(int x UNUSED, int y UNUSED)
|
||||
@@ -4989,6 +5011,8 @@ xy2win(int x UNUSED, int y UNUSED)
|
||||
return NULL;
|
||||
# endif
|
||||
wp = mouse_find_win(&row, &col);
|
||||
if (wp == NULL)
|
||||
return NULL;
|
||||
# ifdef FEAT_MOUSESHAPE
|
||||
if (State == HITRETURN || State == ASKMORE)
|
||||
{
|
||||
|
||||
@@ -143,8 +143,9 @@
|
||||
# define DRAW_ITALIC 0x10 /* draw italic text */
|
||||
#endif
|
||||
#define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */
|
||||
#define DRAW_WIDE 0x40 /* drawing wide char (MacVim) */
|
||||
#define DRAW_COMP 0x80 /* drawing composing char (MacVim) */
|
||||
#define DRAW_STRIKE 0x40 /* strikethrough */
|
||||
#define DRAW_WIDE 0x80 /* drawing wide char (MacVim) */
|
||||
#define DRAW_COMP 0x100 /* drawing composing char (MacVim) */
|
||||
|
||||
/* For our own tearoff menu item */
|
||||
#define TEAR_STRING "-->Detach"
|
||||
|
||||
+3
-11
@@ -1177,23 +1177,15 @@ drawBalloon(BalloonEval *beval)
|
||||
int x_offset = EVAL_OFFSET_X;
|
||||
int y_offset = EVAL_OFFSET_Y;
|
||||
PangoLayout *layout;
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkRectangle rect;
|
||||
GdkMonitor * const mon = gdk_display_get_monitor_at_window(
|
||||
gtk_widget_get_display(beval->balloonShell),
|
||||
gtk_widget_get_window(beval->balloonShell));
|
||||
gdk_monitor_get_geometry(mon, &rect);
|
||||
|
||||
screen_w = rect.width;
|
||||
screen_h = rect.height;
|
||||
# else
|
||||
# if !GTK_CHECK_VERSION(3,22,2)
|
||||
GdkScreen *screen;
|
||||
|
||||
screen = gtk_widget_get_screen(beval->target);
|
||||
gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
|
||||
screen_w = gdk_screen_get_width(screen);
|
||||
screen_h = gdk_screen_get_height(screen);
|
||||
# endif
|
||||
gui_gtk_get_screen_size_of_win(beval->balloonShell,
|
||||
&screen_w, &screen_h);
|
||||
# if !GTK_CHECK_VERSION(3,0,0)
|
||||
gtk_widget_ensure_style(beval->balloonShell);
|
||||
gtk_widget_ensure_style(beval->balloonLabel);
|
||||
|
||||
+133
-125
@@ -789,6 +789,37 @@ property_event(GtkWidget *widget,
|
||||
#endif /* defined(FEAT_CLIENTSERVER) */
|
||||
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
typedef gboolean timeout_cb_type;
|
||||
#else
|
||||
typedef gint timeout_cb_type;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Start a timer that will invoke the specified callback.
|
||||
* Returns the ID of the timer.
|
||||
*/
|
||||
static guint
|
||||
timeout_add(int time, timeout_cb_type (*callback)(gpointer), int *flagp)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
return g_timeout_add((guint)time, (GSourceFunc)callback, flagp);
|
||||
#else
|
||||
return gtk_timeout_add((guint32)time, (GtkFunction)callback, flagp);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
timeout_remove(guint timer)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
g_source_remove(timer);
|
||||
#else
|
||||
gtk_timeout_remove(timer);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Focus handlers:
|
||||
*/
|
||||
@@ -866,11 +897,7 @@ gui_mch_stop_blink(void)
|
||||
{
|
||||
if (blink_timer)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
g_source_remove(blink_timer);
|
||||
#else
|
||||
gtk_timeout_remove(blink_timer);
|
||||
#endif
|
||||
timeout_remove(blink_timer);
|
||||
blink_timer = 0;
|
||||
}
|
||||
if (blink_state == BLINK_OFF)
|
||||
@@ -881,36 +908,20 @@ gui_mch_stop_blink(void)
|
||||
blink_state = BLINK_NONE;
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
static gboolean
|
||||
#else
|
||||
static gint
|
||||
#endif
|
||||
static timeout_cb_type
|
||||
blink_cb(gpointer data UNUSED)
|
||||
{
|
||||
if (blink_state == BLINK_ON)
|
||||
{
|
||||
gui_undraw_cursor();
|
||||
blink_state = BLINK_OFF;
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
blink_timer = g_timeout_add((guint)blink_offtime,
|
||||
(GSourceFunc) blink_cb, NULL);
|
||||
#else
|
||||
blink_timer = gtk_timeout_add((guint32)blink_offtime,
|
||||
(GtkFunction) blink_cb, NULL);
|
||||
#endif
|
||||
blink_timer = timeout_add(blink_offtime, blink_cb, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_update_cursor(TRUE, FALSE);
|
||||
blink_state = BLINK_ON;
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
blink_timer = g_timeout_add((guint)blink_ontime,
|
||||
(GSourceFunc) blink_cb, NULL);
|
||||
#else
|
||||
blink_timer = gtk_timeout_add((guint32)blink_ontime,
|
||||
(GtkFunction) blink_cb, NULL);
|
||||
#endif
|
||||
blink_timer = timeout_add(blink_ontime, blink_cb, NULL);
|
||||
}
|
||||
gui_mch_flush();
|
||||
|
||||
@@ -926,23 +937,13 @@ gui_mch_start_blink(void)
|
||||
{
|
||||
if (blink_timer)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
g_source_remove(blink_timer);
|
||||
#else
|
||||
gtk_timeout_remove(blink_timer);
|
||||
#endif
|
||||
timeout_remove(blink_timer);
|
||||
blink_timer = 0;
|
||||
}
|
||||
/* Only switch blinking on if none of the times is zero */
|
||||
if (blink_waittime && blink_ontime && blink_offtime && gui.in_focus)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
blink_timer = g_timeout_add((guint)blink_waittime,
|
||||
(GSourceFunc) blink_cb, NULL);
|
||||
#else
|
||||
blink_timer = gtk_timeout_add((guint32)blink_waittime,
|
||||
(GtkFunction) blink_cb, NULL);
|
||||
#endif
|
||||
blink_timer = timeout_add(blink_waittime, blink_cb, NULL);
|
||||
blink_state = BLINK_ON;
|
||||
gui_update_cursor(TRUE, FALSE);
|
||||
gui_mch_flush();
|
||||
@@ -1733,7 +1734,6 @@ gui_mch_init_check(void)
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Mouse handling callbacks
|
||||
*/
|
||||
@@ -1745,11 +1745,7 @@ static int mouse_timed_out = TRUE;
|
||||
/*
|
||||
* Timer used to recognize multiple clicks of the mouse button
|
||||
*/
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
static gboolean
|
||||
#else
|
||||
static gint
|
||||
#endif
|
||||
static timeout_cb_type
|
||||
mouse_click_timer_cb(gpointer data)
|
||||
{
|
||||
/* we don't use this information currently */
|
||||
@@ -1759,13 +1755,9 @@ mouse_click_timer_cb(gpointer data)
|
||||
return FALSE; /* don't happen again */
|
||||
}
|
||||
|
||||
static guint motion_repeat_timer = 0;
|
||||
static int motion_repeat_offset = FALSE;
|
||||
#ifdef GTK_DEST_DEFAULT_ALL
|
||||
static gboolean motion_repeat_timer_cb(gpointer);
|
||||
#else
|
||||
static gint motion_repeat_timer_cb(gpointer);
|
||||
#endif
|
||||
static guint motion_repeat_timer = 0;
|
||||
static int motion_repeat_offset = FALSE;
|
||||
static timeout_cb_type motion_repeat_timer_cb(gpointer);
|
||||
|
||||
static void
|
||||
process_motion_notify(int x, int y, GdkModifierType state)
|
||||
@@ -1853,13 +1845,8 @@ process_motion_notify(int x, int y, GdkModifierType state)
|
||||
|
||||
/* shoot again */
|
||||
if (!motion_repeat_timer)
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
motion_repeat_timer = g_timeout_add((guint)delay,
|
||||
motion_repeat_timer_cb, NULL);
|
||||
#else
|
||||
motion_repeat_timer = gtk_timeout_add((guint32)delay,
|
||||
motion_repeat_timer_cb, NULL);
|
||||
#endif
|
||||
motion_repeat_timer = timeout_add(delay, motion_repeat_timer_cb,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1904,11 +1891,7 @@ gui_gtk_window_at_position(GtkWidget *widget,
|
||||
/*
|
||||
* Timer used to recognize multiple clicks of the mouse button.
|
||||
*/
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
static gboolean
|
||||
#else
|
||||
static gint
|
||||
#endif
|
||||
static timeout_cb_type
|
||||
motion_repeat_timer_cb(gpointer data UNUSED)
|
||||
{
|
||||
int x;
|
||||
@@ -2019,23 +2002,14 @@ button_press_event(GtkWidget *widget,
|
||||
/* Handle multiple clicks */
|
||||
if (!mouse_timed_out && mouse_click_timer)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
g_source_remove(mouse_click_timer);
|
||||
#else
|
||||
gtk_timeout_remove(mouse_click_timer);
|
||||
#endif
|
||||
timeout_remove(mouse_click_timer);
|
||||
mouse_click_timer = 0;
|
||||
repeated_click = TRUE;
|
||||
}
|
||||
|
||||
mouse_timed_out = FALSE;
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
mouse_click_timer = g_timeout_add((guint)p_mouset,
|
||||
mouse_click_timer_cb, &mouse_timed_out);
|
||||
#else
|
||||
mouse_click_timer = gtk_timeout_add((guint32)p_mouset,
|
||||
mouse_click_timer_cb, &mouse_timed_out);
|
||||
#endif
|
||||
mouse_click_timer = timeout_add(p_mouset, mouse_click_timer_cb,
|
||||
&mouse_timed_out);
|
||||
|
||||
switch (event->button)
|
||||
{
|
||||
@@ -2129,11 +2103,7 @@ button_release_event(GtkWidget *widget UNUSED,
|
||||
area .*/
|
||||
if (motion_repeat_timer)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
g_source_remove(motion_repeat_timer);
|
||||
#else
|
||||
gtk_timeout_remove(motion_repeat_timer);
|
||||
#endif
|
||||
timeout_remove(motion_repeat_timer);
|
||||
motion_repeat_timer = 0;
|
||||
}
|
||||
|
||||
@@ -4578,7 +4548,7 @@ mainwin_destroy_cb(GtkObject *object UNUSED, gpointer data UNUSED)
|
||||
* scrollbar init.), actually do the standard hints and stop the timer.
|
||||
* We'll not let the default hints be set while this timer's active.
|
||||
*/
|
||||
static gboolean
|
||||
static timeout_cb_type
|
||||
check_startup_plug_hints(gpointer data UNUSED)
|
||||
{
|
||||
if (init_window_hints_state == 1)
|
||||
@@ -4681,7 +4651,7 @@ gui_mch_open(void)
|
||||
{
|
||||
update_window_manager_hints(pixel_width, pixel_height);
|
||||
init_window_hints_state = 1;
|
||||
g_timeout_add(1000, check_startup_plug_hints, NULL);
|
||||
timeout_add(1000, check_startup_plug_hints, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4971,6 +4941,29 @@ gui_mch_set_shellsize(int width, int height,
|
||||
gui_mch_update();
|
||||
}
|
||||
|
||||
void
|
||||
gui_gtk_get_screen_size_of_win(GtkWidget *wid, int *width, int *height)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,22,0)
|
||||
GdkDisplay *dpy = gtk_widget_get_display(wid);
|
||||
GdkWindow *win = gtk_widget_get_window(wid);
|
||||
GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win);
|
||||
GdkRectangle geometry;
|
||||
|
||||
gdk_monitor_get_geometry(monitor, &geometry);
|
||||
*width = geometry.width;
|
||||
*height = geometry.height;
|
||||
#else
|
||||
GdkScreen* screen;
|
||||
|
||||
if (wid != NULL && gtk_widget_has_screen(wid))
|
||||
screen = gtk_widget_get_screen(wid);
|
||||
else
|
||||
screen = gdk_screen_get_default();
|
||||
*width = gdk_screen_get_width(screen);
|
||||
*height = gdk_screen_get_height(screen);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* The screen size is used to make sure the initial window doesn't get bigger
|
||||
@@ -4980,30 +4973,11 @@ gui_mch_set_shellsize(int width, int height,
|
||||
void
|
||||
gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkRectangle rect;
|
||||
GdkMonitor * const mon = gdk_display_get_monitor_at_window(
|
||||
gtk_widget_get_display(gui.mainwin),
|
||||
gtk_widget_get_window(gui.mainwin));
|
||||
gdk_monitor_get_geometry(mon, &rect);
|
||||
gui_gtk_get_screen_size_of_win(gui.mainwin, screen_w, screen_h);
|
||||
|
||||
*screen_w = rect.width;
|
||||
/* Subtract 'guiheadroom' from the height to allow some room for the
|
||||
* window manager (task list and window title bar). */
|
||||
*screen_h = rect.height - p_ghr;
|
||||
#else
|
||||
GdkScreen* screen;
|
||||
|
||||
if (gui.mainwin != NULL && gtk_widget_has_screen(gui.mainwin))
|
||||
screen = gtk_widget_get_screen(gui.mainwin);
|
||||
else
|
||||
screen = gdk_screen_get_default();
|
||||
|
||||
*screen_w = gdk_screen_get_width(screen);
|
||||
/* Subtract 'guiheadroom' from the height to allow some room for the
|
||||
* window manager (task list and window title bar). */
|
||||
*screen_h = gdk_screen_get_height(screen) - p_ghr;
|
||||
#endif
|
||||
*screen_h -= p_ghr;
|
||||
|
||||
/*
|
||||
* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
|
||||
@@ -5938,6 +5912,27 @@ draw_under(int flags, int row, int col, int cells)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Draw a strikethrough line */
|
||||
if (flags & DRAW_STRIKE)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
cairo_set_line_width(cr, 1.0);
|
||||
cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT);
|
||||
cairo_set_source_rgba(cr,
|
||||
gui.spcolor->red, gui.spcolor->green, gui.spcolor->blue,
|
||||
gui.spcolor->alpha);
|
||||
cairo_move_to(cr, FILL_X(col), y + 1 - gui.char_height/2 + 0.5);
|
||||
cairo_line_to(cr, FILL_X(col + cells), y + 1 - gui.char_height/2 + 0.5);
|
||||
cairo_stroke(cr);
|
||||
#else
|
||||
gdk_gc_set_foreground(gui.text_gc, gui.spcolor);
|
||||
gdk_draw_line(gui.drawarea->window, gui.text_gc,
|
||||
FILL_X(col), y + 1 - gui.char_height/2,
|
||||
FILL_X(col + cells), y + 1 - gui.char_height/2);
|
||||
gdk_gc_set_foreground(gui.text_gc, gui.fgcolor);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Underline: draw a line at the bottom of the character cell. */
|
||||
if (flags & DRAW_UNDERL)
|
||||
{
|
||||
@@ -5946,16 +5941,14 @@ draw_under(int flags, int row, int col, int cells)
|
||||
if (p_linespace > 1)
|
||||
y -= p_linespace - 1;
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
{
|
||||
cairo_set_line_width(cr, 1.0);
|
||||
cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT);
|
||||
cairo_set_source_rgba(cr,
|
||||
gui.fgcolor->red, gui.fgcolor->green, gui.fgcolor->blue,
|
||||
gui.fgcolor->alpha);
|
||||
cairo_move_to(cr, FILL_X(col), y + 0.5);
|
||||
cairo_line_to(cr, FILL_X(col + cells), y + 0.5);
|
||||
cairo_stroke(cr);
|
||||
}
|
||||
cairo_set_line_width(cr, 1.0);
|
||||
cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT);
|
||||
cairo_set_source_rgba(cr,
|
||||
gui.fgcolor->red, gui.fgcolor->green, gui.fgcolor->blue,
|
||||
gui.fgcolor->alpha);
|
||||
cairo_move_to(cr, FILL_X(col), y + 0.5);
|
||||
cairo_line_to(cr, FILL_X(col + cells), y + 0.5);
|
||||
cairo_stroke(cr);
|
||||
#else
|
||||
gdk_draw_line(gui.drawarea->window, gui.text_gc,
|
||||
FILL_X(col), y,
|
||||
@@ -6584,11 +6577,7 @@ gui_mch_update(void)
|
||||
g_main_context_iteration(NULL, TRUE);
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
static gboolean
|
||||
#else
|
||||
static gint
|
||||
#endif
|
||||
static timeout_cb_type
|
||||
input_timer_cb(gpointer data)
|
||||
{
|
||||
int *timed_out = (int *) data;
|
||||
@@ -6599,6 +6588,19 @@ input_timer_cb(gpointer data)
|
||||
return FALSE; /* don't happen again */
|
||||
}
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
static timeout_cb_type
|
||||
channel_poll_cb(gpointer data UNUSED)
|
||||
{
|
||||
/* Using an event handler for a channel that may be disconnected does
|
||||
* not work, it hangs. Instead poll for messages. */
|
||||
channel_handle_events(TRUE);
|
||||
parse_queued_messages();
|
||||
|
||||
return TRUE; /* repeat */
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* GUI input routine called by gui_wait_for_chars(). Waits for a character
|
||||
* from the keyboard.
|
||||
@@ -6615,20 +6617,26 @@ gui_mch_wait_for_chars(long wtime)
|
||||
guint timer;
|
||||
static int timed_out;
|
||||
int retval = FAIL;
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
guint channel_timer = 0;
|
||||
#endif
|
||||
|
||||
timed_out = FALSE;
|
||||
|
||||
/* this timeout makes sure that we will return if no characters arrived in
|
||||
* time */
|
||||
if (wtime > 0)
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
timer = g_timeout_add((guint)wtime, input_timer_cb, &timed_out);
|
||||
#else
|
||||
timer = gtk_timeout_add((guint32)wtime, input_timer_cb, &timed_out);
|
||||
#endif
|
||||
timer = timeout_add(wtime, input_timer_cb, &timed_out);
|
||||
else
|
||||
timer = 0;
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
/* If there is a channel with the keep_open flag we need to poll for input
|
||||
* on them. */
|
||||
if (channel_any_keep_open())
|
||||
channel_timer = timeout_add(20, channel_poll_cb, NULL);
|
||||
#endif
|
||||
|
||||
focus = gui.in_focus;
|
||||
|
||||
do
|
||||
@@ -6678,10 +6686,10 @@ gui_mch_wait_for_chars(long wtime)
|
||||
|
||||
theend:
|
||||
if (timer != 0 && !timed_out)
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
g_source_remove(timer);
|
||||
#else
|
||||
gtk_timeout_remove(timer);
|
||||
timeout_remove(timer);
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
if (channel_timer != 0)
|
||||
timeout_remove(channel_timer);
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
|
||||
@@ -3909,6 +3909,11 @@ draw_string_QD(int row, int col, char_u *s, int len, int flags)
|
||||
MoveTo(FILL_X(col), FILL_Y(row + 1) - 1);
|
||||
LineTo(FILL_X(col + len) - 1, FILL_Y(row + 1) - 1);
|
||||
}
|
||||
if (flags & DRAW_STRIKE)
|
||||
{
|
||||
MoveTo(FILL_X(col), FILL_Y(row + 1) - gui.char_height/2);
|
||||
LineTo(FILL_X(col + len) - 1, FILL_Y(row + 1) - gui.char_height/2);
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & DRAW_UNDERC)
|
||||
|
||||
+23
-6
@@ -1840,6 +1840,7 @@ process_message(void)
|
||||
{
|
||||
trash_input_buf();
|
||||
got_int = TRUE;
|
||||
ctrl_break_was_pressed = TRUE;
|
||||
string[0] = Ctrl_C;
|
||||
add_to_input_buf(string, 1);
|
||||
}
|
||||
@@ -2072,20 +2073,23 @@ gui_mch_wait_for_chars(int wtime)
|
||||
did_add_timer = FALSE;
|
||||
#endif
|
||||
#ifdef MESSAGE_QUEUE
|
||||
/* Check channel while waiting message. */
|
||||
/* Check channel I/O while waiting for a message. */
|
||||
for (;;)
|
||||
{
|
||||
MSG msg;
|
||||
|
||||
parse_queued_messages();
|
||||
|
||||
if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)
|
||||
|| MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
|
||||
!= WAIT_TIMEOUT)
|
||||
if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
|
||||
{
|
||||
process_message();
|
||||
break;
|
||||
}
|
||||
else if (MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
|
||||
!= WAIT_TIMEOUT)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
/*
|
||||
* Don't use gui_mch_update() because then we will spin-lock until a
|
||||
* char arrives, instead we use GetMessage() to hang until an
|
||||
@@ -2093,6 +2097,7 @@ gui_mch_wait_for_chars(int wtime)
|
||||
* returning as soon as it contains a single char -- webb
|
||||
*/
|
||||
process_message();
|
||||
#endif
|
||||
|
||||
if (input_available())
|
||||
{
|
||||
@@ -6422,6 +6427,18 @@ gui_mch_draw_string(
|
||||
DeleteObject(SelectObject(s_hdc, old_pen));
|
||||
}
|
||||
|
||||
/* Strikethrough */
|
||||
if (flags & DRAW_STRIKE)
|
||||
{
|
||||
hpen = CreatePen(PS_SOLID, 1, gui.currSpColor);
|
||||
old_pen = SelectObject(s_hdc, hpen);
|
||||
y = FILL_Y(row + 1) - gui.char_height/2;
|
||||
MoveToEx(s_hdc, FILL_X(col), y, NULL);
|
||||
/* Note: LineTo() excludes the last pixel in the line. */
|
||||
LineTo(s_hdc, FILL_X(col + len), y);
|
||||
DeleteObject(SelectObject(s_hdc, old_pen));
|
||||
}
|
||||
|
||||
/* Undercurl */
|
||||
if (flags & DRAW_UNDERC)
|
||||
{
|
||||
|
||||
+62
-28
@@ -136,20 +136,11 @@ static guicolor_T prev_sp_color = INVALCOLOR;
|
||||
static XButtonPressedEvent last_mouse_event;
|
||||
#endif
|
||||
|
||||
static void gui_x11_timer_cb(XtPointer timed_out, XtIntervalId *interval_id);
|
||||
static void gui_x11_visibility_cb(Widget w, XtPointer dud, XEvent *event, Boolean *dum);
|
||||
static void gui_x11_expose_cb(Widget w, XtPointer dud, XEvent *event, Boolean *dum);
|
||||
static void gui_x11_resize_window_cb(Widget w, XtPointer dud, XEvent *event, Boolean *dum);
|
||||
static void gui_x11_focus_change_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum);
|
||||
static void gui_x11_enter_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum);
|
||||
static void gui_x11_leave_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum);
|
||||
static void gui_x11_mouse_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum);
|
||||
static void gui_x11_check_copy_area(void);
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
static void gui_x11_send_event_handler(Widget, XtPointer, XEvent *, Boolean *);
|
||||
#endif
|
||||
static void gui_x11_wm_protocol_handler(Widget, XtPointer, XEvent *, Boolean *);
|
||||
static void gui_x11_blink_cb(XtPointer timed_out, XtIntervalId *interval_id);
|
||||
static Cursor gui_x11_create_blank_mouse(void);
|
||||
static void draw_curl(int row, int col, int cells);
|
||||
|
||||
@@ -574,6 +565,25 @@ gui_x11_timer_cb(
|
||||
*((int *)timed_out) = TRUE;
|
||||
}
|
||||
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
static void
|
||||
channel_poll_cb(
|
||||
XtPointer client_data,
|
||||
XtIntervalId *interval_id UNUSED)
|
||||
{
|
||||
XtIntervalId *channel_timer = (XtIntervalId *)client_data;
|
||||
|
||||
/* Using an event handler for a channel that may be disconnected does
|
||||
* not work, it hangs. Instead poll for messages. */
|
||||
channel_handle_events(TRUE);
|
||||
parse_queued_messages();
|
||||
|
||||
/* repeat */
|
||||
*channel_timer = XtAppAddTimeOut(app_context, (long_u)20,
|
||||
channel_poll_cb, client_data);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
gui_x11_visibility_cb(
|
||||
Widget w UNUSED,
|
||||
@@ -2532,6 +2542,16 @@ gui_mch_draw_string(
|
||||
y, FILL_X(col + cells) - 1, y);
|
||||
}
|
||||
|
||||
if (flags & DRAW_STRIKE)
|
||||
{
|
||||
int y = FILL_Y(row + 1) - gui.char_height/2;
|
||||
|
||||
XSetForeground(gui.dpy, gui.text_gc, prev_sp_color);
|
||||
XDrawLine(gui.dpy, gui.wid, gui.text_gc, FILL_X(col),
|
||||
y, FILL_X(col + cells) - 1, y);
|
||||
XSetForeground(gui.dpy, gui.text_gc, prev_fg_color);
|
||||
}
|
||||
|
||||
#ifdef FEAT_XFONTSET
|
||||
if (current_fontset != NULL)
|
||||
XSetClipMask(gui.dpy, gui.text_gc, None);
|
||||
@@ -2698,12 +2718,22 @@ gui_mch_wait_for_chars(long wtime)
|
||||
static int timed_out;
|
||||
XtIntervalId timer = (XtIntervalId)0;
|
||||
XtInputMask desired;
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
XtIntervalId channel_timer = (XtIntervalId)0;
|
||||
#endif
|
||||
|
||||
timed_out = FALSE;
|
||||
|
||||
if (wtime > 0)
|
||||
timer = XtAppAddTimeOut(app_context, (long_u)wtime, gui_x11_timer_cb,
|
||||
&timed_out);
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
/* If there is a channel with the keep_open flag we need to poll for input
|
||||
* on them. */
|
||||
if (channel_any_keep_open())
|
||||
channel_timer = XtAppAddTimeOut(app_context, (long_u)20,
|
||||
channel_poll_cb, (XtPointer)&channel_timer);
|
||||
#endif
|
||||
|
||||
focus = gui.in_focus;
|
||||
#ifdef ALT_X_INPUT
|
||||
@@ -2755,6 +2785,10 @@ gui_mch_wait_for_chars(long wtime)
|
||||
|
||||
if (timer != (XtIntervalId)0 && !timed_out)
|
||||
XtRemoveTimeOut(timer);
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
if (channel_timer != (XtIntervalId)0)
|
||||
XtRemoveTimeOut(channel_timer);
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
@@ -3087,25 +3121,6 @@ gui_mch_stop_blink(void)
|
||||
blink_state = BLINK_NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Start the cursor blinking. If it was already blinking, this restarts the
|
||||
* waiting time and shows the cursor.
|
||||
*/
|
||||
void
|
||||
gui_mch_start_blink(void)
|
||||
{
|
||||
if (blink_timer != (XtIntervalId)0)
|
||||
XtRemoveTimeOut(blink_timer);
|
||||
/* Only switch blinking on if none of the times is zero */
|
||||
if (blink_waittime && blink_ontime && blink_offtime && gui.in_focus)
|
||||
{
|
||||
blink_timer = XtAppAddTimeOut(app_context, blink_waittime,
|
||||
gui_x11_blink_cb, NULL);
|
||||
blink_state = BLINK_ON;
|
||||
gui_update_cursor(TRUE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gui_x11_blink_cb(
|
||||
XtPointer timed_out UNUSED,
|
||||
@@ -3127,6 +3142,25 @@ gui_x11_blink_cb(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Start the cursor blinking. If it was already blinking, this restarts the
|
||||
* waiting time and shows the cursor.
|
||||
*/
|
||||
void
|
||||
gui_mch_start_blink(void)
|
||||
{
|
||||
if (blink_timer != (XtIntervalId)0)
|
||||
XtRemoveTimeOut(blink_timer);
|
||||
/* Only switch blinking on if none of the times is zero */
|
||||
if (blink_waittime && blink_ontime && blink_offtime && gui.in_focus)
|
||||
{
|
||||
blink_timer = XtAppAddTimeOut(app_context, blink_waittime,
|
||||
gui_x11_blink_cb, NULL);
|
||||
blink_state = BLINK_ON;
|
||||
gui_update_cursor(TRUE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the RGB value of a pixel as a long.
|
||||
*/
|
||||
|
||||
@@ -4262,43 +4262,6 @@ py_fix_cursor(linenr_T lo, linenr_T hi, linenr_T extra)
|
||||
invalidate_botline();
|
||||
}
|
||||
|
||||
/*
|
||||
* Find a window that contains "buf" and switch to it.
|
||||
* If there is no such window, use the current window and change "curbuf".
|
||||
* Caller must initialize save_curbuf to NULL.
|
||||
* restore_win_for_buf() MUST be called later!
|
||||
*/
|
||||
static void
|
||||
switch_to_win_for_buf(
|
||||
buf_T *buf,
|
||||
win_T **save_curwinp,
|
||||
tabpage_T **save_curtabp,
|
||||
bufref_T *save_curbuf)
|
||||
{
|
||||
win_T *wp;
|
||||
tabpage_T *tp;
|
||||
|
||||
if (find_win_for_buf(buf, &wp, &tp) == FAIL)
|
||||
switch_buffer(save_curbuf, buf);
|
||||
else if (switch_win(save_curwinp, save_curtabp, wp, tp, TRUE) == FAIL)
|
||||
{
|
||||
restore_win(*save_curwinp, *save_curtabp, TRUE);
|
||||
switch_buffer(save_curbuf, buf);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
restore_win_for_buf(
|
||||
win_T *save_curwin,
|
||||
tabpage_T *save_curtab,
|
||||
bufref_T *save_curbuf)
|
||||
{
|
||||
if (save_curbuf->br_buf == NULL)
|
||||
restore_win(save_curwin, save_curtab, TRUE);
|
||||
else
|
||||
restore_buffer(save_curbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Replace a line in the specified buffer. The line number is
|
||||
* in Vim format (1-based). The replacement line is given as
|
||||
|
||||
+1
-1
@@ -993,7 +993,7 @@ static VALUE vim_message(VALUE self UNUSED, VALUE str)
|
||||
if (RSTRING_LEN(str) > 0)
|
||||
{
|
||||
/* Only do this when the string isn't empty, alloc(0) causes trouble. */
|
||||
buff = ALLOCA_N(char, RSTRING_LEN(str));
|
||||
buff = ALLOCA_N(char, RSTRING_LEN(str) + 1);
|
||||
strcpy(buff, RSTRING_PTR(str));
|
||||
p = strchr(buff, '\n');
|
||||
if (p) *p = '\0';
|
||||
|
||||
@@ -421,6 +421,7 @@ serverSendToVim(
|
||||
{
|
||||
LookupName(dpy, loosename ? loosename : name,
|
||||
/*DELETE=*/TRUE, NULL);
|
||||
vim_free(loosename);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
+14
-10
@@ -2,7 +2,7 @@
|
||||
* iscygpty.c -- part of ptycheck
|
||||
* https://github.com/k-takata/ptycheck
|
||||
*
|
||||
* Copyright (c) 2015-2016 K.Takata
|
||||
* Copyright (c) 2015-2017 K.Takata
|
||||
*
|
||||
* You can redistribute it and/or modify it under the terms of either
|
||||
* the MIT license (as described below) or the Vim license.
|
||||
@@ -27,6 +27,8 @@
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <ctype.h>
|
||||
#include <io.h>
|
||||
#include <wchar.h>
|
||||
@@ -60,19 +62,19 @@
|
||||
//#define USE_DYNFILEID
|
||||
#ifdef USE_DYNFILEID
|
||||
typedef BOOL (WINAPI *pfnGetFileInformationByHandleEx)(
|
||||
HANDLE hFile,
|
||||
HANDLE hFile,
|
||||
FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
||||
LPVOID lpFileInformation,
|
||||
DWORD dwBufferSize
|
||||
LPVOID lpFileInformation,
|
||||
DWORD dwBufferSize
|
||||
);
|
||||
static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL;
|
||||
|
||||
# ifndef USE_FILEEXTD
|
||||
static BOOL WINAPI stub_GetFileInformationByHandleEx(
|
||||
HANDLE hFile,
|
||||
HANDLE hFile,
|
||||
FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
||||
LPVOID lpFileInformation,
|
||||
DWORD dwBufferSize
|
||||
LPVOID lpFileInformation,
|
||||
DWORD dwBufferSize
|
||||
)
|
||||
{
|
||||
return FALSE;
|
||||
@@ -111,7 +113,7 @@ int is_cygpty(int fd)
|
||||
return 0;
|
||||
#else
|
||||
HANDLE h;
|
||||
int size = sizeof(FILE_NAME_INFO) + sizeof(WCHAR) * MAX_PATH;
|
||||
int size = sizeof(FILE_NAME_INFO) + sizeof(WCHAR) * (MAX_PATH - 1);
|
||||
FILE_NAME_INFO *nameinfo;
|
||||
WCHAR *p = NULL;
|
||||
|
||||
@@ -125,7 +127,7 @@ int is_cygpty(int fd)
|
||||
if (GetFileType(h) != FILE_TYPE_PIPE) {
|
||||
return 0;
|
||||
}
|
||||
nameinfo = malloc(size);
|
||||
nameinfo = malloc(size + sizeof(WCHAR));
|
||||
if (nameinfo == NULL) {
|
||||
return 0;
|
||||
}
|
||||
@@ -178,4 +180,6 @@ int is_cygpty_used(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* vi:set ts=8 sts=4 sw=4 noet: */
|
||||
#endif /* _WIN32 */
|
||||
|
||||
/* vim: set ts=4 sw=4: */
|
||||
|
||||
+6
-1
@@ -2,7 +2,7 @@
|
||||
* iscygpty.h -- part of ptycheck
|
||||
* https://github.com/k-takata/ptycheck
|
||||
*
|
||||
* Copyright (c) 2015-2016 K.Takata
|
||||
* Copyright (c) 2015-2017 K.Takata
|
||||
*
|
||||
* You can redistribute it and/or modify it under the terms of either
|
||||
* the MIT license (as described below) or the Vim license.
|
||||
@@ -30,7 +30,12 @@
|
||||
#ifndef _ISCYGPTY_H
|
||||
#define _ISCYGPTY_H
|
||||
|
||||
#ifdef _WIN32
|
||||
int is_cygpty(int fd);
|
||||
int is_cygpty_used(void);
|
||||
#else
|
||||
#define is_cygpty(fd) 0
|
||||
#define is_cygpty_used() 0
|
||||
#endif
|
||||
|
||||
#endif /* _ISCYGPTY_H */
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
CFLAGS = /DINLINE= /Iinclude
|
||||
|
||||
OBJS = \
|
||||
src\encoding.c \
|
||||
src\keyboard.c \
|
||||
src\mouse.c \
|
||||
src\parser.c \
|
||||
src\pen.c \
|
||||
src\screen.c \
|
||||
src\state.c \
|
||||
src\unicode.c \
|
||||
src\vterm.c
|
||||
|
||||
OBJS = \
|
||||
src\encoding.obj \
|
||||
src\keyboard.obj \
|
||||
src\mouse.obj \
|
||||
src\parser.obj \
|
||||
src\pen.obj \
|
||||
src\screen.obj \
|
||||
src\state.obj \
|
||||
src\unicode.obj \
|
||||
src\vterm.obj
|
||||
|
||||
all : vterm.lib
|
||||
|
||||
|
||||
.c.obj :
|
||||
cl $(CFLAGS) /Fo$@ /c $<
|
||||
|
||||
vterm.lib : $(OBJS)
|
||||
lib /OUT:$@ $(OBJS)
|
||||
|
||||
clean:
|
||||
del $(OBJS) vterm.lib
|
||||
@@ -265,7 +265,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
vt = vterm_new(rows, cols);
|
||||
vterm_set_utf8(vt, true);
|
||||
vterm_set_utf8(vt, TRUE);
|
||||
|
||||
vts = vterm_obtain_screen(vt);
|
||||
vterm_screen_set_callbacks(vts, &cb_screen, NULL);
|
||||
|
||||
@@ -8,12 +8,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "vterm_keycodes.h"
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
/* from stdint.h */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned int uint32_t;
|
||||
|
||||
typedef struct VTerm VTerm;
|
||||
typedef struct VTermState VTermState;
|
||||
typedef struct VTermScreen VTermScreen;
|
||||
@@ -115,7 +120,8 @@ typedef enum {
|
||||
VTERM_PROP_ICONNAME, /* string */
|
||||
VTERM_PROP_REVERSE, /* bool */
|
||||
VTERM_PROP_CURSORSHAPE, /* number */
|
||||
VTERM_PROP_MOUSE /* number */
|
||||
VTERM_PROP_MOUSE, /* number */
|
||||
VTERM_PROP_CURSORCOLOR /* string */
|
||||
} VTermProp;
|
||||
|
||||
enum {
|
||||
@@ -183,7 +189,9 @@ void vterm_keyboard_start_paste(VTerm *vt);
|
||||
void vterm_keyboard_end_paste(VTerm *vt);
|
||||
|
||||
void vterm_mouse_move(VTerm *vt, int row, int col, VTermModifier mod);
|
||||
void vterm_mouse_button(VTerm *vt, int button, bool pressed, VTermModifier mod);
|
||||
/* "button" is 1 for left, 2 for middle, 3 for right.
|
||||
* Button 4 is scroll wheel down, button 5 is scroll wheel up. */
|
||||
void vterm_mouse_button(VTerm *vt, int button, int pressed, VTermModifier mod);
|
||||
|
||||
/* ------------
|
||||
* Parser layer
|
||||
@@ -235,6 +243,8 @@ typedef struct {
|
||||
int (*erase)(VTermRect rect, int selective, void *user);
|
||||
int (*initpen)(void *user);
|
||||
int (*setpenattr)(VTermAttr attr, VTermValue *val, void *user);
|
||||
/* Callback for setting various properties. Must return 1 if the property
|
||||
* was accepted, 0 otherwise. */
|
||||
int (*settermprop)(VTermProp prop, VTermValue *val, void *user);
|
||||
int (*bell)(void *user);
|
||||
int (*resize)(int rows, int cols, VTermPos *delta, void *user);
|
||||
@@ -295,6 +305,9 @@ typedef struct {
|
||||
int (*settermprop)(VTermProp prop, VTermValue *val, void *user);
|
||||
int (*bell)(void *user);
|
||||
int (*resize)(int rows, int cols, void *user);
|
||||
/* A line was pushed off the top of the window.
|
||||
* "cells[cols]" contains the cells of that line.
|
||||
* Return value is unused. */
|
||||
int (*sb_pushline)(int cols, const VTermScreenCell *cells, void *user);
|
||||
int (*sb_popline)(int cols, VTermScreenCell *cells, void *user);
|
||||
} VTermScreenCallbacks;
|
||||
@@ -313,6 +326,9 @@ void *vterm_screen_get_cbdata(VTermScreen *screen);
|
||||
void vterm_screen_set_unrecognised_fallbacks(VTermScreen *screen, const VTermParserCallbacks *fallbacks, void *user);
|
||||
void *vterm_screen_get_unrecognised_fbdata(VTermScreen *screen);
|
||||
|
||||
/* Enable support for using the alternate screen if "altscreen" is non-zero.
|
||||
* Before that switching to the alternate screen won't work.
|
||||
* Calling with "altscreen" zero has no effect. */
|
||||
void vterm_screen_enable_altscreen(VTermScreen *screen, int altscreen);
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -70,7 +70,7 @@ void vterm_mouse_move(VTerm *vt, int row, int col, VTermModifier mod)
|
||||
}
|
||||
}
|
||||
|
||||
void vterm_mouse_button(VTerm *vt, int button, bool pressed, VTermModifier mod)
|
||||
void vterm_mouse_button(VTerm *vt, int button, int pressed, VTermModifier mod)
|
||||
{
|
||||
VTermState *state = vt->state;
|
||||
|
||||
@@ -86,6 +86,8 @@ void vterm_mouse_button(VTerm *vt, int button, bool pressed, VTermModifier mod)
|
||||
/* Most of the time we don't get button releases from 4/5 */
|
||||
if(state->mouse_buttons == old_buttons && button < 4)
|
||||
return;
|
||||
if (!(state->mouse_flags & MOUSE_WANT_CLICK))
|
||||
return;
|
||||
|
||||
if(button < 4) {
|
||||
output_mouse(state, button-1, pressed, mod, state->mouse_col, state->mouse_row);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user