mirror of
https://github.com/zoriya/vim.git
synced 2025-12-10 17:26:16 +00:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c37a8e660 | ||
|
|
4db2554954 | ||
|
|
1dccf6351d | ||
|
|
cbe6944956 | ||
|
|
c572da5f67 | ||
|
|
7adf06f4e2 | ||
|
|
4ab7968aa9 | ||
|
|
8d9f0ef5c6 | ||
|
|
e85928a324 | ||
|
|
02e177d3e8 | ||
|
|
0903d56f5c | ||
|
|
13ebb03e75 | ||
|
|
dde81312b0 | ||
|
|
a4f99f5a8b | ||
|
|
e922460394 | ||
|
|
833e0e3c8c | ||
|
|
753289f9bf | ||
|
|
be0b72977f | ||
|
|
f6d9f96b2d | ||
|
|
33d66bd9fa | ||
|
|
6c4d12c527 | ||
|
|
285f243e50 | ||
|
|
77f7474d08 | ||
|
|
829aa64cf5 | ||
|
|
d2c45a1964 | ||
|
|
ec0e07a324 | ||
|
|
6d0826dfbb | ||
|
|
5830232c02 | ||
|
|
3f9a1ff141 | ||
|
|
740c433c59 | ||
|
|
0cbba82359 | ||
|
|
b109bb4e12 | ||
|
|
eef0531621 | ||
|
|
37819ed540 | ||
|
|
5983d50247 | ||
|
|
b241208a13 |
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.0. Last change: 2017 Aug 01
|
||||
*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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Aug 11
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Aug 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4616,6 +4616,11 @@ getqflist([{what}]) *getqflist()*
|
||||
nr get information for this quickfix list; zero
|
||||
means the current quickfix list and '$' means
|
||||
the last quickfix list
|
||||
text use 'errorformat' to extract items from the
|
||||
text and return the resulting entries. The
|
||||
value can be a string with one line or a list
|
||||
with multiple lines. The current quickfix list
|
||||
is not modified.
|
||||
title get the list title
|
||||
winid get the |window-ID| (if opened)
|
||||
all all of the above quickfix properties
|
||||
@@ -4624,6 +4629,9 @@ getqflist([{what}]) *getqflist()*
|
||||
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 'text' is specified, all the other items 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.
|
||||
|
||||
@@ -5217,6 +5225,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
|
||||
@@ -5955,7 +5964,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
|
||||
@@ -5977,6 +5986,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".
|
||||
@@ -7712,12 +7722,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()*
|
||||
@@ -8625,7 +8635,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)
|
||||
|
||||
|
||||
|
||||
@@ -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 @@
|
||||
*intro.txt* For Vim version 8.0. Last change: 2017 Aug 05
|
||||
*intro.txt* For Vim version 8.0. Last change: 2017 Aug 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -839,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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Jul 31
|
||||
*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.
|
||||
@@ -889,6 +890,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"
|
||||
@@ -4041,7 +4046,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
x:PmenuSbar,X:PmenuThumb,*:TabLine,
|
||||
#:TabLineSel,_:TabLineFill,!:CursorColumn,
|
||||
.:CursorLine,o:ColorColumn,q:QuickFixLine,
|
||||
$:StatusLineTerm")
|
||||
z:StatusLineTerm,Z:StatusLineTermNC")
|
||||
global
|
||||
{not in Vi}
|
||||
This option can be used to set highlighting mode for various
|
||||
@@ -5723,18 +5728,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
|
||||
@@ -8839,7 +8832,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
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, "win32pty.dll" is tried as
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 8.0. Last change: 2017 Aug 01
|
||||
*quickref.txt* For Vim version 8.0. Last change: 2017 Aug 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -974,6 +974,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 @@
|
||||
*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.
|
||||
|
||||
@@ -746,7 +746,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'*
|
||||
@@ -935,6 +934,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'*
|
||||
@@ -972,11 +972,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'*
|
||||
@@ -1167,6 +1171,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'*
|
||||
@@ -4537,6 +4542,7 @@ 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*
|
||||
@@ -6134,6 +6140,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*
|
||||
@@ -7377,6 +7384,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*
|
||||
@@ -7720,6 +7728,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*
|
||||
@@ -8537,12 +8546,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*
|
||||
@@ -8580,11 +8591,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*
|
||||
@@ -8827,6 +8842,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*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.0. Last change: 2017 Aug 12
|
||||
*terminal.txt* For Vim version 8.0. Last change: 2017 Aug 26
|
||||
|
||||
|
||||
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*
|
||||
@@ -95,6 +98,8 @@ Syntax ~
|
||||
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, prefixed with a "!". If a buffer
|
||||
@@ -102,10 +107,9 @@ Syntax ~
|
||||
parentheses. E.g. if "gdb" exists the second terminal
|
||||
buffer will use "!gdb (1)".
|
||||
|
||||
If [range] is given it is used for the terminal size.
|
||||
One number specifies the number of rows. Unless the
|
||||
"vertical" modifier is used, then it is the number of
|
||||
columns.
|
||||
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.
|
||||
|
||||
Two comma separated numbers are used as "rows,cols".
|
||||
E.g. `:24,80gdb` opens a terminal with 24 rows and 80
|
||||
@@ -125,6 +129,10 @@ Syntax ~
|
||||
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.
|
||||
|
||||
If you want to use more options use the |term_start()|
|
||||
function.
|
||||
@@ -204,6 +212,19 @@ the job ends while in Terminal-Normal mode this changes to
|
||||
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
|
||||
@@ -266,23 +287,31 @@ 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.
|
||||
|
||||
Load the plugin with this command: >
|
||||
packadd termdebug
|
||||
|
||||
To start debugging use `:TermDebug` folowed by the command name, for example: >
|
||||
:TermDebug vim
|
||||
|
||||
This opens three windows:
|
||||
This opens two 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.
|
||||
The current window is 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.
|
||||
|
||||
When the debugger ends the two opened windows are closed.
|
||||
|
||||
|
||||
Customizing ~
|
||||
|
||||
g:debugger The debugger command. Default "gdb".
|
||||
|
||||
This uses two terminal windows. To open the gdb window: >
|
||||
:term gdb [arguments]
|
||||
To open the terminal to run the tested program |term_start()| is used.
|
||||
|
||||
TODO
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Aug 11
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Aug 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -41,7 +41,6 @@ No maintainer for Simplified Chinese translations.
|
||||
|
||||
Terminal emulator window:
|
||||
- Lots of stuff to implement, see src/terminal.c
|
||||
- Add winpty.dll and winpty-agent.exe in the NSIS build.
|
||||
- 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.
|
||||
@@ -60,6 +59,8 @@ Terminal emulator window:
|
||||
- Try out background make plugin:
|
||||
https://github.com/AndrewVos/vim-make-background
|
||||
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
|
||||
- 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| ?
|
||||
@@ -74,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'".
|
||||
|
||||
@@ -122,6 +123,8 @@ Regexp problems:
|
||||
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
|
||||
(2017 May 15, #1252)
|
||||
|
||||
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
|
||||
@@ -130,27 +133,34 @@ Use names that indicate their appearnce (Christian Brabandt, 2017 Aug 3)
|
||||
- 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
|
||||
- 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)
|
||||
|
||||
test_gui fails with gnome2: cannot create .gnome2 dir
|
||||
use testdir/Xfakehome instead of does/not/exist?
|
||||
When starting with --clean packages under "start" are not loaded. Make this
|
||||
work: :packadd START {name} similar to :runtime START name
|
||||
|
||||
Patch for quickfix: parse lines for any quickfix list. (Yegappan Lakshmanan,
|
||||
2017 Jul 20)
|
||||
When using :packadd files under "later" are not used, which is inconsistent
|
||||
with packages under "start". (xtal8, #1994)
|
||||
|
||||
Patch for restoring wide characters in the console buffer.
|
||||
(Ken Takata, 2016 Jun 7)
|
||||
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 Couchbase syntax file. (Eugene Ciurana, 2017 Aug 8, #1951)
|
||||
Patch to add quickfix list identifier. (Yegappan, 2017 Aug 15)
|
||||
|
||||
Patch to fix font name problem with cp932. (Ken Takata, 2017 Aug 9)
|
||||
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)
|
||||
|
||||
@@ -158,14 +168,19 @@ ml_get errors with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Error in emsg with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Start a test directory under runtime, to test runtime file changes.
|
||||
Start with filetype detection. Only include in the source distribution.
|
||||
"make test" in src/ can be renamed to "make testsrc" and "make test" would do
|
||||
both "testsrc" and "testruntime" targets.
|
||||
Test runtime files.
|
||||
Start with filetype detection: testdir/test_filetype.vim
|
||||
|
||||
Patch for Murphi syntax. (Matthew Fernandez, 2017 Jul 24)
|
||||
Patch to support on-the-spot and over-the-spot input method. (Ken Takata, 2017
|
||||
Feb 14). Also see #1215.
|
||||
|
||||
Better detection of strace file. (Steven Fernandez, 2017 Jul 12, #1837)
|
||||
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)
|
||||
@@ -173,13 +188,25 @@ 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)
|
||||
@@ -382,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)
|
||||
@@ -624,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)
|
||||
|
||||
@@ -1396,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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ..]
|
||||
|
||||
@@ -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,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,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
|
||||
|
||||
|
||||
35
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
vendored
Normal file
35
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
" Debugger commands.
|
||||
"
|
||||
" WORK IN PROGRESS - much doesn't work yet
|
||||
"
|
||||
" Open two terminal windows:
|
||||
" 1. run a pty, as with ":term NONE"
|
||||
" 2. run gdb, passing the pty
|
||||
" The current window is used to edit source code and follows gdb.
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies
|
||||
|
||||
command -nargs=* -complete=file Termdebug call s:StartDebug(<q-args>)
|
||||
|
||||
if !exists('debugger')
|
||||
let debugger = 'gdb'
|
||||
endif
|
||||
|
||||
func s:StartDebug(cmd)
|
||||
" Open a terminal window without a job, to run the debugged program
|
||||
let s:ptybuf = term_start('NONE', {})
|
||||
let pty = job_info(term_getjob(s:ptybuf))['tty']
|
||||
|
||||
" Open a terminal window to run the debugger.
|
||||
let cmd = [g:debugger, '-tty', pty, a:cmd]
|
||||
echomsg 'executing "' . join(cmd) . '"'
|
||||
let gdbbuf = term_start(cmd, {
|
||||
\ 'exit_cb': function('s:EndDebug'),
|
||||
\ 'term_finish': 'close'
|
||||
\ })
|
||||
endfunc
|
||||
|
||||
func s:EndDebug(job, status)
|
||||
exe 'bwipe! ' . s:ptybuf
|
||||
endfunc
|
||||
@@ -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: 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"
|
||||
|
||||
434
runtime/syntax/n1ql.vim
Normal file
434
runtime/syntax/n1ql.vim
Normal file
@@ -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
|
||||
|
||||
@@ -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)模式。
|
||||
然後再次從鍵盤輸入您想要的命令。
|
||||
|
||||
@@ -340,6 +340,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 +351,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 +530,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
|
||||
|
||||
@@ -971,7 +975,11 @@ $(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
|
||||
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 $@
|
||||
|
||||
|
||||
@@ -84,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
|
||||
#
|
||||
@@ -832,7 +833,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
|
||||
@@ -1474,7 +1477,12 @@ $(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 -D_CRT_SECURE_NO_WARNINGS
|
||||
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
|
||||
|
||||
|
||||
@@ -3296,7 +3296,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) -Ilibvterm/include -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
|
||||
|
||||
|
||||
@@ -503,6 +503,10 @@ channel_gui_register_one(channel_T *channel, ch_part_T part)
|
||||
if (!CH_HAS_GUI)
|
||||
return;
|
||||
|
||||
/* gets stuck in handling events for a not connected channel */
|
||||
if (channel->ch_keep_open)
|
||||
return;
|
||||
|
||||
# ifdef FEAT_GUI_X11
|
||||
/* Tell notifier we are interested in being called
|
||||
* when there is input on the editor connection socket. */
|
||||
@@ -548,9 +552,12 @@ channel_gui_register(channel_T *channel)
|
||||
{
|
||||
if (channel->CH_SOCK_FD != INVALID_FD)
|
||||
channel_gui_register_one(channel, PART_SOCK);
|
||||
if (channel->CH_OUT_FD != INVALID_FD)
|
||||
if (channel->CH_OUT_FD != INVALID_FD
|
||||
&& channel->CH_OUT_FD != channel->CH_SOCK_FD)
|
||||
channel_gui_register_one(channel, PART_OUT);
|
||||
if (channel->CH_ERR_FD != INVALID_FD)
|
||||
if (channel->CH_ERR_FD != INVALID_FD
|
||||
&& channel->CH_ERR_FD != channel->CH_SOCK_FD
|
||||
&& channel->CH_ERR_FD != channel->CH_OUT_FD)
|
||||
channel_gui_register_one(channel, PART_ERR);
|
||||
}
|
||||
|
||||
@@ -2880,7 +2887,7 @@ channel_close(channel_T *channel, int invoke_close_cb)
|
||||
if (channel_need_redraw)
|
||||
{
|
||||
channel_need_redraw = FALSE;
|
||||
redraw_after_callback();
|
||||
redraw_after_callback(TRUE);
|
||||
}
|
||||
|
||||
if (!channel->ch_drop_never)
|
||||
@@ -3247,11 +3254,13 @@ channel_read(channel_T *channel, ch_part_T part, char *func)
|
||||
|
||||
/* Reading a disconnection (readlen == 0), or an error. */
|
||||
if (readlen <= 0)
|
||||
ch_close_part_on_error(channel, part, (len < 0), func);
|
||||
|
||||
{
|
||||
if (!channel->ch_keep_open)
|
||||
ch_close_part_on_error(channel, part, (len < 0), func);
|
||||
}
|
||||
#if defined(CH_HAS_GUI) && defined(FEAT_GUI_GTK)
|
||||
/* signal the main loop that there is something to read */
|
||||
if (CH_HAS_GUI && gtk_main_level() > 0)
|
||||
else if (CH_HAS_GUI && gtk_main_level() > 0)
|
||||
/* signal the main loop that there is something to read */
|
||||
gtk_main_quit();
|
||||
#endif
|
||||
}
|
||||
@@ -3509,13 +3518,14 @@ channel_fd2channel(sock_T fd, ch_part_T *partp)
|
||||
}
|
||||
# endif
|
||||
|
||||
# if defined(WIN32) || defined(PROTO)
|
||||
# if defined(WIN32) || defined(FEAT_GUI) || defined(PROTO)
|
||||
/*
|
||||
* Check the channels for anything that is ready to be read.
|
||||
* The data is put in the read queue.
|
||||
* if "only_keep_open" is TRUE only check channels where ch_keep_open is set.
|
||||
*/
|
||||
void
|
||||
channel_handle_events(void)
|
||||
channel_handle_events(int only_keep_open)
|
||||
{
|
||||
channel_T *channel;
|
||||
ch_part_T part;
|
||||
@@ -3523,6 +3533,9 @@ channel_handle_events(void)
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
{
|
||||
if (only_keep_open && !channel->ch_keep_open)
|
||||
continue;
|
||||
|
||||
/* check the socket and pipes */
|
||||
for (part = PART_SOCK; part < PART_IN; ++part)
|
||||
{
|
||||
@@ -3542,6 +3555,22 @@ channel_handle_events(void)
|
||||
}
|
||||
# endif
|
||||
|
||||
# if defined(FEAT_GUI) || defined(PROTO)
|
||||
/*
|
||||
* Return TRUE when there is any channel with a keep_open flag.
|
||||
*/
|
||||
int
|
||||
channel_any_keep_open()
|
||||
{
|
||||
channel_T *channel;
|
||||
|
||||
for (channel = first_channel; channel != NULL; channel = channel->ch_next)
|
||||
if (channel->ch_keep_open)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Set "channel"/"part" to non-blocking.
|
||||
* Only works for sockets and pipes.
|
||||
@@ -4117,7 +4146,7 @@ channel_parse_messages(void)
|
||||
if (channel_need_redraw)
|
||||
{
|
||||
channel_need_redraw = FALSE;
|
||||
redraw_after_callback();
|
||||
redraw_after_callback(TRUE);
|
||||
}
|
||||
|
||||
--safe_to_invoke_callback;
|
||||
@@ -4877,7 +4906,7 @@ win32_escape_arg(char_u *arg)
|
||||
int has_spaces = FALSE;
|
||||
|
||||
/* First count the number of extra bytes required. */
|
||||
slen = STRLEN(arg);
|
||||
slen = (int)STRLEN(arg);
|
||||
dlen = slen;
|
||||
for (s = arg; *s != NUL; MB_PTR_ADV(s))
|
||||
{
|
||||
@@ -5217,7 +5246,7 @@ job_check_ended(void)
|
||||
if (channel_need_redraw)
|
||||
{
|
||||
channel_need_redraw = FALSE;
|
||||
redraw_after_callback();
|
||||
redraw_after_callback(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4810,7 +4810,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
|
||||
{
|
||||
@@ -7250,10 +7250,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;
|
||||
@@ -7277,13 +7284,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,
|
||||
@@ -7298,7 +7305,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;
|
||||
@@ -7410,7 +7417,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;
|
||||
@@ -7427,7 +7434,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;
|
||||
|
||||
@@ -7447,7 +7454,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)
|
||||
@@ -7460,7 +7467,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
|
||||
@@ -7472,12 +7479,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;
|
||||
}
|
||||
@@ -7488,7 +7494,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);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7656,7 +7662,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);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7665,7 +7671,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);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7674,7 +7680,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);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7683,7 +7689,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);
|
||||
|
||||
@@ -1484,8 +1484,8 @@ EX(CMD_tearoff, "tearoff", ex_tearoff,
|
||||
NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_terminal, "terminal", ex_terminal,
|
||||
RANGE|NOTADR|BANG|FILES|TRLBAR|CMDWIN,
|
||||
ADDR_OTHER),
|
||||
RANGE|BANG|FILES|TRLBAR|CMDWIN,
|
||||
ADDR_LINES),
|
||||
EX(CMD_tfirst, "tfirst", ex_tag,
|
||||
RANGE|NOTADR|BANG|TRLBAR|ZEROR,
|
||||
ADDR_LINES),
|
||||
|
||||
@@ -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;
|
||||
@@ -1221,10 +1222,12 @@ check_due_timer(void)
|
||||
int did_emsg_save = did_emsg;
|
||||
int called_emsg_save = called_emsg;
|
||||
int did_throw_save = did_throw;
|
||||
int save_must_redraw = must_redraw;
|
||||
|
||||
timer_busy = timer_busy > 0 || vgetc_busy > 0;
|
||||
vgetc_busy = 0;
|
||||
called_emsg = FALSE;
|
||||
must_redraw = 0;
|
||||
timer->tr_firing = TRUE;
|
||||
timer_callback(timer);
|
||||
timer->tr_firing = FALSE;
|
||||
@@ -1240,6 +1243,10 @@ check_due_timer(void)
|
||||
}
|
||||
did_emsg = did_emsg_save;
|
||||
called_emsg = called_emsg_save;
|
||||
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 +1272,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;
|
||||
}
|
||||
@@ -1981,9 +1988,7 @@ dialog_changed(
|
||||
buf_T *buf2;
|
||||
exarg_T ea;
|
||||
|
||||
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
|
||||
|
||||
@@ -1269,8 +1269,10 @@
|
||||
|
||||
/*
|
||||
* +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)
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6584,11 +6554,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 +6565,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 +6594,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 +6663,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;
|
||||
|
||||
@@ -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,
|
||||
@@ -2698,12 +2708,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 +2775,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 +3111,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 +3132,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.
|
||||
*/
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
* Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
|
||||
*/
|
||||
|
||||
#if !defined(IS_COMBINING_FUNCTION) || !defined(WCWIDTH_FUNCTION)
|
||||
struct interval {
|
||||
int first;
|
||||
int last;
|
||||
@@ -126,7 +127,6 @@ static const struct interval combining[] = {
|
||||
{ 0xE0100, 0xE01EF }
|
||||
};
|
||||
|
||||
|
||||
/* auxiliary function for binary search in interval table */
|
||||
static int bisearch(uint32_t ucs, const struct interval *table, int max) {
|
||||
int min = 0;
|
||||
@@ -146,6 +146,7 @@ static int bisearch(uint32_t ucs, const struct interval *table, int max) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* The following two functions define the column width of an ISO 10646
|
||||
@@ -180,6 +181,11 @@ static int bisearch(uint32_t ucs, const struct interval *table, int max) {
|
||||
* in ISO 10646.
|
||||
*/
|
||||
|
||||
#ifdef WCWIDTH_FUNCTION
|
||||
/* use a provided wcwidth() function */
|
||||
int WCWIDTH_FUNCTION(uint32_t ucs);
|
||||
#else
|
||||
# define WCWIDTH_FUNCTION mk_wcwidth
|
||||
|
||||
static int mk_wcwidth(uint32_t ucs)
|
||||
{
|
||||
@@ -196,7 +202,7 @@ static int mk_wcwidth(uint32_t ucs)
|
||||
|
||||
/* if we arrive here, ucs is not a combining or C0/C1 control character */
|
||||
|
||||
return 1 +
|
||||
return 1 +
|
||||
(ucs >= 0x1100 &&
|
||||
(ucs <= 0x115f || /* Hangul Jamo init. consonants */
|
||||
ucs == 0x2329 || ucs == 0x232a ||
|
||||
@@ -211,6 +217,7 @@ static int mk_wcwidth(uint32_t ucs)
|
||||
(ucs >= 0x20000 && ucs <= 0x2fffd) ||
|
||||
(ucs >= 0x30000 && ucs <= 0x3fffd)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0 /* unused */
|
||||
static int mk_wcswidth(const uint32_t *pwcs, size_t n)
|
||||
@@ -317,15 +324,28 @@ static int mk_wcswidth_cjk(const uint32_t *pwcs, size_t n)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef IS_COMBINING_FUNCTION
|
||||
/* Use a provided is_combining() function. */
|
||||
int IS_COMBINING_FUNCTION(uint32_t codepoint);
|
||||
#else
|
||||
# define IS_COMBINING_FUNCTION vterm_is_combining
|
||||
static int
|
||||
vterm_is_combining(uint32_t codepoint)
|
||||
{
|
||||
return bisearch(codepoint, combining, sizeof(combining) / sizeof(struct interval) - 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* ################################
|
||||
* ### The rest added by Paul Evans */
|
||||
|
||||
INTERNAL int vterm_unicode_width(uint32_t codepoint)
|
||||
{
|
||||
return mk_wcwidth(codepoint);
|
||||
return WCWIDTH_FUNCTION(codepoint);
|
||||
}
|
||||
|
||||
INTERNAL int vterm_unicode_is_combining(uint32_t codepoint)
|
||||
{
|
||||
return bisearch(codepoint, combining, sizeof(combining) / sizeof(struct interval) - 1);
|
||||
return IS_COMBINING_FUNCTION(codepoint);
|
||||
}
|
||||
|
||||
22
src/mbyte.c
22
src/mbyte.c
@@ -1395,6 +1395,17 @@ static struct interval ambiguous[] =
|
||||
{0x100000, 0x10fffd}
|
||||
};
|
||||
|
||||
#if defined(FEAT_TERMINAL) || defined(PROTO)
|
||||
/*
|
||||
* utf_char2cells() with different argument type for libvterm.
|
||||
*/
|
||||
int
|
||||
utf_uint2cells(uint32_t c)
|
||||
{
|
||||
return utf_char2cells((int)c);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For UTF-8 character "c" return 2 for a double-width character, 1 for others.
|
||||
* Returns 4 or 6 for an unprintable character.
|
||||
@@ -2296,6 +2307,17 @@ utf_char2bytes(int c, char_u *buf)
|
||||
return 6;
|
||||
}
|
||||
|
||||
#if defined(FEAT_TERMINAL) || defined(PROTO)
|
||||
/*
|
||||
* utf_iscomposing() with different argument type for libvterm.
|
||||
*/
|
||||
int
|
||||
utf_iscomposing_uint(uint32_t c)
|
||||
{
|
||||
return utf_iscomposing((int)c);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return TRUE if "c" is a composing UTF-8 character. This means it will be
|
||||
* drawn on top of the preceding character.
|
||||
|
||||
29
src/misc1.c
29
src/misc1.c
@@ -5221,7 +5221,7 @@ FullName_save(
|
||||
|
||||
static char_u *skip_string(char_u *p);
|
||||
static pos_T *ind_find_start_comment(void);
|
||||
static pos_T *ind_find_start_CORS(void);
|
||||
static pos_T *ind_find_start_CORS(linenr_T *is_raw);
|
||||
static pos_T *find_start_rawstring(int ind_maxcomment);
|
||||
|
||||
/*
|
||||
@@ -5272,11 +5272,12 @@ find_start_comment(int ind_maxcomment) /* XXX */
|
||||
* Find the start of a comment or raw string, not knowing if we are in a
|
||||
* comment or raw string right now.
|
||||
* Search starts at w_cursor.lnum and goes backwards.
|
||||
* If is_raw is given and returns start of raw_string, sets it to true.
|
||||
* Return NULL when not inside a comment or raw string.
|
||||
* "CORS" -> Comment Or Raw String
|
||||
*/
|
||||
static pos_T *
|
||||
ind_find_start_CORS(void) /* XXX */
|
||||
ind_find_start_CORS(linenr_T *is_raw) /* XXX */
|
||||
{
|
||||
static pos_T comment_pos_copy;
|
||||
pos_T *comment_pos;
|
||||
@@ -5296,7 +5297,11 @@ ind_find_start_CORS(void) /* XXX */
|
||||
* If rs_pos is before comment_pos the comment is inside the raw string. */
|
||||
if (comment_pos == NULL || (rs_pos != NULL
|
||||
&& LT_POS(*rs_pos, *comment_pos)))
|
||||
{
|
||||
if (is_raw != NULL && rs_pos != NULL)
|
||||
*is_raw = rs_pos->lnum;
|
||||
return rs_pos;
|
||||
}
|
||||
return comment_pos;
|
||||
}
|
||||
|
||||
@@ -5641,7 +5646,7 @@ cin_islabel(void) /* XXX */
|
||||
* it.
|
||||
*/
|
||||
curwin->w_cursor.col = 0;
|
||||
if ((trypos = ind_find_start_CORS()) != NULL) /* XXX */
|
||||
if ((trypos = ind_find_start_CORS(NULL)) != NULL) /* XXX */
|
||||
curwin->w_cursor = *trypos;
|
||||
|
||||
line = ml_get_curline();
|
||||
@@ -6768,7 +6773,7 @@ find_start_brace(void) /* XXX */
|
||||
pos = NULL;
|
||||
/* ignore the { if it's in a // or / * * / comment */
|
||||
if ((colnr_T)cin_skip2pos(trypos) == trypos->col
|
||||
&& (pos = ind_find_start_CORS()) == NULL) /* XXX */
|
||||
&& (pos = ind_find_start_CORS(NULL)) == NULL) /* XXX */
|
||||
break;
|
||||
if (pos != NULL)
|
||||
curwin->w_cursor.lnum = pos->lnum;
|
||||
@@ -6819,7 +6824,7 @@ retry:
|
||||
pos_copy = *trypos; /* copy trypos, findmatch will change it */
|
||||
trypos = &pos_copy;
|
||||
curwin->w_cursor = *trypos;
|
||||
if ((trypos_wk = ind_find_start_CORS()) != NULL) /* XXX */
|
||||
if ((trypos_wk = ind_find_start_CORS(NULL)) != NULL) /* XXX */
|
||||
{
|
||||
ind_maxp_wk = ind_maxparen - (int)(cursor_save.lnum
|
||||
- trypos_wk->lnum);
|
||||
@@ -7189,6 +7194,7 @@ get_c_indent(void)
|
||||
int original_line_islabel;
|
||||
int added_to_amount = 0;
|
||||
int js_cur_has_key = 0;
|
||||
linenr_T raw_string_start = 0;
|
||||
cpp_baseclass_cache_T cache_cpp_baseclass = { FALSE, { MAXLNUM, 0 } };
|
||||
|
||||
/* make a copy, value is changed below */
|
||||
@@ -7491,7 +7497,7 @@ get_c_indent(void)
|
||||
curwin->w_cursor.lnum = lnum;
|
||||
|
||||
/* Skip a comment or raw string. XXX */
|
||||
if ((trypos = ind_find_start_CORS()) != NULL)
|
||||
if ((trypos = ind_find_start_CORS(NULL)) != NULL)
|
||||
{
|
||||
lnum = trypos->lnum + 1;
|
||||
continue;
|
||||
@@ -7932,7 +7938,7 @@ get_c_indent(void)
|
||||
* If we're in a comment or raw string now, skip to
|
||||
* the start of it.
|
||||
*/
|
||||
trypos = ind_find_start_CORS();
|
||||
trypos = ind_find_start_CORS(NULL);
|
||||
if (trypos != NULL)
|
||||
{
|
||||
curwin->w_cursor.lnum = trypos->lnum + 1;
|
||||
@@ -8052,7 +8058,7 @@ get_c_indent(void)
|
||||
|
||||
/* If we're in a comment or raw string now, skip
|
||||
* to the start of it. */
|
||||
trypos = ind_find_start_CORS();
|
||||
trypos = ind_find_start_CORS(NULL);
|
||||
if (trypos != NULL)
|
||||
{
|
||||
curwin->w_cursor.lnum = trypos->lnum + 1;
|
||||
@@ -8090,7 +8096,7 @@ get_c_indent(void)
|
||||
* If we're in a comment or raw string now, skip to the start
|
||||
* of it.
|
||||
*/ /* XXX */
|
||||
if ((trypos = ind_find_start_CORS()) != NULL)
|
||||
if ((trypos = ind_find_start_CORS(&raw_string_start)) != NULL)
|
||||
{
|
||||
curwin->w_cursor.lnum = trypos->lnum + 1;
|
||||
curwin->w_cursor.col = 0;
|
||||
@@ -8657,7 +8663,8 @@ get_c_indent(void)
|
||||
curwin->w_cursor.lnum);
|
||||
if (lookfor != LOOKFOR_TERM
|
||||
&& lookfor != LOOKFOR_JS_KEY
|
||||
&& lookfor != LOOKFOR_COMMA)
|
||||
&& lookfor != LOOKFOR_COMMA
|
||||
&& raw_string_start != curwin->w_cursor.lnum)
|
||||
lookfor = LOOKFOR_UNTERM;
|
||||
}
|
||||
}
|
||||
@@ -8938,7 +8945,7 @@ term_again:
|
||||
* If we're in a comment or raw string now, skip to the start
|
||||
* of it.
|
||||
*/ /* XXX */
|
||||
if ((trypos = ind_find_start_CORS()) != NULL)
|
||||
if ((trypos = ind_find_start_CORS(NULL)) != NULL)
|
||||
{
|
||||
curwin->w_cursor.lnum = trypos->lnum + 1;
|
||||
curwin->w_cursor.col = 0;
|
||||
|
||||
@@ -6321,7 +6321,7 @@ parse_queued_messages(void)
|
||||
{
|
||||
/* For Win32 mch_breakcheck() does not check for input, do it here. */
|
||||
# if defined(WIN32) && defined(FEAT_JOB_CHANNEL)
|
||||
channel_handle_events();
|
||||
channel_handle_events(FALSE);
|
||||
# endif
|
||||
|
||||
# ifdef FEAT_NETBEANS_INTG
|
||||
|
||||
@@ -5648,6 +5648,11 @@ nv_ident(cmdarg_T *cap)
|
||||
kp = (*curbuf->b_p_kp == NUL ? p_kp : curbuf->b_p_kp);
|
||||
kp_help = (*kp == NUL || STRCMP(kp, ":he") == 0
|
||||
|| STRCMP(kp, ":help") == 0);
|
||||
if (kp_help && *skipwhite(ptr) == NUL)
|
||||
{
|
||||
EMSG(_(e_noident)); /* found white space only */
|
||||
return;
|
||||
}
|
||||
kp_ex = (*kp == ':');
|
||||
buflen = (unsigned)(n * 2 + 30 + STRLEN(kp));
|
||||
buf = alloc(buflen);
|
||||
|
||||
@@ -2196,7 +2196,9 @@ static struct vimoption options[] =
|
||||
{"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT,
|
||||
#ifdef FEAT_PRINTER
|
||||
(char_u *)&p_header, PV_NONE,
|
||||
{(char_u *)N_("%<%f%h%m%=Page %N"), (char_u *)0L}
|
||||
/* untranslated to avoid problems when 'encoding'
|
||||
* is changed */
|
||||
{(char_u *)"%<%f%h%m%=Page %N", (char_u *)0L}
|
||||
#else
|
||||
(char_u *)NULL, PV_NONE,
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
@@ -3192,6 +3194,7 @@ static struct vimoption options[] =
|
||||
p_term("t_nd", T_ND)
|
||||
p_term("t_op", T_OP)
|
||||
p_term("t_RB", T_RBG)
|
||||
p_term("t_RC", T_CRC)
|
||||
p_term("t_RI", T_CRI)
|
||||
p_term("t_RS", T_CRS)
|
||||
p_term("t_RV", T_CRV)
|
||||
|
||||
@@ -4340,6 +4340,7 @@ mch_call_shell(
|
||||
|
||||
# define EXEC_FAILED 122 /* Exit code when shell didn't execute. Don't use
|
||||
127, some shells use that already */
|
||||
# define OPEN_NULL_FAILED 123 /* Exit code if /dev/null can't be opened */
|
||||
|
||||
char_u *newcmd;
|
||||
pid_t pid;
|
||||
@@ -5238,6 +5239,7 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options)
|
||||
int use_file_for_in = options->jo_io[PART_IN] == JIO_FILE;
|
||||
int use_file_for_out = options->jo_io[PART_OUT] == JIO_FILE;
|
||||
int use_file_for_err = options->jo_io[PART_ERR] == JIO_FILE;
|
||||
int use_buffer_for_in = options->jo_io[PART_IN] == JIO_BUFFER;
|
||||
int use_out_for_err = options->jo_io[PART_ERR] == JIO_OUT;
|
||||
SIGSET_DECL(curset)
|
||||
|
||||
@@ -5247,7 +5249,10 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options)
|
||||
/* default is to fail */
|
||||
job->jv_status = JOB_FAILED;
|
||||
|
||||
if (options->jo_pty)
|
||||
if (options->jo_pty
|
||||
&& (!(use_file_for_in || use_null_for_in)
|
||||
|| !(use_file_for_in || use_null_for_out)
|
||||
|| !(use_out_for_err || use_file_for_err || use_null_for_err)))
|
||||
open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_name);
|
||||
|
||||
/* TODO: without the channel feature connect the child to /dev/null? */
|
||||
@@ -5263,8 +5268,12 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options)
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
else if (!use_null_for_in && pty_master_fd < 0 && pipe(fd_in) < 0)
|
||||
goto failed;
|
||||
else
|
||||
/* When writing buffer lines to the input don't use the pty, so that
|
||||
* the pipe can be closed when all lines were written. */
|
||||
if (!use_null_for_in && (pty_master_fd < 0 || use_buffer_for_in)
|
||||
&& pipe(fd_in) < 0)
|
||||
goto failed;
|
||||
|
||||
if (use_file_for_out)
|
||||
{
|
||||
@@ -5361,7 +5370,14 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options)
|
||||
}
|
||||
|
||||
if (use_null_for_in || use_null_for_out || use_null_for_err)
|
||||
{
|
||||
null_fd = open("/dev/null", O_RDWR | O_EXTRA, 0);
|
||||
if (null_fd < 0)
|
||||
{
|
||||
perror("opening /dev/null failed");
|
||||
_exit(OPEN_NULL_FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
if (pty_slave_fd >= 0)
|
||||
{
|
||||
@@ -5450,7 +5466,7 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options)
|
||||
job->jv_channel = channel; /* ch_refcount was set above */
|
||||
|
||||
if (pty_master_fd >= 0)
|
||||
close(pty_slave_fd); /* duped above */
|
||||
close(pty_slave_fd); /* not used in the parent */
|
||||
/* close child stdin, stdout and stderr */
|
||||
if (!use_file_for_in && fd_in[0] >= 0)
|
||||
close(fd_in[0]);
|
||||
@@ -5653,6 +5669,29 @@ mch_clear_job(job_T *job)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_TERMINAL) || defined(PROTO)
|
||||
int
|
||||
mch_create_pty_channel(job_T *job, jobopt_T *options)
|
||||
{
|
||||
int pty_master_fd = -1;
|
||||
int pty_slave_fd = -1;
|
||||
channel_T *channel;
|
||||
|
||||
open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_name);
|
||||
close(pty_slave_fd);
|
||||
|
||||
channel = add_channel();
|
||||
if (channel == NULL)
|
||||
return FAIL;
|
||||
job->jv_channel = channel; /* ch_refcount was set by add_channel() */
|
||||
channel->ch_keep_open = TRUE;
|
||||
|
||||
channel_set_pipes(channel, pty_master_fd, pty_master_fd, pty_master_fd);
|
||||
channel_set_job(channel, job, options);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check for CTRL-C typed by reading all available characters.
|
||||
* In cooked mode we should get SIGINT, no need to check.
|
||||
|
||||
@@ -34,9 +34,10 @@ void channel_free_all(void);
|
||||
char_u *channel_read_block(channel_T *channel, ch_part_T part, int timeout);
|
||||
void common_channel_read(typval_T *argvars, typval_T *rettv, int raw);
|
||||
channel_T *channel_fd2channel(sock_T fd, ch_part_T *partp);
|
||||
void channel_handle_events(void);
|
||||
void channel_handle_events(int only_keep_open);
|
||||
int channel_any_keep_open(void);
|
||||
void channel_set_nonblock(channel_T *channel, ch_part_T part);
|
||||
int channel_send(channel_T *channel, ch_part_T part, char_u *buf, int len, char *fun);
|
||||
int channel_send(channel_T *channel, ch_part_T part, char_u *buf_arg, int len_arg, char *fun);
|
||||
void ch_expr_common(typval_T *argvars, typval_T *rettv, int eval);
|
||||
void ch_raw_common(typval_T *argvars, typval_T *rettv, int eval);
|
||||
int channel_poll_setup(int nfd_in, void *fds_in);
|
||||
|
||||
@@ -10,6 +10,7 @@ int latin_char2len(int c);
|
||||
int latin_char2bytes(int c, char_u *buf);
|
||||
int latin_ptr2len(char_u *p);
|
||||
int latin_ptr2len_len(char_u *p, int size);
|
||||
int utf_uint2cells(uint32_t c);
|
||||
int utf_char2cells(int c);
|
||||
int latin_ptr2cells(char_u *p);
|
||||
int utf_ptr2cells(char_u *p);
|
||||
@@ -37,6 +38,7 @@ int utfc_ptr2len(char_u *p);
|
||||
int utfc_ptr2len_len(char_u *p, int size);
|
||||
int utf_char2len(int c);
|
||||
int utf_char2bytes(int c, char_u *buf);
|
||||
int utf_iscomposing_uint(uint32_t c);
|
||||
int utf_iscomposing(int c);
|
||||
int utf_printable(int c);
|
||||
int utf_class(int c);
|
||||
|
||||
@@ -66,6 +66,7 @@ char *mch_job_status(job_T *job);
|
||||
job_T *mch_detect_ended_job(job_T *job_list);
|
||||
int mch_signal_job(job_T *job, char_u *how);
|
||||
void mch_clear_job(job_T *job);
|
||||
int mch_create_pty_channel(job_T *job, jobopt_T *options);
|
||||
void mch_breakcheck(int force);
|
||||
int mch_expandpath(garray_T *gap, char_u *path, int flags);
|
||||
int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, int flags);
|
||||
|
||||
@@ -21,7 +21,7 @@ void ex_cc(exarg_T *eap);
|
||||
void ex_cnext(exarg_T *eap);
|
||||
void ex_cfile(exarg_T *eap);
|
||||
void ex_vimgrep(exarg_T *eap);
|
||||
int get_errorlist(win_T *wp, int qf_idx, list_T *list);
|
||||
int get_errorlist(qf_info_T *qi, win_T *wp, int qf_idx, list_T *list);
|
||||
int get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict);
|
||||
int set_errorlist(win_T *wp, list_T *list, int action, char_u *title, dict_T *what);
|
||||
int set_ref_in_quickfix(int copyID);
|
||||
|
||||
@@ -7,7 +7,7 @@ void redraw_curbuf_later(int type);
|
||||
void redraw_buf_later(buf_T *buf, int type);
|
||||
void redraw_buf_and_status_later(buf_T *buf, int type);
|
||||
int redraw_asap(int type);
|
||||
void redraw_after_callback(void);
|
||||
void redraw_after_callback(int call_update_screen);
|
||||
void redrawWinline(linenr_T lnum, int invalid);
|
||||
void update_curbuf(int type);
|
||||
void update_screen(int type_arg);
|
||||
@@ -47,7 +47,7 @@ void setcursor(void);
|
||||
int win_ins_lines(win_T *wp, int row, int line_count, int invalid, int mayclear);
|
||||
int win_del_lines(win_T *wp, int row, int line_count, int invalid, int mayclear, int clear_attr);
|
||||
int screen_ins_lines(int off, int row, int line_count, int end, int clear_attr, win_T *wp);
|
||||
int screen_del_lines(int off, int row, int line_count, int end, int force, int attr, win_T *wp);
|
||||
int screen_del_lines(int off, int row, int line_count, int end, int force, int clear_attr, win_T *wp);
|
||||
int showmode(void);
|
||||
void unshowmode(int force);
|
||||
void clearmode(void);
|
||||
|
||||
@@ -53,6 +53,7 @@ void cursor_on(void);
|
||||
void cursor_off(void);
|
||||
void term_cursor_mode(int forced);
|
||||
void term_cursor_color(char_u *color);
|
||||
int blink_state_is_inverted(void);
|
||||
void term_cursor_shape(int shape, int blink);
|
||||
void scroll_region_set(win_T *wp, int off);
|
||||
void scroll_region_reset(void);
|
||||
|
||||
@@ -2762,7 +2762,7 @@ qf_free_items(qf_info_T *qi, int idx)
|
||||
{
|
||||
qfp = qfl->qf_start;
|
||||
qfpnext = qfp->qf_next;
|
||||
if (qfl->qf_title != NULL && !stop)
|
||||
if (!stop)
|
||||
{
|
||||
vim_free(qfp->qf_text);
|
||||
stop = (qfp == qfpnext);
|
||||
@@ -4556,20 +4556,24 @@ unload_dummy_buffer(buf_T *buf, char_u *dirname_start)
|
||||
* If qf_idx is -1, use the current list. Otherwise, use the specified list.
|
||||
*/
|
||||
int
|
||||
get_errorlist(win_T *wp, int qf_idx, list_T *list)
|
||||
get_errorlist(qf_info_T *qi_arg, win_T *wp, int qf_idx, list_T *list)
|
||||
{
|
||||
qf_info_T *qi = &ql_info;
|
||||
qf_info_T *qi = qi_arg;
|
||||
dict_T *dict;
|
||||
char_u buf[2];
|
||||
qfline_T *qfp;
|
||||
int i;
|
||||
int bufnum;
|
||||
|
||||
if (wp != NULL)
|
||||
if (qi == NULL)
|
||||
{
|
||||
qi = GET_LOC_LIST(wp);
|
||||
if (qi == NULL)
|
||||
return FAIL;
|
||||
qi = &ql_info;
|
||||
if (wp != NULL)
|
||||
{
|
||||
qi = GET_LOC_LIST(wp);
|
||||
if (qi == NULL)
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (qf_idx == -1)
|
||||
@@ -4627,6 +4631,45 @@ enum {
|
||||
QF_GETLIST_ALL = 0xFF
|
||||
};
|
||||
|
||||
/*
|
||||
* Parse text from 'di' and return the quickfix list items
|
||||
*/
|
||||
static int
|
||||
qf_get_list_from_text(dictitem_T *di, dict_T *retdict)
|
||||
{
|
||||
int status = FAIL;
|
||||
qf_info_T *qi;
|
||||
|
||||
/* Only string and list values are supported */
|
||||
if ((di->di_tv.v_type == VAR_STRING && di->di_tv.vval.v_string != NULL)
|
||||
|| (di->di_tv.v_type == VAR_LIST
|
||||
&& di->di_tv.vval.v_list != NULL))
|
||||
{
|
||||
qi = (qf_info_T *)alloc((unsigned)sizeof(qf_info_T));
|
||||
if (qi != NULL)
|
||||
{
|
||||
vim_memset(qi, 0, (size_t)(sizeof(qf_info_T)));
|
||||
qi->qf_refcount++;
|
||||
|
||||
if (qf_init_ext(qi, 0, NULL, NULL, &di->di_tv, p_efm,
|
||||
TRUE, (linenr_T)0, (linenr_T)0, NULL, NULL) > 0)
|
||||
{
|
||||
list_T *l = list_alloc();
|
||||
if (l != NULL)
|
||||
{
|
||||
(void)get_errorlist(qi, NULL, 0, l);
|
||||
dict_add_list(retdict, "items", l);
|
||||
status = OK;
|
||||
}
|
||||
qf_free(qi, 0);
|
||||
}
|
||||
free(qi);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return quickfix/location list details (title) as a
|
||||
* dictionary. 'what' contains the details to return. If 'list_idx' is -1,
|
||||
@@ -4641,6 +4684,9 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
|
||||
dictitem_T *di;
|
||||
int flags = QF_GETLIST_NONE;
|
||||
|
||||
if ((di = dict_find(what, (char_u *)"text", -1)) != NULL)
|
||||
return qf_get_list_from_text(di, retdict);
|
||||
|
||||
if (wp != NULL)
|
||||
{
|
||||
qi = GET_LOC_LIST(wp);
|
||||
@@ -4726,7 +4772,7 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
|
||||
list_T *l = list_alloc();
|
||||
if (l != NULL)
|
||||
{
|
||||
(void)get_errorlist(wp, qf_idx, l);
|
||||
(void)get_errorlist(qi, NULL, qf_idx, l);
|
||||
dict_add_list(retdict, "items", l);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -445,9 +445,11 @@ redraw_asap(int type)
|
||||
* Invoked after an asynchronous callback is called.
|
||||
* If an echo command was used the cursor needs to be put back where
|
||||
* it belongs. If highlighting was changed a redraw is needed.
|
||||
* If "call_update_screen" is FALSE don't call update_screen() when at the
|
||||
* command line.
|
||||
*/
|
||||
void
|
||||
redraw_after_callback(void)
|
||||
redraw_after_callback(int call_update_screen)
|
||||
{
|
||||
++redrawing_for_callback;
|
||||
|
||||
@@ -461,7 +463,7 @@ redraw_after_callback(void)
|
||||
#ifdef FEAT_WILDMENU
|
||||
&& wild_menu_showing == 0
|
||||
#endif
|
||||
)
|
||||
&& call_update_screen)
|
||||
update_screen(0);
|
||||
/* Redraw in the same position, so that the user can continue
|
||||
* editing the command. */
|
||||
@@ -3013,7 +3015,7 @@ win_line(
|
||||
int startrow,
|
||||
int endrow,
|
||||
int nochange UNUSED, /* not updating for changed text */
|
||||
proftime_T *syntax_tm)
|
||||
proftime_T *syntax_tm UNUSED)
|
||||
{
|
||||
int col = 0; /* visual column on screen */
|
||||
unsigned off; /* offset in ScreenLines/ScreenAttrs */
|
||||
|
||||
@@ -1656,6 +1656,7 @@ struct channel_S {
|
||||
char_u *ch_close_cb; /* call when channel is closed */
|
||||
partial_T *ch_close_partial;
|
||||
int ch_drop_never;
|
||||
int ch_keep_open; /* do not close on read error */
|
||||
|
||||
job_T *ch_job; /* Job that uses this channel; this does not
|
||||
* count as a reference to avoid a circular
|
||||
|
||||
161
src/term.c
161
src/term.c
@@ -128,8 +128,11 @@ static int u7_status = STATUS_GET;
|
||||
/* Request background color report: */
|
||||
static int rbg_status = STATUS_GET;
|
||||
|
||||
/* Request cursor mode report: */
|
||||
static int rcm_status = STATUS_GET;
|
||||
/* Request cursor blinking mode report: */
|
||||
static int rbm_status = STATUS_GET;
|
||||
|
||||
/* Request cursor style report: */
|
||||
static int rcs_status = STATUS_GET;
|
||||
# endif
|
||||
|
||||
/*
|
||||
@@ -163,9 +166,14 @@ static int detected_8bit = FALSE; /* detected 8-bit terminal */
|
||||
|
||||
#ifdef FEAT_TERMRESPONSE
|
||||
/* When the cursor shape was detected these values are used:
|
||||
* 1: block, 2: underline, 3: vertical bar
|
||||
* initial_cursor_blink is only valid when initial_cursor_shape is not zero. */
|
||||
* 1: block, 2: underline, 3: vertical bar */
|
||||
static int initial_cursor_shape = 0;
|
||||
|
||||
/* The blink flag from the style response may be inverted from the actual
|
||||
* blinking state, xterm XORs the flags. */
|
||||
static int initial_cursor_shape_blink = FALSE;
|
||||
|
||||
/* The blink flag from the blinking-cursor mode response */
|
||||
static int initial_cursor_blink = FALSE;
|
||||
#endif
|
||||
|
||||
@@ -835,6 +843,7 @@ static struct builtin_term builtin_termcaps[] =
|
||||
# else
|
||||
{(int)KS_CSH, IF_EB("\033[%d q", ESC_STR "[%d q")},
|
||||
# endif
|
||||
{(int)KS_CRC, IF_EB("\033[?12$p", ESC_STR "[?12$p")},
|
||||
{(int)KS_CRS, IF_EB("\033P$q q\033\\", ESC_STR "P$q q" ESC_STR "\\")},
|
||||
# ifdef TERMINFO
|
||||
{(int)KS_CM, IF_EB("\033[%i%p1%d;%p2%dH",
|
||||
@@ -1360,6 +1369,9 @@ static int need_gather = FALSE; /* need to fill termleader[] */
|
||||
static char_u termleader[256 + 1]; /* for check_termcode() */
|
||||
#ifdef FEAT_TERMRESPONSE
|
||||
static int check_for_codes = FALSE; /* check for key code response */
|
||||
# ifdef MACOS
|
||||
static int is_terminal_app = FALSE; /* recognized Terminal.app */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static struct builtin_term *
|
||||
@@ -3313,7 +3325,8 @@ settmode(int tmode)
|
||||
if (tmode != TMODE_RAW && (crv_status == STATUS_SENT
|
||||
|| u7_status == STATUS_SENT
|
||||
|| rbg_status == STATUS_SENT
|
||||
|| rcm_status == STATUS_SENT))
|
||||
|| rbm_status == STATUS_SENT
|
||||
|| rcs_status == STATUS_SENT))
|
||||
(void)vpeekc_nomap();
|
||||
check_for_codes_from_term();
|
||||
}
|
||||
@@ -3383,7 +3396,8 @@ stoptermcap(void)
|
||||
if (crv_status == STATUS_SENT
|
||||
|| u7_status == STATUS_SENT
|
||||
|| rbg_status == STATUS_SENT
|
||||
|| rcm_status == STATUS_SENT)
|
||||
|| rbm_status == STATUS_SENT
|
||||
|| rcs_status == STATUS_SENT)
|
||||
{
|
||||
# ifdef UNIX
|
||||
/* Give the terminal a chance to respond. */
|
||||
@@ -3497,7 +3511,7 @@ may_req_ambiguous_char_width(void)
|
||||
void
|
||||
may_req_bg_color(void)
|
||||
{
|
||||
int done = FALSE;
|
||||
int did_one = FALSE;
|
||||
|
||||
if (can_get_termresponse() && starting == 0)
|
||||
{
|
||||
@@ -3510,26 +3524,25 @@ may_req_bg_color(void)
|
||||
LOG_TR("Sending BG request");
|
||||
out_str(T_RBG);
|
||||
rbg_status = STATUS_SENT;
|
||||
done = TRUE;
|
||||
did_one = TRUE;
|
||||
}
|
||||
|
||||
/* Only request the cursor shape if t_SH and t_RS are set. */
|
||||
if (rcm_status == STATUS_GET
|
||||
&& *T_CSH != NUL
|
||||
&& *T_CRS != NUL)
|
||||
/* Only request cursor blinking mode if t_RC is set. */
|
||||
if (rbm_status == STATUS_GET && *T_CRC != NUL)
|
||||
{
|
||||
LOG_TR("Sending cursor shape request");
|
||||
out_str(T_CRS);
|
||||
rcm_status = STATUS_SENT;
|
||||
done = TRUE;
|
||||
LOG_TR("Sending BC request");
|
||||
out_str(T_CRC);
|
||||
rbm_status = STATUS_SENT;
|
||||
did_one = TRUE;
|
||||
}
|
||||
|
||||
if (did_one)
|
||||
{
|
||||
/* check for the characters now, otherwise they might be eaten by
|
||||
* get_keystroke() */
|
||||
out_flush();
|
||||
(void)vpeekc_nomap();
|
||||
}
|
||||
}
|
||||
if (done)
|
||||
{
|
||||
/* check for the characters now, otherwise they might be eaten by
|
||||
* get_keystroke() */
|
||||
out_flush();
|
||||
(void)vpeekc_nomap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3764,6 +3777,17 @@ term_cursor_color(char_u *color)
|
||||
}
|
||||
# endif
|
||||
|
||||
int
|
||||
blink_state_is_inverted()
|
||||
{
|
||||
#ifdef FEAT_TERMRESPONSE
|
||||
return rbm_status == STATUS_GOT && rcs_status == STATUS_GOT
|
||||
&& initial_cursor_blink != initial_cursor_shape_blink;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "shape": 1 = block, 2 = underline, 3 = vertical bar
|
||||
*/
|
||||
@@ -3775,16 +3799,26 @@ term_cursor_shape(int shape, int blink)
|
||||
OUT_STR(tgoto((char *)T_CSH, 0, shape * 2 - blink));
|
||||
out_flush();
|
||||
}
|
||||
/* When t_SH is not set try setting just the blink state. */
|
||||
else if (blink && *T_VS != NUL)
|
||||
else
|
||||
{
|
||||
out_str(T_VS);
|
||||
out_flush();
|
||||
}
|
||||
else if (!blink && *T_CVS != NUL)
|
||||
{
|
||||
out_str(T_CVS);
|
||||
out_flush();
|
||||
int do_blink = blink;
|
||||
|
||||
/* t_SH is empty: try setting just the blink state.
|
||||
* The blink flags are XORed together, if the initial blinking from
|
||||
* style and shape differs, we need to invert the flag here. */
|
||||
if (blink_state_is_inverted())
|
||||
do_blink = !blink;
|
||||
|
||||
if (do_blink && *T_VS != NUL)
|
||||
{
|
||||
out_str(T_VS);
|
||||
out_flush();
|
||||
}
|
||||
else if (!do_blink && *T_CVS != NUL)
|
||||
{
|
||||
out_str(T_CVS);
|
||||
out_flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -4523,7 +4557,7 @@ check_termcode(
|
||||
|
||||
/* libvterm sends 0;100;0 */
|
||||
if (col == 100
|
||||
&& STRNCMP(tp + extra - 2, ">0;100;0c", 9) == 0)
|
||||
&& STRNCMP(tp + extra - 2, "0;100;0c", 8) == 0)
|
||||
{
|
||||
/* If run from Vim $COLORS is set to the number of
|
||||
* colors the terminal supports. Otherwise assume
|
||||
@@ -4531,6 +4565,33 @@ check_termcode(
|
||||
if (mch_getenv((char_u *)"COLORS") == NULL)
|
||||
may_adjust_color_count(256);
|
||||
}
|
||||
|
||||
# ifdef MACOS
|
||||
/* Mac Terminal.app sends 1;95;0 */
|
||||
if (col == 95
|
||||
&& STRNCMP(tp + extra - 2, "1;95;0c", 7) == 0)
|
||||
{
|
||||
/* Terminal.app sets $TERM to "xterm-256colors",
|
||||
* but it's not fully xterm compatible. */
|
||||
is_terminal_app = TRUE;
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Only request the cursor style if t_SH and t_RS are
|
||||
* set. Not for Terminal.app, it can't handle t_RS, it
|
||||
* echoes the characters to the screen. */
|
||||
if (rcs_status == STATUS_GET
|
||||
# ifdef MACOS
|
||||
&& !is_terminal_app
|
||||
# endif
|
||||
&& *T_CSH != NUL
|
||||
&& *T_CRS != NUL)
|
||||
{
|
||||
LOG_TR("Sending cursor style request");
|
||||
out_str(T_CRS);
|
||||
rcs_status = STATUS_SENT;
|
||||
out_flush();
|
||||
}
|
||||
}
|
||||
# ifdef FEAT_EVAL
|
||||
set_vim_var_string(VV_TERMRESPONSE, tp, i + 1);
|
||||
@@ -4544,6 +4605,29 @@ check_termcode(
|
||||
slen = i + 1;
|
||||
}
|
||||
|
||||
/* Check blinking cursor from xterm:
|
||||
* {lead}?12;1$y set
|
||||
* {lead}?12;2$y not set
|
||||
*
|
||||
* {lead} can be <Esc>[ or CSI
|
||||
*/
|
||||
else if (rbm_status == STATUS_SENT
|
||||
&& tp[(j = 1 + (tp[0] == ESC))] == '?'
|
||||
&& i == j + 6
|
||||
&& tp[j + 1] == '1'
|
||||
&& tp[j + 2] == '2'
|
||||
&& tp[j + 3] == ';'
|
||||
&& tp[i - 1] == '$'
|
||||
&& tp[i] == 'y')
|
||||
{
|
||||
initial_cursor_blink = (tp[j + 4] == '1');
|
||||
rbm_status = STATUS_GOT;
|
||||
LOG_TR("Received cursor blinking mode response");
|
||||
key_name[0] = (int)KS_EXTRA;
|
||||
key_name[1] = (int)KE_IGNORE;
|
||||
slen = i + 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for a window position response from the terminal:
|
||||
* {lead}3;{x}:{y}t
|
||||
@@ -4626,6 +4710,10 @@ check_termcode(
|
||||
key_name[0] = (int)KS_EXTRA;
|
||||
key_name[1] = (int)KE_IGNORE;
|
||||
slen = i + 1 + (tp[i] == ESC);
|
||||
if (tp[i] == 0x07 && i + 1 < len && tp[i + 1] == 0x18)
|
||||
/* Sometimes the 0x07 is followed by 0x18, unclear
|
||||
* when this happens. */
|
||||
++slen;
|
||||
break;
|
||||
}
|
||||
if (i == len)
|
||||
@@ -4650,7 +4738,7 @@ check_termcode(
|
||||
*
|
||||
* Consume any code that starts with "{lead}.+r" or "{lead}.$r".
|
||||
*/
|
||||
else if ((check_for_codes || rcm_status == STATUS_SENT)
|
||||
else if ((check_for_codes || rcs_status == STATUS_SENT)
|
||||
&& ((tp[0] == ESC && len >= 2 && tp[1] == 'P')
|
||||
|| tp[0] == DCS))
|
||||
{
|
||||
@@ -4692,8 +4780,9 @@ check_termcode(
|
||||
initial_cursor_shape = (number + 1) / 2;
|
||||
/* The blink flag is actually inverted, compared to
|
||||
* the value set with T_SH. */
|
||||
initial_cursor_blink = (number & 1) ? FALSE : TRUE;
|
||||
rcm_status = STATUS_GOT;
|
||||
initial_cursor_shape_blink =
|
||||
(number & 1) ? FALSE : TRUE;
|
||||
rcs_status = STATUS_GOT;
|
||||
LOG_TR("Received cursor shape response");
|
||||
|
||||
key_name[0] = (int)KS_EXTRA;
|
||||
|
||||
@@ -42,7 +42,8 @@ enum SpecialKey
|
||||
KS_VS, /* cursor very visible (blink) */
|
||||
KS_CVS, /* cursor normally visible (no blink) */
|
||||
KS_CSH, /* cursor shape */
|
||||
KS_CRS, /* request cursor shape */
|
||||
KS_CRC, /* request cursor blinking */
|
||||
KS_CRS, /* request cursor style */
|
||||
KS_ME, /* normal mode */
|
||||
KS_MR, /* reverse mode */
|
||||
KS_MD, /* bold mode */
|
||||
@@ -135,7 +136,8 @@ extern char_u *(term_strings[]); /* current terminal strings */
|
||||
#define T_VS (TERM_STR(KS_VS)) /* cursor very visible (blink) */
|
||||
#define T_CVS (TERM_STR(KS_CVS)) /* cursor normally visible (no blink) */
|
||||
#define T_CSH (TERM_STR(KS_CSH)) /* cursor shape */
|
||||
#define T_CRS (TERM_STR(KS_CRS)) /* request cursor shape */
|
||||
#define T_CRC (TERM_STR(KS_CRC)) /* request cursor blinking */
|
||||
#define T_CRS (TERM_STR(KS_CRS)) /* request cursor style */
|
||||
#define T_ME (TERM_STR(KS_ME)) /* normal mode */
|
||||
#define T_MR (TERM_STR(KS_MR)) /* reverse mode */
|
||||
#define T_MD (TERM_STR(KS_MD)) /* bold mode */
|
||||
|
||||
350
src/terminal.c
350
src/terminal.c
@@ -38,28 +38,35 @@
|
||||
* in tl_scrollback are no longer used.
|
||||
*
|
||||
* TODO:
|
||||
* - make [range]terminal pipe [range] lines to the terminal
|
||||
* - ":term NONE" does not work in MS-Windows.
|
||||
* - test for writing lines to terminal job does not work on MS-Windows
|
||||
* - implement term_setsize()
|
||||
* - add test for giving error for invalid 'termsize' value.
|
||||
* - support minimal size when 'termsize' is "rows*cols".
|
||||
* - support minimal size when 'termsize' is empty?
|
||||
* - do not set bufhidden to "hide"? works like a buffer with changes.
|
||||
* document that CTRL-W :hide can be used.
|
||||
* - GUI: when using tabs, focus in terminal, click on tab does not work.
|
||||
* - When $HOME was set by Vim (MS-Windows), do not pass it to the job.
|
||||
* - GUI: when 'confirm' is set and trying to exit Vim, dialog offers to save
|
||||
* changes to "!shell".
|
||||
* (justrajdeep, 2017 Aug 22)
|
||||
* - command argument with spaces doesn't work #1999
|
||||
* :terminal ls dir\ with\ spaces
|
||||
* - implement job options when starting a terminal. Allow:
|
||||
* "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"
|
||||
* Check that something is connected to the terminal.
|
||||
* Test: "cat" reading from a file or buffer
|
||||
* "ls" writing stdout to a file or buffer
|
||||
* shell writing stderr to a file or buffer
|
||||
* "ls" writing stdout to a file or buffer
|
||||
* shell writing stderr to a file or buffer
|
||||
* - For the GUI fill termios with default values, perhaps like pangoterm:
|
||||
* http://bazaar.launchpad.net/~leonerd/pangoterm/trunk/view/head:/main.c#L134
|
||||
* - support ":term NONE" to open a terminal with a pty but not running a job
|
||||
* in it. The pty can be passed to gdb to run the executable in.
|
||||
* - if the job in the terminal does not support the mouse, we can use the
|
||||
* mouse in the Terminal window for copy/paste.
|
||||
* - when 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
* conversions.
|
||||
* - update ":help function-list" for terminal functions.
|
||||
* - In the GUI use a terminal emulator for :!cmd.
|
||||
* - Copy text in the vterm to the Vim buffer once in a while, so that
|
||||
* completion works.
|
||||
@@ -155,8 +162,8 @@ static term_T *in_terminal_loop = NULL;
|
||||
/*
|
||||
* Functions with separate implementation for MS-Windows and Unix-like systems.
|
||||
*/
|
||||
static int term_and_job_init(term_T *term, int rows, int cols,
|
||||
typval_T *argvar, jobopt_T *opt);
|
||||
static int term_and_job_init(term_T *term, typval_T *argvar, jobopt_T *opt);
|
||||
static int create_pty_only(term_T *term, jobopt_T *opt);
|
||||
static void term_report_winsize(term_T *term, int rows, int cols);
|
||||
static void term_free_vterm(term_T *term);
|
||||
|
||||
@@ -248,6 +255,7 @@ term_start(typval_T *argvar, jobopt_T *opt, int forceit)
|
||||
win_T *old_curwin = curwin;
|
||||
term_T *term;
|
||||
buf_T *old_curbuf = NULL;
|
||||
int res;
|
||||
|
||||
if (check_restricted() || check_secure())
|
||||
return;
|
||||
@@ -347,7 +355,13 @@ term_start(typval_T *argvar, jobopt_T *opt, int forceit)
|
||||
char_u *cmd, *p;
|
||||
|
||||
if (argvar->v_type == VAR_STRING)
|
||||
{
|
||||
cmd = argvar->vval.v_string;
|
||||
if (cmd == NULL)
|
||||
cmd = (char_u *)"";
|
||||
else if (STRCMP(cmd, "NONE") == 0)
|
||||
cmd = (char_u *)"pty";
|
||||
}
|
||||
else if (argvar->v_type != VAR_LIST
|
||||
|| argvar->vval.v_list == NULL
|
||||
|| argvar->vval.v_list->lv_len < 1)
|
||||
@@ -392,9 +406,15 @@ term_start(typval_T *argvar, jobopt_T *opt, int forceit)
|
||||
set_term_and_win_size(term);
|
||||
setup_job_options(opt, term->tl_rows, term->tl_cols);
|
||||
|
||||
/* System dependent: setup the vterm and start the job in it. */
|
||||
if (term_and_job_init(term, term->tl_rows, term->tl_cols, argvar, opt)
|
||||
== OK)
|
||||
/* System dependent: setup the vterm and maybe start the job in it. */
|
||||
if (argvar->v_type == VAR_STRING
|
||||
&& argvar->vval.v_string != NULL
|
||||
&& STRCMP(argvar->vval.v_string, "NONE") == 0)
|
||||
res = create_pty_only(term, opt);
|
||||
else
|
||||
res = term_and_job_init(term, argvar, opt);
|
||||
|
||||
if (res == OK)
|
||||
{
|
||||
/* Get and remember the size we ended up with. Update the pty. */
|
||||
vterm_get_size(term->tl_vterm, &term->tl_rows, &term->tl_cols);
|
||||
@@ -447,10 +467,14 @@ ex_terminal(exarg_T *eap)
|
||||
cmd = eap->arg;
|
||||
while (*cmd && *cmd == '+' && *(cmd + 1) == '+')
|
||||
{
|
||||
char_u *p;
|
||||
char_u *p, *ep;
|
||||
|
||||
cmd += 2;
|
||||
p = skiptowhite(cmd);
|
||||
ep = vim_strchr(cmd, '=');
|
||||
if (ep != NULL && ep < p)
|
||||
p = ep;
|
||||
|
||||
if ((int)(p - cmd) == 5 && STRNICMP(cmd, "close", 5) == 0)
|
||||
opt.jo_term_finish = 'c';
|
||||
else if ((int)(p - cmd) == 4 && STRNICMP(cmd, "open", 4) == 0)
|
||||
@@ -459,6 +483,20 @@ ex_terminal(exarg_T *eap)
|
||||
opt.jo_curwin = 1;
|
||||
else if ((int)(p - cmd) == 6 && STRNICMP(cmd, "hidden", 6) == 0)
|
||||
opt.jo_hidden = 1;
|
||||
else if ((int)(p - cmd) == 4 && STRNICMP(cmd, "rows", 4) == 0
|
||||
&& ep != NULL && isdigit(ep[1]))
|
||||
{
|
||||
opt.jo_set2 |= JO2_TERM_ROWS;
|
||||
opt.jo_term_rows = atoi((char *)ep + 1);
|
||||
p = skiptowhite(cmd);
|
||||
}
|
||||
else if ((int)(p - cmd) == 4 && STRNICMP(cmd, "cols", 4) == 0
|
||||
&& ep != NULL && isdigit(ep[1]))
|
||||
{
|
||||
opt.jo_set2 |= JO2_TERM_COLS;
|
||||
opt.jo_term_cols = atoi((char *)ep + 1);
|
||||
p = skiptowhite(cmd);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*p)
|
||||
@@ -472,17 +510,14 @@ ex_terminal(exarg_T *eap)
|
||||
/* Make a copy, an autocommand may set 'shell'. */
|
||||
tofree = cmd = vim_strsave(p_sh);
|
||||
|
||||
if (eap->addr_count == 2)
|
||||
if (eap->addr_count > 0)
|
||||
{
|
||||
opt.jo_term_rows = eap->line1;
|
||||
opt.jo_term_cols = eap->line2;
|
||||
}
|
||||
else if (eap->addr_count == 1)
|
||||
{
|
||||
if (cmdmod.split & WSP_VERT)
|
||||
opt.jo_term_cols = eap->line2;
|
||||
else
|
||||
opt.jo_term_rows = eap->line2;
|
||||
/* Write lines from current buffer to the job. */
|
||||
opt.jo_set |= JO_IN_IO | JO_IN_BUF | JO_IN_TOP | JO_IN_BOT;
|
||||
opt.jo_io[PART_IN] = JIO_BUFFER;
|
||||
opt.jo_io_buf[PART_IN] = curbuf->b_fnum;
|
||||
opt.jo_in_top = eap->line1;
|
||||
opt.jo_in_bot = eap->line2;
|
||||
}
|
||||
|
||||
argvar.v_type = VAR_STRING;
|
||||
@@ -530,7 +565,8 @@ free_terminal(buf_T *buf)
|
||||
if (term->tl_job != NULL)
|
||||
{
|
||||
if (term->tl_job->jv_status != JOB_ENDED
|
||||
&& term->tl_job->jv_status != JOB_FAILED)
|
||||
&& term->tl_job->jv_status != JOB_FINISHED
|
||||
&& term->tl_job->jv_status != JOB_FAILED)
|
||||
job_stop(term->tl_job, NULL, "kill");
|
||||
job_unref(term->tl_job);
|
||||
}
|
||||
@@ -632,7 +668,7 @@ write_to_term(buf_T *buffer, char_u *msg, channel_T *channel)
|
||||
update_cursor(term, TRUE);
|
||||
}
|
||||
else
|
||||
redraw_after_callback();
|
||||
redraw_after_callback(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -816,8 +852,9 @@ term_job_running(term_T *term)
|
||||
* race condition when updating the title. */
|
||||
return term != NULL
|
||||
&& term->tl_job != NULL
|
||||
&& term->tl_job->jv_status == JOB_STARTED
|
||||
&& channel_is_open(term->tl_job->jv_channel);
|
||||
&& channel_is_open(term->tl_job->jv_channel)
|
||||
&& (term->tl_job->jv_status == JOB_STARTED
|
||||
|| term->tl_job->jv_channel->ch_keep_open);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -830,7 +867,26 @@ add_scrollback_line_to_buffer(term_T *term, char_u *text, int len)
|
||||
int empty = (buf->b_ml.ml_flags & ML_EMPTY);
|
||||
linenr_T lnum = buf->b_ml.ml_line_count;
|
||||
|
||||
ml_append_buf(term->tl_buffer, lnum, text, len + 1, FALSE);
|
||||
#ifdef WIN3264
|
||||
if (!enc_utf8 && enc_codepage > 0)
|
||||
{
|
||||
WCHAR *ret = NULL;
|
||||
int length = 0;
|
||||
|
||||
MultiByteToWideChar_alloc(CP_UTF8, 0, (char*)text, len + 1,
|
||||
&ret, &length);
|
||||
if (ret != NULL)
|
||||
{
|
||||
WideCharToMultiByte_alloc(enc_codepage, 0,
|
||||
ret, length, (char **)&text, &len, 0, 0);
|
||||
vim_free(ret);
|
||||
ml_append_buf(term->tl_buffer, lnum, text, len, FALSE);
|
||||
vim_free(text);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
ml_append_buf(term->tl_buffer, lnum, text, len + 1, FALSE);
|
||||
if (empty)
|
||||
{
|
||||
/* Delete the empty line that was in the empty buffer. */
|
||||
@@ -903,7 +959,7 @@ move_terminal_to_buffer(term_T *term)
|
||||
width = 1;
|
||||
vim_memset(p + pos.col, 0, sizeof(cellattr_T));
|
||||
if (ga_grow(&ga, 1) == OK)
|
||||
ga.ga_len += mb_char2bytes(' ',
|
||||
ga.ga_len += utf_char2bytes(' ',
|
||||
(char_u *)ga.ga_data + ga.ga_len);
|
||||
}
|
||||
else
|
||||
@@ -921,7 +977,7 @@ move_terminal_to_buffer(term_T *term)
|
||||
int c;
|
||||
|
||||
for (i = 0; (c = cell.chars[i]) > 0 || i == 0; ++i)
|
||||
ga.ga_len += mb_char2bytes(c == NUL ? ' ' : c,
|
||||
ga.ga_len += utf_char2bytes(c == NUL ? ' ' : c,
|
||||
(char_u *)ga.ga_data + ga.ga_len);
|
||||
}
|
||||
}
|
||||
@@ -1077,6 +1133,29 @@ term_vgetc()
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the part that is connected to the tty. Normally this is PART_IN, but
|
||||
* when writing buffer lines to the job it can be another. This makes it
|
||||
* possible to do "1,5term vim -".
|
||||
*/
|
||||
static ch_part_T
|
||||
get_tty_part(term_T *term)
|
||||
{
|
||||
#ifdef UNIX
|
||||
ch_part_T parts[3] = {PART_IN, PART_OUT, PART_ERR};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
int fd = term->tl_job->jv_channel->ch_part[parts[i]].ch_fd;
|
||||
|
||||
if (isatty(fd))
|
||||
return parts[i];
|
||||
}
|
||||
#endif
|
||||
return PART_IN;
|
||||
}
|
||||
|
||||
/*
|
||||
* Send keys to terminal.
|
||||
* Return FAIL when the key needs to be handled in Normal mode.
|
||||
@@ -1148,8 +1227,8 @@ send_keys_to_term(term_T *term, int c, int typed)
|
||||
len = term_convert_key(term, c, msg);
|
||||
if (len > 0)
|
||||
/* TODO: if FAIL is returned, stop? */
|
||||
channel_send(term->tl_job->jv_channel, PART_IN,
|
||||
(char_u *)msg, (int)len, NULL);
|
||||
channel_send(term->tl_job->jv_channel, get_tty_part(term),
|
||||
(char_u *)msg, (int)len, NULL);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -1201,9 +1280,31 @@ term_paste_register(int prev_c UNUSED)
|
||||
for (item = l->lv_first; item != NULL; item = item->li_next)
|
||||
{
|
||||
char_u *s = get_tv_string(&item->li_tv);
|
||||
#ifdef WIN3264
|
||||
char_u *tmp = s;
|
||||
|
||||
if (!enc_utf8 && enc_codepage > 0)
|
||||
{
|
||||
WCHAR *ret = NULL;
|
||||
int length = 0;
|
||||
|
||||
MultiByteToWideChar_alloc(enc_codepage, 0, (char*)s, STRLEN(s),
|
||||
&ret, &length);
|
||||
if (ret != NULL)
|
||||
{
|
||||
WideCharToMultiByte_alloc(CP_UTF8, 0,
|
||||
ret, length, (char **)&s, &length, 0, 0);
|
||||
vim_free(ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
channel_send(curbuf->b_term->tl_job->jv_channel, PART_IN,
|
||||
s, STRLEN(s), NULL);
|
||||
#ifdef WIN3264
|
||||
if (tmp != s)
|
||||
vim_free(s);
|
||||
#endif
|
||||
|
||||
if (item->li_next != NULL || type == MLINE)
|
||||
channel_send(curbuf->b_term->tl_job->jv_channel, PART_IN,
|
||||
(char_u *)"\r", 1, NULL);
|
||||
@@ -1238,7 +1339,7 @@ term_get_cursor_shape(guicolor_T *fg, guicolor_T *bg)
|
||||
{
|
||||
entry.blinkwait = 700;
|
||||
entry.blinkon = 400;
|
||||
entry.blinkon = 250;
|
||||
entry.blinkoff = 250;
|
||||
}
|
||||
*fg = gui.back_pixel;
|
||||
if (term->tl_cursor_color == NULL)
|
||||
@@ -1332,7 +1433,8 @@ terminal_loop(void)
|
||||
|
||||
#ifdef UNIX
|
||||
{
|
||||
int fd = curbuf->b_term->tl_job->jv_channel->ch_part[PART_IN].ch_fd;
|
||||
int part = get_tty_part(curbuf->b_term);
|
||||
int fd = curbuf->b_term->tl_job->jv_channel->ch_part[part].ch_fd;
|
||||
|
||||
if (isatty(fd))
|
||||
{
|
||||
@@ -1429,6 +1531,18 @@ terminal_loop(void)
|
||||
goto theend;
|
||||
}
|
||||
}
|
||||
# ifdef WIN3264
|
||||
if (!enc_utf8 && has_mbyte && c >= 0x80)
|
||||
{
|
||||
WCHAR wc;
|
||||
char_u mb[3];
|
||||
|
||||
mb[0] = (unsigned)c >> 8;
|
||||
mb[1] = c;
|
||||
if (MultiByteToWideChar(GetACP(), 0, (char*)mb, 2, &wc, 1) > 0)
|
||||
c = wc;
|
||||
}
|
||||
# endif
|
||||
if (send_keys_to_term(curbuf->b_term, c, TRUE) != OK)
|
||||
{
|
||||
ret = OK;
|
||||
@@ -1588,7 +1702,7 @@ color2index(VTermColor *color, int fg, int *boldp)
|
||||
|
||||
/* 216-color cube */
|
||||
return 17 + ((red + 25) / 0x33) * 36
|
||||
+ ((green + 25) / 0x33) * 6
|
||||
+ ((green + 25) / 0x33) * 6
|
||||
+ (blue + 25) / 0x33;
|
||||
}
|
||||
return 0;
|
||||
@@ -1737,6 +1851,24 @@ handle_settermprop(
|
||||
* displayed */
|
||||
if (*skipwhite((char_u *)value->string) == NUL)
|
||||
term->tl_title = NULL;
|
||||
#ifdef WIN3264
|
||||
else if (!enc_utf8 && enc_codepage > 0)
|
||||
{
|
||||
WCHAR *ret = NULL;
|
||||
int length = 0;
|
||||
|
||||
MultiByteToWideChar_alloc(CP_UTF8, 0,
|
||||
(char*)value->string, STRLEN(value->string),
|
||||
&ret, &length);
|
||||
if (ret != NULL)
|
||||
{
|
||||
WideCharToMultiByte_alloc(enc_codepage, 0,
|
||||
ret, length, (char**)&term->tl_title,
|
||||
&length, 0, 0);
|
||||
vim_free(ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else
|
||||
term->tl_title = vim_strsave((char_u *)value->string);
|
||||
vim_free(term->tl_status_text);
|
||||
@@ -1843,7 +1975,7 @@ handle_pushline(int cols, const VTermScreenCell *cells, void *user)
|
||||
break;
|
||||
}
|
||||
for (i = 0; (c = cells[col].chars[i]) > 0 || i == 0; ++i)
|
||||
ga.ga_len += mb_char2bytes(c == NUL ? ' ' : c,
|
||||
ga.ga_len += utf_char2bytes(c == NUL ? ' ' : c,
|
||||
(char_u *)ga.ga_data + ga.ga_len);
|
||||
p[col].width = cells[col].width;
|
||||
p[col].attrs = cells[col].attrs;
|
||||
@@ -2029,28 +2161,43 @@ term_update_window(win_T *wp)
|
||||
if (c == NUL)
|
||||
{
|
||||
ScreenLines[off] = ' ';
|
||||
#if defined(FEAT_MBYTE)
|
||||
if (enc_utf8)
|
||||
ScreenLinesUC[off] = NUL;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(FEAT_MBYTE)
|
||||
if (enc_utf8 && c >= 0x80)
|
||||
if (enc_utf8)
|
||||
{
|
||||
ScreenLines[off] = ' ';
|
||||
ScreenLinesUC[off] = c;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenLines[off] = c;
|
||||
if (enc_utf8)
|
||||
if (c >= 0x80)
|
||||
{
|
||||
ScreenLines[off] = ' ';
|
||||
ScreenLinesUC[off] = c;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenLines[off] = c;
|
||||
ScreenLinesUC[off] = NUL;
|
||||
}
|
||||
}
|
||||
#ifdef WIN3264
|
||||
else if (has_mbyte && c >= 0x80)
|
||||
{
|
||||
char_u mb[MB_MAXBYTES+1];
|
||||
WCHAR wc = c;
|
||||
|
||||
if (WideCharToMultiByte(GetACP(), 0, &wc, 1,
|
||||
(char*)mb, 2, 0, 0) > 1)
|
||||
{
|
||||
ScreenLines[off] = mb[0];
|
||||
ScreenLines[off + 1] = mb[1];
|
||||
cell.width = mb_ptr2cells(mb);
|
||||
}
|
||||
else
|
||||
ScreenLines[off] = c;
|
||||
}
|
||||
#else
|
||||
ScreenLines[off] = c;
|
||||
#endif
|
||||
else
|
||||
ScreenLines[off] = c;
|
||||
}
|
||||
ScreenAttrs[off] = cell2attr(cell.attrs, cell.fg, cell.bg);
|
||||
|
||||
@@ -2058,11 +2205,14 @@ term_update_window(win_T *wp)
|
||||
++off;
|
||||
if (cell.width == 2)
|
||||
{
|
||||
ScreenLines[off] = NUL;
|
||||
#if defined(FEAT_MBYTE)
|
||||
if (enc_utf8)
|
||||
ScreenLinesUC[off] = NUL;
|
||||
#endif
|
||||
|
||||
/* don't set the second byte to NUL for a DBCS encoding, it
|
||||
* has been set above */
|
||||
if (enc_utf8 || !has_mbyte)
|
||||
ScreenLines[off] = NUL;
|
||||
|
||||
++pos.col;
|
||||
++off;
|
||||
}
|
||||
@@ -2147,6 +2297,7 @@ create_vterm(term_T *term, int rows, int cols)
|
||||
{
|
||||
VTerm *vterm;
|
||||
VTermScreen *screen;
|
||||
VTermValue value;
|
||||
|
||||
vterm = vterm_new(rows, cols);
|
||||
term->tl_vterm = vterm;
|
||||
@@ -2171,6 +2322,20 @@ create_vterm(term_T *term, int rows, int cols)
|
||||
|
||||
/* Allow using alternate screen. */
|
||||
vterm_screen_enable_altscreen(screen, 1);
|
||||
|
||||
/* For unix do not use a blinking cursor. In an xterm this causes the
|
||||
* cursor to blink if it's blinking in the xterm.
|
||||
* For Windows we respect the system wide setting. */
|
||||
#ifdef WIN3264
|
||||
if (GetCaretBlinkTime() == INFINITE)
|
||||
value.boolean = 0;
|
||||
else
|
||||
value.boolean = 1;
|
||||
#else
|
||||
value.boolean = 0;
|
||||
#endif
|
||||
vterm_state_set_termprop(vterm_obtain_state(vterm),
|
||||
VTERM_PROP_CURSORBLINK, &value);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2316,7 +2481,8 @@ f_term_getcursor(typval_T *argvars, typval_T *rettv)
|
||||
if (d != NULL)
|
||||
{
|
||||
dict_add_nr_str(d, "visible", term->tl_cursor_visible, NULL);
|
||||
dict_add_nr_str(d, "blink", term->tl_cursor_blink, NULL);
|
||||
dict_add_nr_str(d, "blink", blink_state_is_inverted()
|
||||
? !term->tl_cursor_blink : term->tl_cursor_blink, NULL);
|
||||
dict_add_nr_str(d, "shape", term->tl_cursor_shape, NULL);
|
||||
dict_add_nr_str(d, "color", 0L, term->tl_cursor_color == NULL
|
||||
? (char_u *)"" : term->tl_cursor_color);
|
||||
@@ -2691,9 +2857,14 @@ f_term_wait(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
ch_log(NULL, "term_wait(): no job to wait for");
|
||||
return;
|
||||
}
|
||||
if (buf->b_term->tl_job->jv_channel == NULL)
|
||||
/* channel is closed, nothing to do */
|
||||
return;
|
||||
|
||||
/* Get the job status, this will detect a job that finished. */
|
||||
if (STRCMP(job_status(buf->b_term->tl_job), "dead") == 0)
|
||||
if ((buf->b_term->tl_job->jv_channel == NULL
|
||||
|| !buf->b_term->tl_job->jv_channel->ch_keep_open)
|
||||
&& STRCMP(job_status(buf->b_term->tl_job), "dead") == 0)
|
||||
{
|
||||
/* The job is dead, keep reading channel I/O until the channel is
|
||||
* closed. */
|
||||
@@ -2823,13 +2994,18 @@ dyn_winpty_init(int verbose)
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
static int
|
||||
term_and_job_init(term_T *term, int rows, int cols, typval_T *argvar, jobopt_T *opt)
|
||||
term_and_job_init(
|
||||
term_T *term,
|
||||
typval_T *argvar,
|
||||
jobopt_T *opt)
|
||||
{
|
||||
WCHAR *p = NULL;
|
||||
WCHAR *cmd_wchar = NULL;
|
||||
channel_T *channel = NULL;
|
||||
job_T *job = NULL;
|
||||
DWORD error;
|
||||
HANDLE jo = NULL, child_process_handle, child_thread_handle;
|
||||
HANDLE jo = NULL;
|
||||
HANDLE child_process_handle;
|
||||
HANDLE child_thread_handle;
|
||||
void *winpty_err;
|
||||
void *spawn_config = NULL;
|
||||
char buf[MAX_PATH];
|
||||
@@ -2849,8 +3025,8 @@ term_and_job_init(term_T *term, int rows, int cols, typval_T *argvar, jobopt_T *
|
||||
cmd = ga.ga_data;
|
||||
}
|
||||
|
||||
p = enc_to_utf16(cmd, NULL);
|
||||
if (p == NULL)
|
||||
cmd_wchar = enc_to_utf16(cmd, NULL);
|
||||
if (cmd_wchar == NULL)
|
||||
return FAIL;
|
||||
|
||||
job = job_alloc();
|
||||
@@ -2865,7 +3041,8 @@ term_and_job_init(term_T *term, int rows, int cols, typval_T *argvar, jobopt_T *
|
||||
if (term->tl_winpty_config == NULL)
|
||||
goto failed;
|
||||
|
||||
winpty_config_set_initial_size(term->tl_winpty_config, cols, rows);
|
||||
winpty_config_set_initial_size(term->tl_winpty_config,
|
||||
term->tl_cols, term->tl_rows);
|
||||
term->tl_winpty = winpty_open(term->tl_winpty_config, &winpty_err);
|
||||
if (term->tl_winpty == NULL)
|
||||
goto failed;
|
||||
@@ -2875,7 +3052,7 @@ term_and_job_init(term_T *term, int rows, int cols, typval_T *argvar, jobopt_T *
|
||||
WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN |
|
||||
WINPTY_SPAWN_FLAG_EXIT_AFTER_SHUTDOWN,
|
||||
NULL,
|
||||
p,
|
||||
cmd_wchar,
|
||||
NULL,
|
||||
NULL,
|
||||
&winpty_err);
|
||||
@@ -2890,20 +3067,25 @@ term_and_job_init(term_T *term, int rows, int cols, typval_T *argvar, jobopt_T *
|
||||
if (job == NULL)
|
||||
goto failed;
|
||||
|
||||
/* TODO: when all lines are written and the fd is closed, the command
|
||||
* doesn't get EOF and hangs. */
|
||||
if (opt->jo_set & JO_IN_BUF)
|
||||
job->jv_in_buf = buflist_findnr(opt->jo_io_buf[PART_IN]);
|
||||
|
||||
if (!winpty_spawn(term->tl_winpty, spawn_config, &child_process_handle,
|
||||
&child_thread_handle, &error, &winpty_err))
|
||||
goto failed;
|
||||
|
||||
channel_set_pipes(channel,
|
||||
(sock_T) CreateFileW(
|
||||
(sock_T)CreateFileW(
|
||||
winpty_conin_name(term->tl_winpty),
|
||||
GENERIC_WRITE, 0, NULL,
|
||||
OPEN_EXISTING, 0, NULL),
|
||||
(sock_T) CreateFileW(
|
||||
(sock_T)CreateFileW(
|
||||
winpty_conout_name(term->tl_winpty),
|
||||
GENERIC_READ, 0, NULL,
|
||||
OPEN_EXISTING, 0, NULL),
|
||||
(sock_T) CreateFileW(
|
||||
(sock_T)CreateFileW(
|
||||
winpty_conerr_name(term->tl_winpty),
|
||||
GENERIC_READ, 0, NULL,
|
||||
OPEN_EXISTING, 0, NULL));
|
||||
@@ -2920,9 +3102,9 @@ term_and_job_init(term_T *term, int rows, int cols, typval_T *argvar, jobopt_T *
|
||||
}
|
||||
|
||||
winpty_spawn_config_free(spawn_config);
|
||||
vim_free(p);
|
||||
vim_free(cmd_wchar);
|
||||
|
||||
create_vterm(term, rows, cols);
|
||||
create_vterm(term, term->tl_rows, term->tl_cols);
|
||||
|
||||
channel_set_job(channel, job, opt);
|
||||
job_set_options(job, opt);
|
||||
@@ -2943,8 +3125,8 @@ term_and_job_init(term_T *term, int rows, int cols, typval_T *argvar, jobopt_T *
|
||||
failed:
|
||||
if (argvar->v_type == VAR_LIST)
|
||||
vim_free(ga.ga_data);
|
||||
if (p != NULL)
|
||||
vim_free(p);
|
||||
if (cmd_wchar != NULL)
|
||||
vim_free(cmd_wchar);
|
||||
if (spawn_config != NULL)
|
||||
winpty_spawn_config_free(spawn_config);
|
||||
if (channel != NULL)
|
||||
@@ -2974,6 +3156,13 @@ failed:
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
static int
|
||||
create_pty_only(term_T *term, jobopt_T *opt)
|
||||
{
|
||||
/* TODO: implement this */
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Free the terminal emulator part of "term".
|
||||
*/
|
||||
@@ -3020,9 +3209,12 @@ terminal_enabled(void)
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
static int
|
||||
term_and_job_init(term_T *term, int rows, int cols, typval_T *argvar, jobopt_T *opt)
|
||||
term_and_job_init(
|
||||
term_T *term,
|
||||
typval_T *argvar,
|
||||
jobopt_T *opt)
|
||||
{
|
||||
create_vterm(term, rows, cols);
|
||||
create_vterm(term, term->tl_rows, term->tl_cols);
|
||||
|
||||
/* TODO: if the command is "NONE" only create a pty. */
|
||||
term->tl_job = job_start(argvar, opt);
|
||||
@@ -3034,6 +3226,26 @@ term_and_job_init(term_T *term, int rows, int cols, typval_T *argvar, jobopt_T *
|
||||
&& term->tl_job->jv_status != JOB_FAILED ? OK : FAIL;
|
||||
}
|
||||
|
||||
static int
|
||||
create_pty_only(term_T *term, jobopt_T *opt)
|
||||
{
|
||||
int ret;
|
||||
|
||||
create_vterm(term, term->tl_rows, term->tl_cols);
|
||||
|
||||
term->tl_job = job_alloc();
|
||||
if (term->tl_job == NULL)
|
||||
return FAIL;
|
||||
++term->tl_job->jv_refcount;
|
||||
|
||||
/* behave like the job is already finished */
|
||||
term->tl_job->jv_status = JOB_FINISHED;
|
||||
|
||||
ret = mch_create_pty_channel(term->tl_job, opt);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Free the terminal emulator part of "term".
|
||||
*/
|
||||
|
||||
@@ -68,9 +68,18 @@ func Test_cino_extern_c()
|
||||
call assert_equal(pair[2], getline(len(lines) + 1), 'Failed for "' . string(lines) . '"')
|
||||
endfor
|
||||
|
||||
|
||||
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func! Test_cindent_rawstring()
|
||||
new
|
||||
setl cindent
|
||||
call feedkeys("i" .
|
||||
\ "int main() {\<CR>" .
|
||||
\ "R\"(\<CR>" .
|
||||
\ ")\";\<CR>" .
|
||||
\ "statement;\<Esc>", "x")
|
||||
call assert_equal("\tstatement;", getline(line('.')))
|
||||
bw!
|
||||
endfunction
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -527,4 +527,32 @@ func Test_filetype_detection()
|
||||
if has('fname_case')
|
||||
call CheckItems(s:filename_case_checks)
|
||||
endif
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
" Filetypes detected from the file contents by scripts.vim
|
||||
let s:script_checks = {
|
||||
\ 'virata': [['% Virata'],
|
||||
\ ['', '% Virata'],
|
||||
\ ['', '', '% Virata'],
|
||||
\ ['', '', '', '% Virata'],
|
||||
\ ['', '', '', '', '% Virata']],
|
||||
\ 'strace': [['execve("/usr/bin/pstree", ["pstree"], 0x7ff0 /* 63 vars */) = 0'],
|
||||
\ ['15:17:47 execve("/usr/bin/pstree", ["pstree"], ... "_=/usr/bin/strace"]) = 0'],
|
||||
\ ['__libc_start_main and something']],
|
||||
\ }
|
||||
|
||||
func Test_script_detection()
|
||||
filetype on
|
||||
for [ft, files] in items(s:script_checks)
|
||||
for file in files
|
||||
call writefile(file, 'Xtest')
|
||||
split Xtest
|
||||
call assert_equal(ft, &filetype)
|
||||
bwipe!
|
||||
endfor
|
||||
endfor
|
||||
call delete('Xtest')
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -12,4 +12,21 @@ endfunc
|
||||
func Test_help_errors()
|
||||
call assert_fails('help doesnotexist', 'E149:')
|
||||
call assert_fails('help!', 'E478:')
|
||||
|
||||
new
|
||||
set keywordprg=:help
|
||||
call setline(1, " ")
|
||||
call assert_fails('normal VK', 'E349:')
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_help_keyword()
|
||||
new
|
||||
set keywordprg=:help
|
||||
call setline(1, " Visual ")
|
||||
normal VK
|
||||
call assert_match('^Visual mode', getline('.'))
|
||||
call assert_equal('help', &ft)
|
||||
close
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
@@ -152,13 +152,10 @@ endfunc
|
||||
|
||||
func Test_matchstrpos()
|
||||
call assert_equal(['ing', 4, 7], matchstrpos('testing', 'ing'))
|
||||
|
||||
call assert_equal(['ing', 4, 7], matchstrpos('testing', 'ing', 2))
|
||||
|
||||
call assert_equal(['', -1, -1], matchstrpos('testing', 'ing', 5))
|
||||
|
||||
call assert_equal(['', -1, -1], matchstrpos('testing', 'ing', 8))
|
||||
call assert_equal(['ing', 1, 4, 7], matchstrpos(['vim', 'testing', 'execute'], 'ing'))
|
||||
|
||||
call assert_equal(['', -1, -1, -1], matchstrpos(['vim', 'testing', 'execute'], 'img'))
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -2519,3 +2519,29 @@ func Test_add_qf()
|
||||
call XaddQf_tests('c')
|
||||
call XaddQf_tests('l')
|
||||
endfunc
|
||||
|
||||
" Test for getting the quickfix list items from some text without modifying
|
||||
" the quickfix stack
|
||||
func XgetListFromText(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
call g:Xsetlist([], 'f')
|
||||
|
||||
let l = g:Xgetlist({'text' : "File1:10:Line10"}).items
|
||||
call assert_equal(1, len(l))
|
||||
call assert_equal('Line10', l[0].text)
|
||||
|
||||
let l = g:Xgetlist({'text' : ["File2:20:Line20", "File2:30:Line30"]}).items
|
||||
call assert_equal(2, len(l))
|
||||
call assert_equal(30, l[1].lnum)
|
||||
|
||||
call assert_equal({}, g:Xgetlist({'text' : 10}))
|
||||
call assert_equal({}, g:Xgetlist({'text' : []}))
|
||||
|
||||
" Make sure that the quickfix stack is not modified
|
||||
call assert_equal(0, g:Xgetlist({'nr' : '$'}).nr)
|
||||
endfunc
|
||||
|
||||
func Test_get_list_from_text()
|
||||
call XgetListFromText('c')
|
||||
call XgetListFromText('l')
|
||||
endfunc
|
||||
|
||||
@@ -251,7 +251,7 @@ endfunc
|
||||
func Test_terminal_size()
|
||||
let cmd = Get_cat_123_cmd()
|
||||
|
||||
exe '5terminal ' . cmd
|
||||
exe 'terminal ++rows=5 ' . cmd
|
||||
let size = term_getsize('')
|
||||
bwipe!
|
||||
call assert_equal(5, size[0])
|
||||
@@ -262,7 +262,7 @@ func Test_terminal_size()
|
||||
call assert_equal(6, size[0])
|
||||
|
||||
vsplit
|
||||
exe '5,33terminal ' . cmd
|
||||
exe 'terminal ++rows=5 ++cols=33 ' . cmd
|
||||
let size = term_getsize('')
|
||||
bwipe!
|
||||
call assert_equal([5, 33], size)
|
||||
@@ -272,7 +272,7 @@ func Test_terminal_size()
|
||||
bwipe!
|
||||
call assert_equal([6, 36], size)
|
||||
|
||||
exe 'vertical 20terminal ' . cmd
|
||||
exe 'vertical terminal ++cols=20 ' . cmd
|
||||
let size = term_getsize('')
|
||||
bwipe!
|
||||
call assert_equal(20, size[1])
|
||||
@@ -283,7 +283,7 @@ func Test_terminal_size()
|
||||
call assert_equal(26, size[1])
|
||||
|
||||
split
|
||||
exe 'vertical 6,20terminal ' . cmd
|
||||
exe 'vertical terminal ++rows=6 ++cols=20 ' . cmd
|
||||
let size = term_getsize('')
|
||||
bwipe!
|
||||
call assert_equal([6, 20], size)
|
||||
@@ -456,11 +456,23 @@ func Test_terminal_noblock()
|
||||
|
||||
for c in ['a','b','c','d','e','f','g','h','i','j','k']
|
||||
call term_sendkeys(g:buf, 'echo ' . repeat(c, 5000) . "\<cr>")
|
||||
if has('mac')
|
||||
" TODO: this should not be needed, but without it sending keys blocks
|
||||
" after 8000 chars or so.
|
||||
sleep 100m
|
||||
endif
|
||||
endfor
|
||||
call term_sendkeys(g:buf, "echo done\<cr>")
|
||||
|
||||
" On MS-Windows there is an extra empty line below "done". Find "done" in
|
||||
" the last-but-one or the last-but-two line.
|
||||
let g:lnum = term_getsize(g:buf)[0] - 1
|
||||
call WaitFor('term_getline(g:buf, g:lnum) =~ "done"', 3000)
|
||||
call assert_match('done', term_getline(g:buf, g:lnum))
|
||||
call WaitFor('term_getline(g:buf, g:lnum) =~ "done" || term_getline(g:buf, g:lnum - 1) =~ "done"', 3000)
|
||||
let line = term_getline(g:buf, g:lnum)
|
||||
if line !~ 'done'
|
||||
let line = term_getline(g:buf, g:lnum - 1)
|
||||
endif
|
||||
call assert_match('done', line)
|
||||
|
||||
let g:job = term_getjob(g:buf)
|
||||
call Stop_shell_in_terminal(g:buf)
|
||||
@@ -470,3 +482,46 @@ func Test_terminal_noblock()
|
||||
unlet g:lnum
|
||||
bwipe
|
||||
endfunc
|
||||
|
||||
func Test_terminal_write_stdin()
|
||||
" Todo: make this work on all systems.
|
||||
if !has('unix')
|
||||
return
|
||||
endif
|
||||
new
|
||||
call setline(1, ['one', 'two', 'three'])
|
||||
%term wc
|
||||
call WaitFor('getline(1) != ""')
|
||||
let nrs = split(getline(1))
|
||||
call assert_equal(['3', '3', '14'], nrs)
|
||||
bwipe
|
||||
|
||||
call setline(1, ['one', 'two', 'three', 'four'])
|
||||
2,3term wc
|
||||
call WaitFor('getline(1) != ""')
|
||||
let nrs = split(getline(1))
|
||||
call assert_equal(['2', '2', '10'], nrs)
|
||||
bwipe
|
||||
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_terminal_no_cmd()
|
||||
" Todo: make this work on all systems.
|
||||
if !has('unix')
|
||||
return
|
||||
endif
|
||||
" Todo: make this work in the GUI
|
||||
if !has('gui_running')
|
||||
return
|
||||
endif
|
||||
let buf = term_start('NONE', {})
|
||||
call assert_notequal(0, buf)
|
||||
|
||||
let pty = job_info(term_getjob(buf))['tty']
|
||||
call assert_notequal('', pty)
|
||||
call system('echo "look here" > ' . pty)
|
||||
call term_wait(buf)
|
||||
call assert_equal('look here', term_getline(buf, 1))
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
@@ -921,7 +921,7 @@ undo_write(bufinfo_T *bi, char_u *ptr, size_t len)
|
||||
static int
|
||||
undo_flush(bufinfo_T *bi)
|
||||
{
|
||||
if (bi->bi_buffer != NULL && bi->bi_used > 0)
|
||||
if (bi->bi_buffer != NULL && bi->bi_state != NULL && bi->bi_used > 0)
|
||||
{
|
||||
crypt_encode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_used);
|
||||
if (fwrite(bi->bi_buffer, bi->bi_used, (size_t)1, bi->bi_fp) != 1)
|
||||
|
||||
@@ -769,6 +769,76 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1010,
|
||||
/**/
|
||||
1009,
|
||||
/**/
|
||||
1008,
|
||||
/**/
|
||||
1007,
|
||||
/**/
|
||||
1006,
|
||||
/**/
|
||||
1005,
|
||||
/**/
|
||||
1004,
|
||||
/**/
|
||||
1003,
|
||||
/**/
|
||||
1002,
|
||||
/**/
|
||||
1001,
|
||||
/**/
|
||||
1000,
|
||||
/**/
|
||||
999,
|
||||
/**/
|
||||
998,
|
||||
/**/
|
||||
997,
|
||||
/**/
|
||||
996,
|
||||
/**/
|
||||
995,
|
||||
/**/
|
||||
994,
|
||||
/**/
|
||||
993,
|
||||
/**/
|
||||
992,
|
||||
/**/
|
||||
991,
|
||||
/**/
|
||||
990,
|
||||
/**/
|
||||
989,
|
||||
/**/
|
||||
988,
|
||||
/**/
|
||||
987,
|
||||
/**/
|
||||
986,
|
||||
/**/
|
||||
985,
|
||||
/**/
|
||||
984,
|
||||
/**/
|
||||
983,
|
||||
/**/
|
||||
982,
|
||||
/**/
|
||||
981,
|
||||
/**/
|
||||
980,
|
||||
/**/
|
||||
979,
|
||||
/**/
|
||||
978,
|
||||
/**/
|
||||
977,
|
||||
/**/
|
||||
976,
|
||||
/**/
|
||||
975,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user