mirror of
https://github.com/zoriya/vim.git
synced 2025-12-18 13:15:21 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58f60ca2fc | ||
|
|
6d721c7e10 | ||
|
|
de318c5c35 | ||
|
|
369b6f57c4 | ||
|
|
97d62d4321 | ||
|
|
c011a3d083 | ||
|
|
a9d23c2087 | ||
|
|
e32bbded64 | ||
|
|
1b9750d805 | ||
|
|
42b8d916c7 | ||
|
|
4f391796b7 | ||
|
|
810f9c361c | ||
|
|
296b1f28ca | ||
|
|
9506cad7a1 | ||
|
|
fe6ce331d9 | ||
|
|
5869cf060e | ||
|
|
fad609d067 | ||
|
|
2b7bc567b9 | ||
|
|
7173b47958 | ||
|
|
e47683a091 | ||
|
|
519d7785f4 |
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.0. Last change: 2016 Sep 27
|
||||
*autocmd.txt* For Vim version 8.0. Last change: 2017 Jan 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -33,7 +33,7 @@ files matching *.c. You can also use autocommands to implement advanced
|
||||
features, such as editing compressed files (see |gzip-example|). The usual
|
||||
place to put autocommands is in your .vimrc or .exrc file.
|
||||
|
||||
*E203* *E204* *E143* *E855*
|
||||
*E203* *E204* *E143* *E855* *E937*
|
||||
WARNING: Using autocommands is very powerful, and may lead to unexpected side
|
||||
effects. Be careful not to destroy your text.
|
||||
- It's a good idea to do some testing on an expendable copy of a file first.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Jan 08
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Jan 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -5256,6 +5256,7 @@ json_decode({string}) *json_decode()*
|
||||
- A trailing comma in an array and object is ignored.
|
||||
- More floating point numbers are recognized, e.g. "1." for
|
||||
"1.0".
|
||||
However, a duplicate key in an object is not allowed. *E938*
|
||||
The result must be a valid Vim type:
|
||||
- An empty object member name is not allowed.
|
||||
- Duplicate object member names are not allowed.
|
||||
@@ -7249,7 +7250,7 @@ strcharpart({src}, {start}[, {len}]) *strcharpart()*
|
||||
Like |strpart()| but using character index and length instead
|
||||
of byte index and length.
|
||||
When a character index is used where a character does not
|
||||
exist it is assumed to be one byte. For example: >
|
||||
exist it is assumed to be one character. For example: >
|
||||
strcharpart('abc', -1, 2)
|
||||
< results in 'a'.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Jan 02
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Jan 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -5144,7 +5144,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi} *E21*
|
||||
When off the buffer contents cannot be changed. The 'fileformat' and
|
||||
'fileencoding' options also can't be changed.
|
||||
Can be reset with the |-M| command line argument.
|
||||
Can be reset on startup with the |-M| command line argument.
|
||||
|
||||
*'modified'* *'mod'* *'nomodified'* *'nomod'*
|
||||
'modified' 'mod' boolean (default off)
|
||||
@@ -5809,6 +5809,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
buffer, unless the 'Z' flag is in 'cpoptions'.
|
||||
{not in Vi:} When using the ":view" command the 'readonly' option is
|
||||
set for the newly edited buffer.
|
||||
See 'modifiable' for disallowing changes to the buffer.
|
||||
|
||||
*'redrawtime'* *'rdt'*
|
||||
'redrawtime' 'rdt' number (default 2000)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.0. Last change: 2016 Nov 24
|
||||
*starting.txt* For Vim version 8.0. Last change: 2017 Jan 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -230,6 +230,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
the executable "view" has the same effect as the -R argument.
|
||||
The 'updatecount' option will be set to 10000, meaning that
|
||||
the swap file will not be updated automatically very often.
|
||||
See |-M| for disallowing modifications.
|
||||
|
||||
*-m*
|
||||
-m Modifications not allowed to be written. The 'write' option
|
||||
@@ -1219,7 +1220,7 @@ There are several ways to exit Vim:
|
||||
- Use `:cquit`. Also when there are changes.
|
||||
|
||||
When using `:cquit` or when there was an error message Vim exits with exit
|
||||
code 1. Errors can be avoided by using `:silent!`.
|
||||
code 1. Errors can be avoided by using `:silent!` or with `:catch`.
|
||||
|
||||
==============================================================================
|
||||
8. Saving settings *save-settings*
|
||||
|
||||
@@ -4488,6 +4488,8 @@ E933 eval.txt /*E933*
|
||||
E934 sign.txt /*E934*
|
||||
E935 eval.txt /*E935*
|
||||
E936 autocmd.txt /*E936*
|
||||
E937 autocmd.txt /*E937*
|
||||
E938 eval.txt /*E938*
|
||||
E94 windows.txt /*E94*
|
||||
E95 message.txt /*E95*
|
||||
E96 diff.txt /*E96*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Jan 09
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Jan 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -35,6 +35,8 @@ entered there will not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
get_syn_options() does not respect skip in else part. (Zyx)
|
||||
|
||||
+channel:
|
||||
- Try out background make plugin:
|
||||
https://github.com/AndrewVos/vim-make-background
|
||||
@@ -120,28 +122,10 @@ What if there is an invalid character?
|
||||
|
||||
Include rust files. (Klabnik, #1356)
|
||||
|
||||
More float tests. (Dominique, #1364)
|
||||
|
||||
Patch to avoid ubsan warning for integer overflow. (Dominique, 2016 Dec 26)
|
||||
|
||||
Bug: Json with same key should not give internal error. (Lcd, 2016 Oct 26)
|
||||
Make dict_add give a duplicate key error.
|
||||
|
||||
Patch to make str2nr and str2float work with signed values.
|
||||
(Lemonbody, 2016 Dec 18, #1332)
|
||||
|
||||
Should json_encode()/json_decode() restrict recursiveness?
|
||||
Or avoid recursiveness.
|
||||
|
||||
Patch to fix UBSan error. Is this actually needed?
|
||||
(Yegappan, 2016 Dec 18)
|
||||
|
||||
Allow using json with empty key? Dict already has it.
|
||||
|
||||
Json string with trailing \u should be an error. (Lcd)
|
||||
|
||||
Patch to reset ex_exitvalue after catch. (Christian Brabandt, 2016 Oct 23)
|
||||
|
||||
Patch to deal with changed configure events in GTK 3. (Jan Alexander Steffens,
|
||||
2016 Oct 23 #1193)
|
||||
Remarks from nuko8, 2016 Nov 2.
|
||||
@@ -159,6 +143,9 @@ Patch for :pyx, run python commands depending on the supported version.
|
||||
Patch to avoid warnings for overflow. (Mike Williams, 2016 Dec 16)
|
||||
Update Dec 19.
|
||||
|
||||
When an item in the quickfix list has a file name that does not exist, behave
|
||||
like the item was not a match for :cnext.
|
||||
|
||||
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
|
||||
Also get E749 on exit.
|
||||
Another example in #1309
|
||||
@@ -219,9 +206,6 @@ Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
|
||||
Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
|
||||
#1053) With patch, does it work?
|
||||
|
||||
Patch to make finding duplicate tags much faster, using a hashtab. (James
|
||||
McCoy, 2016 Sept 14, #1046) Should work now. Updated Nov 12.
|
||||
>
|
||||
Use ADDR_OTHER instead of ADDR_LINES for many more commands.
|
||||
Add tests for using number larger than number of lines in buffer.
|
||||
|
||||
@@ -251,6 +235,9 @@ Patch to make it possible to extend a list with itself.
|
||||
|
||||
Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
|
||||
|
||||
Patch to add new regexp classes :ident:, :keyword:, :fname:.
|
||||
(ichizok, 2016 Jan 12, #1373)
|
||||
|
||||
Patch to add trim() function. (Bukn, 2016 Nov 25, #1280)
|
||||
|
||||
Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275)
|
||||
@@ -475,6 +462,9 @@ Should use /usr/local/share/applications or /usr/share/applications.
|
||||
Or use $XDG_DATA_DIRS.
|
||||
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
|
||||
|
||||
Test object i{ and it do not behave the same. #1379
|
||||
Do not include the linebreak at the start?
|
||||
|
||||
Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Added tests (James McCoy, 2016 Aug 3). Still needs more work.
|
||||
@@ -972,11 +962,6 @@ highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4)
|
||||
|
||||
Two highlighting bugs. (ZyX, 2013 Aug 18)
|
||||
|
||||
Patch to add the bufferlist() function. (Yegappan Lakshmanan, 2013 May 5)
|
||||
May 17: with winlist() and tabpagelist().
|
||||
May 19: with local variables.
|
||||
May 28: with options
|
||||
|
||||
Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
|
||||
28) With tests: Oct 9.
|
||||
|
||||
@@ -1219,8 +1204,6 @@ right type.
|
||||
string() can't parse back "inf" and "nan". Fix documentation or fix code?
|
||||
(ZyX, 2010 Aug 23)
|
||||
|
||||
Make 'formatprg' global-local. (Sung Pae)
|
||||
|
||||
When doing "redir => s:foo" in a script and then "redir END" somewhere else
|
||||
(e.g. in a function) it can't find s:foo.
|
||||
When a script contains "redir => s:foo" but doesn't end redirection, a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.0. Last change: 2016 Dec 10
|
||||
*version8.txt* For Vim version 8.0. Last change: 2017 Jan 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -230,6 +230,7 @@ Ex commands: ~
|
||||
Ex command modifiers: ~
|
||||
|
||||
|:keeppatterns| following command keeps search pattern history
|
||||
|<mods>| supply command modifiers to user defined commands
|
||||
|
||||
|
||||
New and extended functions: ~
|
||||
|
||||
@@ -676,8 +676,14 @@ au BufNewFile,BufRead *.dtd setf dtd
|
||||
" DTS/DSTI (device tree files)
|
||||
au BufNewFile,BufRead *.dts,*.dtsi setf dts
|
||||
|
||||
" EDIF (*.edf,*.edif,*.edn,*.edo)
|
||||
au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif
|
||||
" EDIF (*.edf,*.edif,*.edn,*.edo) or edn
|
||||
au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif
|
||||
au BufNewFile,BufRead *.edn
|
||||
\ if getline(1) =~ '^\s*(\s*edif\>' |
|
||||
\ setf edif |
|
||||
\ else |
|
||||
\ setf clojure |
|
||||
\ endif
|
||||
|
||||
" EditorConfig (close enough to dosini)
|
||||
au BufNewFile,BufRead .editorconfig setf dosini
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
" Nikolai Weibull (Add CSS2 support)
|
||||
" Maintainer: Jules Wang <w.jq0722@gmail.com>
|
||||
" URL: https://github.com/JulesWang/css.vim
|
||||
" Last Change: 2015 Apr.17
|
||||
" Last Change: 2017 Jan 14
|
||||
" cssClassName updated by Ryuichi Hayashida Jan 2016
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if !exists("main_syntax")
|
||||
@@ -56,7 +57,7 @@ syn match cssSelectorOp2 "[~|^$*]\?=" contained
|
||||
syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
|
||||
|
||||
" .class and #id
|
||||
syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+" contains=cssClassNameDot
|
||||
syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
|
||||
syn match cssClassNameDot contained '\.'
|
||||
|
||||
try
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2016 Aug 30
|
||||
" Last Change: 2016 Nov 12
|
||||
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -21,7 +21,7 @@ let binNMU='binary-only=yes'
|
||||
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
|
||||
exe 'syn match debchangelogFirstKV contained "; \('.urgency.'\|'.binNMU.'\)"'
|
||||
exe 'syn match debchangelogOtherKV contained ", \('.urgency.'\|'.binNMU.'\)"'
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
syn match debchangelogVersion contained "(.\{-})"
|
||||
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
|
||||
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
|
||||
|
||||
@@ -38,7 +38,7 @@ unlet s:kernels s:archs s:pairs
|
||||
syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)"
|
||||
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
|
||||
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
|
||||
syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
|
||||
syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|javascript|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)"
|
||||
syn match debcontrolPackageType contained "u\?deb"
|
||||
syn match debcontrolVariable contained "\${.\{-}}"
|
||||
syn match debcontrolDmUpload contained "\cyes"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2016 Sep 27
|
||||
" Last Change: 2016 Nov 12
|
||||
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -25,7 +25,7 @@ let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
||||
\ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'precise', 'trusty', 'xenial', 'yakkety', 'devel'
|
||||
\ 'precise', 'trusty', 'xenial', 'yakkety', 'zesty', 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||
|
||||
@@ -123,7 +123,7 @@ NOTE : En avan
|
||||
Le<4C>on 1.5 : <20>DITION DE TEXTE - AJOUTER
|
||||
|
||||
|
||||
** Appuyez A pour ajouter du text. **
|
||||
** Appuyez A pour ajouter du texte. **
|
||||
|
||||
1. D<>placez le curseur sur la premi<6D>re ligne ci-dessous marqu<71>e --->.
|
||||
Peu importe sur quel caract<63>re se trouve le curseur sur cette ligne.
|
||||
@@ -574,7 +574,7 @@ NOTE : Quand la recherche atteint la fin du fichier, elle reprend au d
|
||||
|
||||
2. Puis tapez le caract<63>re % .
|
||||
|
||||
3. Le curseur se d<>placera sur la parenth<74>se out crochet correspondant.
|
||||
3. Le curseur se d<>placera sur la parenth<74>se ou crochet correspondant.
|
||||
|
||||
4. Tapez % pour replacer le curseur sur la parenth<74>se ou crochet
|
||||
correspondant.
|
||||
@@ -854,17 +854,17 @@ NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les
|
||||
5. Tapez p pour coller le texte. Puis tapez : un second <<3C>chap> .
|
||||
|
||||
6. Utilisez le mode Visuel pour s<>lectionner "<22>l<EFBFBD>ment", copiez-le avec y ,
|
||||
d<>placez-vous <20> la fin de la ligne suivant avec j$ et collez le texte
|
||||
d<>placez-vous <20> la fin de la ligne suivante avec j$ et collez le texte
|
||||
<20> cet endroit avec p .
|
||||
|
||||
---> a) ceci est le premier <20>l<EFBFBD>ment.
|
||||
b)
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Le<4C>on 6.4 : R<>GLAGE DES OPTIONS
|
||||
Le<4C>on 6.5 : R<>GLAGE DES OPTIONS
|
||||
|
||||
|
||||
** R<>glons une option afin que la recherche et la substitution ignore la
|
||||
** R<>glons une option afin que la recherche et la substitution ignorent la
|
||||
casse des caract<63>res. **
|
||||
|
||||
1. Recherchez 'ignore' en tapant : /ignore <Entr<74>e>
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le compl
|
||||
Derni<6E>res mises <20> jour par Dominique Pell<6C>.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2016 Nov 08
|
||||
Last Change : 2017 Jan 16
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -123,7 +123,7 @@ NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par
|
||||
Leçon 1.5 : ÉDITION DE TEXTE - AJOUTER
|
||||
|
||||
|
||||
** Appuyez A pour ajouter du text. **
|
||||
** Appuyez A pour ajouter du texte. **
|
||||
|
||||
1. Déplacez le curseur sur la première ligne ci-dessous marquée --->.
|
||||
Peu importe sur quel caractère se trouve le curseur sur cette ligne.
|
||||
@@ -574,7 +574,7 @@ NOTE : Quand la recherche atteint la fin du fichier, elle reprend au début
|
||||
|
||||
2. Puis tapez le caractère % .
|
||||
|
||||
3. Le curseur se déplacera sur la parenthèse out crochet correspondant.
|
||||
3. Le curseur se déplacera sur la parenthèse ou crochet correspondant.
|
||||
|
||||
4. Tapez % pour replacer le curseur sur la parenthèse ou crochet
|
||||
correspondant.
|
||||
@@ -854,17 +854,17 @@ NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les
|
||||
5. Tapez p pour coller le texte. Puis tapez : un second <Échap> .
|
||||
|
||||
6. Utilisez le mode Visuel pour sélectionner "élément", copiez-le avec y ,
|
||||
déplacez-vous à la fin de la ligne suivant avec j$ et collez le texte
|
||||
déplacez-vous à la fin de la ligne suivante avec j$ et collez le texte
|
||||
à cet endroit avec p .
|
||||
|
||||
---> a) ceci est le premier élément.
|
||||
b)
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Leçon 6.4 : RÉGLAGE DES OPTIONS
|
||||
Leçon 6.5 : RÉGLAGE DES OPTIONS
|
||||
|
||||
|
||||
** Réglons une option afin que la recherche et la substitution ignore la
|
||||
** Réglons une option afin que la recherche et la substitution ignorent la
|
||||
casse des caractères. **
|
||||
|
||||
1. Recherchez 'ignore' en tapant : /ignore <Entrée>
|
||||
@@ -1034,5 +1034,5 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
|
||||
Dernières mises à jour par Dominique Pellé.
|
||||
|
||||
E-mail : dominique.pelle@gmail.com
|
||||
Last Change : 2016 Nov 08
|
||||
Last Change : 2017 Jan 16
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -2147,6 +2147,7 @@ test_arglist \
|
||||
test_partial \
|
||||
test_perl \
|
||||
test_popup \
|
||||
test_profile \
|
||||
test_quickfix \
|
||||
test_regexp_latin \
|
||||
test_regexp_utf8 \
|
||||
|
||||
@@ -710,7 +710,14 @@ channel_open(
|
||||
channel_free(channel);
|
||||
return NULL;
|
||||
}
|
||||
memcpy((char *)&server.sin_addr, host->h_addr, host->h_length);
|
||||
{
|
||||
char *p;
|
||||
|
||||
/* When using host->h_addr directly ubsan warns for it to not be
|
||||
* aligned. First copy the pointer to aviod that. */
|
||||
memcpy(&p, &host->h_addr, sizeof(p));
|
||||
memcpy((char *)&server.sin_addr, p, host->h_length);
|
||||
}
|
||||
|
||||
/* On Mac and Solaris a zero timeout almost never works. At least wait
|
||||
* one millisecond. Let's do it for all systems, because we don't know why
|
||||
|
||||
23
src/eval.c
23
src/eval.c
@@ -9256,6 +9256,8 @@ fill_assert_error(
|
||||
{
|
||||
if (atype == ASSERT_MATCH || atype == ASSERT_NOTMATCH)
|
||||
ga_concat(gap, (char_u *)"Pattern ");
|
||||
else if (atype == ASSERT_NOTEQUAL)
|
||||
ga_concat(gap, (char_u *)"Expected not equal to ");
|
||||
else
|
||||
ga_concat(gap, (char_u *)"Expected ");
|
||||
if (exp_str == NULL)
|
||||
@@ -9265,16 +9267,17 @@ fill_assert_error(
|
||||
}
|
||||
else
|
||||
ga_concat_esc(gap, exp_str);
|
||||
if (atype == ASSERT_MATCH)
|
||||
ga_concat(gap, (char_u *)" does not match ");
|
||||
else if (atype == ASSERT_NOTMATCH)
|
||||
ga_concat(gap, (char_u *)" does match ");
|
||||
else if (atype == ASSERT_NOTEQUAL)
|
||||
ga_concat(gap, (char_u *)" differs from ");
|
||||
else
|
||||
ga_concat(gap, (char_u *)" but got ");
|
||||
ga_concat_esc(gap, tv2string(got_tv, &tofree, numbuf, 0));
|
||||
vim_free(tofree);
|
||||
if (atype != ASSERT_NOTEQUAL)
|
||||
{
|
||||
if (atype == ASSERT_MATCH)
|
||||
ga_concat(gap, (char_u *)" does not match ");
|
||||
else if (atype == ASSERT_NOTMATCH)
|
||||
ga_concat(gap, (char_u *)" does match ");
|
||||
else
|
||||
ga_concat(gap, (char_u *)" but got ");
|
||||
ga_concat_esc(gap, tv2string(got_tv, &tofree, numbuf, 0));
|
||||
vim_free(tofree);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6859,10 +6859,8 @@ f_len(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
}
|
||||
|
||||
static void libcall_common(typval_T *argvars, typval_T *rettv, int type);
|
||||
|
||||
static void
|
||||
libcall_common(typval_T *argvars, typval_T *rettv, int type)
|
||||
libcall_common(typval_T *argvars UNUSED, typval_T *rettv, int type)
|
||||
{
|
||||
#ifdef FEAT_LIBCALL
|
||||
char_u *string_in;
|
||||
|
||||
@@ -70,7 +70,6 @@ hash_init(hashtab_T *ht)
|
||||
ht->ht_mask = HT_INIT_SIZE - 1;
|
||||
}
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) || defined(PROTO)
|
||||
/*
|
||||
* Free the array of a hash table. Does not free the items it contains!
|
||||
* If "ht" is not freed then you should call hash_init() next!
|
||||
@@ -104,7 +103,6 @@ hash_clear_all(hashtab_T *ht, int off)
|
||||
}
|
||||
hash_clear(ht);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Find "key" in hashtable "ht". "key" must not be NULL.
|
||||
|
||||
@@ -207,7 +207,7 @@ set_context_in_cscope_cmd(
|
||||
static void
|
||||
do_cscope_general(
|
||||
exarg_T *eap,
|
||||
int make_split) /* whether to split window */
|
||||
int make_split UNUSED) /* whether to split window */
|
||||
{
|
||||
cscmd_T *cmdp;
|
||||
|
||||
|
||||
@@ -303,6 +303,7 @@ static void ruby_vim_init(void);
|
||||
# define ruby_init_loadpath dll_ruby_init_loadpath
|
||||
# ifdef WIN3264
|
||||
# define NtInitialize dll_NtInitialize
|
||||
# define ruby_sysinit dll_ruby_sysinit
|
||||
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
||||
# define rb_w32_snprintf dll_rb_w32_snprintf
|
||||
# endif
|
||||
@@ -405,6 +406,7 @@ static void (*dll_ruby_init) (void);
|
||||
static void (*dll_ruby_init_loadpath) (void);
|
||||
# ifdef WIN3264
|
||||
static void (*dll_NtInitialize) (int*, char***);
|
||||
static void (*dll_ruby_sysinit) (int*, char***);
|
||||
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
||||
static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
|
||||
# endif
|
||||
@@ -594,13 +596,11 @@ static struct
|
||||
{"ruby_init", (RUBY_PROC*)&dll_ruby_init},
|
||||
{"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
|
||||
# ifdef WIN3264
|
||||
{
|
||||
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19
|
||||
"NtInitialize",
|
||||
{"NtInitialize", (RUBY_PROC*)&dll_NtInitialize},
|
||||
# else
|
||||
"ruby_sysinit",
|
||||
{"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit},
|
||||
# endif
|
||||
(RUBY_PROC*)&dll_NtInitialize},
|
||||
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
||||
{"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
|
||||
# endif
|
||||
@@ -862,7 +862,11 @@ static int ensure_ruby_initialized(void)
|
||||
int argc = 1;
|
||||
char *argv[] = {"gvim.exe"};
|
||||
char **argvp = argv;
|
||||
# ifdef RUBY19_OR_LATER
|
||||
ruby_sysinit(&argc, &argvp);
|
||||
# else
|
||||
NtInitialize(&argc, &argvp);
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
#if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
|
||||
|
||||
@@ -578,8 +578,6 @@ emsg(char_u *s)
|
||||
return TRUE;
|
||||
|
||||
called_emsg = TRUE;
|
||||
if (emsg_silent == 0)
|
||||
ex_exitval = 1;
|
||||
|
||||
/*
|
||||
* If "emsg_severe" is TRUE: When an error exception is to be thrown,
|
||||
@@ -642,6 +640,8 @@ emsg(char_u *s)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ex_exitval = 1;
|
||||
|
||||
/* Reset msg_silent, an error causes messages to be switched back on. */
|
||||
msg_silent = 0;
|
||||
cmd_silent = FALSE;
|
||||
|
||||
@@ -2841,6 +2841,10 @@ do_check_cursorbind(void)
|
||||
restart_edit_save = restart_edit;
|
||||
restart_edit = TRUE;
|
||||
check_cursor();
|
||||
# ifdef FEAT_SYN_HL
|
||||
if (curwin->w_p_cul || curwin->w_p_cuc)
|
||||
validate_cursor();
|
||||
# endif
|
||||
restart_edit = restart_edit_save;
|
||||
# ifdef FEAT_MBYTE
|
||||
/* Correct cursor for multi-byte character. */
|
||||
|
||||
@@ -6918,7 +6918,7 @@ mch_libcall(
|
||||
if (argstring != NULL)
|
||||
{
|
||||
# if defined(USE_DLOPEN)
|
||||
ProcAdd = (STRPROCSTR)dlsym(hinstLib, (const char *)funcname);
|
||||
*(void **)(&ProcAdd) = dlsym(hinstLib, (const char *)funcname);
|
||||
dlerr = (char *)dlerror();
|
||||
# else
|
||||
if (shl_findsym(&hinstLib, (const char *)funcname,
|
||||
@@ -6940,7 +6940,7 @@ mch_libcall(
|
||||
else
|
||||
{
|
||||
# if defined(USE_DLOPEN)
|
||||
ProcAddI = (INTPROCSTR)dlsym(hinstLib, (const char *)funcname);
|
||||
*(void **)(&ProcAddI) = dlsym(hinstLib, (const char *)funcname);
|
||||
dlerr = (char *)dlerror();
|
||||
# else
|
||||
if (shl_findsym(&hinstLib, (const char *)funcname,
|
||||
|
||||
54
src/po/eo.po
54
src/po/eo.po
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# UNUA TRADUKISTO Dominique PELLE <dominique.pelle ĉe gmail.com>
|
||||
# PROVLEGANTO(J) Felipe CASTRO <fefcas ĉe gmail.com>
|
||||
# Antono MECHELYNCK <antoine.mechelynck ĉe skynet.be>
|
||||
# Antono MECHELYNCK <antoine.mechelynck ĉe gmail.com>
|
||||
# Yves NEVELSTEEN
|
||||
#
|
||||
# Uzitaj vortaroj kaj fakvortaroj:
|
||||
@@ -23,8 +23,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Vim(Esperanto)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-08-26 20:54+0200\n"
|
||||
"PO-Revision-Date: 2016-08-26 20:30+0200\n"
|
||||
"POT-Creation-Date: 2017-01-16 00:30+0100\n"
|
||||
"PO-Revision-Date: 2017-01-16 01:14+0100\n"
|
||||
"Last-Translator: Dominique PELLÉ <dominique.pelle@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: eo\n"
|
||||
@@ -66,6 +66,9 @@ msgstr "E83: Ne eblas disponigi bufron, nun uzas alian..."
|
||||
msgid "E931: Buffer cannot be registered"
|
||||
msgstr "E931: Bufro ne povas esti registrita"
|
||||
|
||||
msgid "E937: Attempt to delete a buffer that is in use"
|
||||
msgstr "E937: Provo de forviŝo de bufro, kiu estas uzanta"
|
||||
|
||||
msgid "E515: No buffers were unloaded"
|
||||
msgstr "E515: Neniu bufro estis malŝargita"
|
||||
|
||||
@@ -269,7 +272,7 @@ msgid "E918: buffer must be loaded: %s"
|
||||
msgstr "E918: bufro devas esti ŝargita: %s"
|
||||
|
||||
msgid "E821: File is encrypted with unknown method"
|
||||
msgstr "E821: Dosiero estas ĉifrata per nekonata metodo"
|
||||
msgstr "E821: Dosiero estas ĉifrita per nekonata metodo"
|
||||
|
||||
msgid "Warning: Using a weak encryption method; see :help 'cm'"
|
||||
msgstr "Averto: uzo de malfortika ĉifrada metodo; vidu :help 'cm'"
|
||||
@@ -1963,6 +1966,9 @@ msgstr "E462: Ne eblis prepari por reŝargi \"%s\""
|
||||
msgid "E321: Could not reload \"%s\""
|
||||
msgstr "E321: Ne eblis reŝargi \"%s\""
|
||||
|
||||
msgid "--Deleted--"
|
||||
msgstr "--Forviŝita--"
|
||||
|
||||
#, c-format
|
||||
msgid "auto-removing autocommand: %s <buffer=%d>"
|
||||
msgstr "aŭto-forviŝas aŭtokomandon: %s <bufro=%d>"
|
||||
@@ -1972,12 +1978,12 @@ msgstr "aŭto-forviŝas aŭtokomandon: %s <bufro=%d>"
|
||||
msgid "E367: No such group: \"%s\""
|
||||
msgstr "E367: Ne ekzistas tia grupo: \"%s\""
|
||||
|
||||
msgid "E936: Cannot delete the current group"
|
||||
msgstr "E936: Ne eblas forviŝi la aktualan grupon"
|
||||
|
||||
msgid "W19: Deleting augroup that is still in use"
|
||||
msgstr "W19: Forviŝo de augroup kiu estas ankoraŭ uzata"
|
||||
|
||||
msgid "--Deleted--"
|
||||
msgstr "--Forviŝita--"
|
||||
|
||||
#, c-format
|
||||
msgid "E215: Illegal character after *: %s"
|
||||
msgstr "E215: Nevalida signo post *: %s"
|
||||
@@ -2834,6 +2840,10 @@ msgid "E251: VIM instance registry property is badly formed. Deleted!"
|
||||
msgstr ""
|
||||
"E251: Ecoj de registro de apero de VIM estas nevalide formata. Forviŝita!"
|
||||
|
||||
#, c-format
|
||||
msgid "E938: Duplicate key in JSON: \"%s\""
|
||||
msgstr "E938: Ripetita ŝlosilo en JSON: \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid "E696: Missing comma in List: %s"
|
||||
msgstr "E696: Mankas komo en Listo: %s"
|
||||
@@ -3058,6 +3068,10 @@ msgid "--not-a-term\t\tSkip warning for input/output not being a terminal"
|
||||
msgstr ""
|
||||
"--not-a-term\t\tPreterpasi averton por enigo/eligo, kiu ne estas terminalo"
|
||||
|
||||
msgid "--ttyfail\t\tExit if input or output is not a terminal"
|
||||
msgstr ""
|
||||
"--ttyfail\t\tEliri se le eniro aŭ eliro ne estas terminalo"
|
||||
|
||||
msgid "-u <vimrc>\t\tUse <vimrc> instead of any .vimrc"
|
||||
msgstr "-u <vimrc>\t\tUzi <vimrc> anstataŭ iun ajn .vimrc"
|
||||
|
||||
@@ -4454,9 +4468,6 @@ msgstr "ERARO DE ENIGO/ELIGO"
|
||||
msgid "Message"
|
||||
msgstr "Mesaĝo"
|
||||
|
||||
msgid "'columns' is not 80, cannot execute external commands"
|
||||
msgstr "'columns' ne estas 80, ne eblas plenumi eksterajn komandojn"
|
||||
|
||||
msgid "E237: Printer selection failed"
|
||||
msgstr "E237: Elekto de presilo malsukcesis"
|
||||
|
||||
@@ -5998,14 +6009,6 @@ msgstr "E133: \":return\" ekster funkcio"
|
||||
msgid "E107: Missing parentheses: %s"
|
||||
msgstr "E107: Mankas krampoj: %s"
|
||||
|
||||
#. Only MS VC 4.1 and earlier can do Win32s
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 16/32-bit GUI version"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Grafika versio MS-Vindozo 16/32-bitoj"
|
||||
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 64-bit GUI version"
|
||||
@@ -6305,13 +6308,6 @@ msgstr "tajpu :help register<Enenklavo> por pliaj informoj "
|
||||
msgid "menu Help->Sponsor/Register for information "
|
||||
msgstr "menuo Helpo->Subteni/Registri por pliaj informoj "
|
||||
|
||||
msgid "WARNING: Windows 95/98/ME detected"
|
||||
msgstr "AVERTO: Trovis Vindozon 95/98/ME"
|
||||
|
||||
# DP: atentu al la spacetoj: ĉiuj ĉenoj devas havi la saman longon
|
||||
msgid "type :help windows95<Enter> for info on this"
|
||||
msgstr "tajpu :help windows95<Enenklavo> por pliaj informoj "
|
||||
|
||||
msgid "Already only one window"
|
||||
msgstr "Jam nur unu fenestro"
|
||||
|
||||
@@ -6465,6 +6461,10 @@ msgstr "E236: La tiparo \"%s\" ne estas egallarĝa"
|
||||
msgid "E473: Internal error"
|
||||
msgstr "E473: Interna eraro"
|
||||
|
||||
#, c-format
|
||||
msgid "E685: Internal error: %s"
|
||||
msgstr "E685: Interna eraro: %s"
|
||||
|
||||
msgid "Interrupted"
|
||||
msgstr "Interrompita"
|
||||
|
||||
@@ -6745,10 +6745,6 @@ msgstr "E463: Regiono estas gardita, ne eblas ŝanĝi"
|
||||
msgid "E744: NetBeans does not allow changes in read-only files"
|
||||
msgstr "E744: NetBeans ne permesas ŝanĝojn en nurlegeblaj dosieroj"
|
||||
|
||||
#, c-format
|
||||
msgid "E685: Internal error: %s"
|
||||
msgstr "E685: Interna eraro: %s"
|
||||
|
||||
msgid "E363: pattern uses more memory than 'maxmempattern'"
|
||||
msgstr "E363: ŝablono uzas pli da memoro ol 'maxmempattern'"
|
||||
|
||||
|
||||
57
src/po/fr.po
57
src/po/fr.po
@@ -6,7 +6,7 @@
|
||||
# FIRST AUTHOR DindinX <David.Odin@bigfoot.com> 2000.
|
||||
# SECOND AUTHOR Adrien Beau <version.francaise@free.fr> 2002, 2003.
|
||||
# THIRD AUTHOR David Blanchet <david.blanchet@free.fr> 2006, 2008.
|
||||
# FOURTH AUTHOR Dominique Pell<6C> <dominique.pelle@gmail.com> 2008, 2016.
|
||||
# FOURTH AUTHOR Dominique Pell<6C> <dominique.pelle@gmail.com> 2008, 2017.
|
||||
#
|
||||
# Latest translation available at:
|
||||
# http://dominique.pelle.free.fr/vim-fr.php
|
||||
@@ -15,8 +15,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Vim(Fran<61>ais)\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-08-26 20:54+0200\n"
|
||||
"PO-Revision-Date: 2016-08-26 20:34+0200\n"
|
||||
"POT-Creation-Date: 2017-01-16 00:30+0100\n"
|
||||
"PO-Revision-Date: 2017-01-16 00:51+0100\n"
|
||||
"Last-Translator: Dominique Pell<6C> <dominique.pelle@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\n"
|
||||
@@ -63,6 +63,9 @@ msgstr ""
|
||||
msgid "E931: Buffer cannot be registered"
|
||||
msgstr "E931: Le tampon ne peut pas <20>tre enregistr<74>"
|
||||
|
||||
msgid "E937: Attempt to delete a buffer that is in use"
|
||||
msgstr "E937: Tentative de suppression d'un tampon en cours d'utilisation"
|
||||
|
||||
msgid "E515: No buffers were unloaded"
|
||||
msgstr "E515: Aucun tampon n'a <20>t<EFBFBD> d<>charg<72>"
|
||||
|
||||
@@ -242,7 +245,7 @@ msgid "E898: socket() in channel_open()"
|
||||
msgstr "E898: socket() dans channel_open()"
|
||||
|
||||
msgid "E903: received command with non-string argument"
|
||||
msgstr "E903: commande re<72>ue avec une argument qui n'est pas une cha<68>ne"
|
||||
msgstr "E903: commande re<72>ue avec un argument qui n'est pas une cha<68>ne"
|
||||
|
||||
msgid "E904: last argument for expr/call must be a number"
|
||||
msgstr "E904: le dernier argument de expr/call doit <20>tre un nombre"
|
||||
@@ -2150,6 +2153,9 @@ msgstr "E462: Impossible de pr
|
||||
msgid "E321: Could not reload \"%s\""
|
||||
msgstr "E321: Impossible de recharger \"%s\""
|
||||
|
||||
msgid "--Deleted--"
|
||||
msgstr "--Effac<61>--"
|
||||
|
||||
#, c-format
|
||||
msgid "auto-removing autocommand: %s <buffer=%d>"
|
||||
msgstr "Autocommandes marqu<71>es pour auto-suppression : %s <tampon=%d>"
|
||||
@@ -2159,12 +2165,12 @@ msgstr "Autocommandes marqu
|
||||
msgid "E367: No such group: \"%s\""
|
||||
msgstr "E367: Aucun groupe \"%s\""
|
||||
|
||||
msgid "E936: Cannot delete the current group"
|
||||
msgstr "E936: Impossible de supprimer le groupe courant"
|
||||
|
||||
msgid "W19: Deleting augroup that is still in use"
|
||||
msgstr "W19: Effacement d'augroup toujours en usage"
|
||||
|
||||
msgid "--Deleted--"
|
||||
msgstr "--Effac<61>--"
|
||||
|
||||
#, c-format
|
||||
msgid "E215: Illegal character after *: %s"
|
||||
msgstr "E215: Caract<63>re non valide apr<70>s * : %s"
|
||||
@@ -2854,7 +2860,7 @@ msgid "invalid expression"
|
||||
msgstr "expression invalide"
|
||||
|
||||
msgid "expressions disabled at compile time"
|
||||
msgstr "expressions d<>sactiv<69>e lors de la compilation"
|
||||
msgstr "expressions d<>sactiv<69>es lors de la compilation"
|
||||
|
||||
msgid "hidden option"
|
||||
msgstr "option cach<63>e"
|
||||
@@ -3041,6 +3047,10 @@ msgstr "E573: Id utilis
|
||||
msgid "E251: VIM instance registry property is badly formed. Deleted!"
|
||||
msgstr "E251: Entr<74>e registre de l'instance de Vim mal format<61>e. Suppression !"
|
||||
|
||||
#, c-format
|
||||
msgid "E938: Duplicate key in JSON: \"%s\""
|
||||
msgstr "E938: Cl<43> dupliqu<71>e dans le document JSON : \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid "E696: Missing comma in List: %s"
|
||||
msgstr "E696: Il manque une virgule dans la Liste %s"
|
||||
@@ -3269,6 +3279,10 @@ msgid "--not-a-term\t\tSkip warning for input/output not being a terminal"
|
||||
msgstr ""
|
||||
"--no-a-term\t\tAucun avertissement si l'entr<74>e/sortie n'est pas un terminal"
|
||||
|
||||
msgid "--ttyfail\t\tExit if input or output is not a terminal"
|
||||
msgstr ""
|
||||
"--ttyfail\t\tQuitte si l'entr<74>e ou la sortie ne sont pas un terminal"
|
||||
|
||||
msgid "-u <vimrc>\t\tUse <vimrc> instead of any .vimrc"
|
||||
msgstr "-u <vimrc>\tUtiliser <vimrc> au lieu du vimrc habituel"
|
||||
|
||||
@@ -4682,9 +4696,6 @@ msgstr "ERREUR d'E/S"
|
||||
msgid "Message"
|
||||
msgstr "Message"
|
||||
|
||||
msgid "'columns' is not 80, cannot execute external commands"
|
||||
msgstr "'columns' ne vaut pas 80, impossible d'ex<65>cuter des commandes externes"
|
||||
|
||||
msgid "E237: Printer selection failed"
|
||||
msgstr "E237: La s<>lection de l'imprimante a <20>chou<6F>"
|
||||
|
||||
@@ -5625,7 +5636,7 @@ msgstr ""
|
||||
#. This should have been checked when generating the .spl
|
||||
#. * file.
|
||||
msgid "E783: duplicate char in MAP entry"
|
||||
msgstr "E783: caract<63>res dupliqu<71> dans l'entr<74>e MAP"
|
||||
msgstr "E783: caract<63>re dupliqu<71> dans l'entr<74>e MAP"
|
||||
|
||||
msgid "No Syntax items defined for this buffer"
|
||||
msgstr "Aucun <20>l<EFBFBD>ment de syntaxe d<>fini pour ce tampon"
|
||||
@@ -6264,14 +6275,6 @@ msgstr "E133: :return en dehors d'une fonction"
|
||||
msgid "E107: Missing parentheses: %s"
|
||||
msgstr "E107: Parenth<74>ses manquantes : %s"
|
||||
|
||||
#. Only MS VC 4.1 and earlier can do Win32s
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 16/32-bit GUI version"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Version graphique MS-Windows 16/32 bits"
|
||||
|
||||
msgid ""
|
||||
"\n"
|
||||
"MS-Windows 64-bit GUI version"
|
||||
@@ -6561,12 +6564,6 @@ msgstr "tapez :help register<Entr
|
||||
msgid "menu Help->Sponsor/Register for information "
|
||||
msgstr "menu Aide->Sponsor/Enregistrement pour plus d'info"
|
||||
|
||||
msgid "WARNING: Windows 95/98/ME detected"
|
||||
msgstr "ALERTE: Windows 95/98/ME d<>tect<63>"
|
||||
|
||||
msgid "type :help windows95<Enter> for info on this"
|
||||
msgstr "tapez :help windows95<Entr<74>e> pour plus d'information"
|
||||
|
||||
msgid "Already only one window"
|
||||
msgstr "Il n'y a d<>j<EFBFBD> plus qu'une fen<65>tre"
|
||||
|
||||
@@ -6727,6 +6724,10 @@ msgstr "E236: La police \"%s\" n'a pas une chasse (largeur) fixe"
|
||||
msgid "E473: Internal error"
|
||||
msgstr "E473: Erreur interne"
|
||||
|
||||
#, c-format
|
||||
msgid "E685: Internal error: %s"
|
||||
msgstr "E685: Erreur interne : %s"
|
||||
|
||||
msgid "Interrupted"
|
||||
msgstr "Interrompu"
|
||||
|
||||
@@ -7011,10 +7012,6 @@ msgid "E744: NetBeans does not allow changes in read-only files"
|
||||
msgstr ""
|
||||
"E744: NetBeans n'autorise pas la modification des fichiers en lecture seule"
|
||||
|
||||
#, c-format
|
||||
msgid "E685: Internal error: %s"
|
||||
msgstr "E685: Erreur interne : %s"
|
||||
|
||||
msgid "E363: pattern uses more memory than 'maxmempattern'"
|
||||
msgstr "E363: le motif utilise plus de m<>moire que 'maxmempattern'"
|
||||
|
||||
|
||||
70
src/syntax.c
70
src/syntax.c
@@ -462,7 +462,7 @@ static void syn_clear_keyword(int id, hashtab_T *ht);
|
||||
static void clear_keywtab(hashtab_T *ht);
|
||||
static void add_keyword(char_u *name, int id, int flags, short *cont_in_list, short *next_list, int conceal_char);
|
||||
static char_u *get_group_name(char_u *arg, char_u **name_end);
|
||||
static char_u *get_syn_options(char_u *arg, syn_opt_arg_T *opt, int *conceal_char);
|
||||
static char_u *get_syn_options(char_u *arg, syn_opt_arg_T *opt, int *conceal_char, int skip);
|
||||
static void syn_cmd_include(exarg_T *eap, int syncing);
|
||||
static void syn_cmd_iskeyword(exarg_T *eap, int syncing);
|
||||
static void syn_cmd_keyword(exarg_T *eap, int syncing);
|
||||
@@ -481,7 +481,7 @@ static int syn_add_cluster(char_u *name);
|
||||
static void init_syn_patterns(void);
|
||||
static char_u *get_syn_pattern(char_u *arg, synpat_T *ci);
|
||||
static void syn_cmd_sync(exarg_T *eap, int syncing);
|
||||
static int get_id_list(char_u **arg, int keylen, short **list);
|
||||
static int get_id_list(char_u **arg, int keylen, short **list, int skip);
|
||||
static void syn_combine_list(short **clstr1, short **clstr2, int list_op);
|
||||
static void syn_incl_toplevel(int id, int *flagsp);
|
||||
|
||||
@@ -3434,7 +3434,14 @@ syn_cmd_conceal(exarg_T *eap UNUSED, int syncing UNUSED)
|
||||
return;
|
||||
|
||||
next = skiptowhite(arg);
|
||||
if (STRNICMP(arg, "on", 2) == 0 && next - arg == 2)
|
||||
if (*arg == NUL)
|
||||
{
|
||||
if (curwin->w_s->b_syn_conceal)
|
||||
MSG(_("syn conceal on"));
|
||||
else
|
||||
MSG(_("syn conceal off"));
|
||||
}
|
||||
else if (STRNICMP(arg, "on", 2) == 0 && next - arg == 2)
|
||||
curwin->w_s->b_syn_conceal = TRUE;
|
||||
else if (STRNICMP(arg, "off", 3) == 0 && next - arg == 3)
|
||||
curwin->w_s->b_syn_conceal = FALSE;
|
||||
@@ -3457,7 +3464,14 @@ syn_cmd_case(exarg_T *eap, int syncing UNUSED)
|
||||
return;
|
||||
|
||||
next = skiptowhite(arg);
|
||||
if (STRNICMP(arg, "match", 5) == 0 && next - arg == 5)
|
||||
if (*arg == NUL)
|
||||
{
|
||||
if (curwin->w_s->b_syn_ic)
|
||||
MSG(_("syntax case ignore"));
|
||||
else
|
||||
MSG(_("syntax case match"));
|
||||
}
|
||||
else if (STRNICMP(arg, "match", 5) == 0 && next - arg == 5)
|
||||
curwin->w_s->b_syn_ic = FALSE;
|
||||
else if (STRNICMP(arg, "ignore", 6) == 0 && next - arg == 6)
|
||||
curwin->w_s->b_syn_ic = TRUE;
|
||||
@@ -3479,7 +3493,16 @@ syn_cmd_spell(exarg_T *eap, int syncing UNUSED)
|
||||
return;
|
||||
|
||||
next = skiptowhite(arg);
|
||||
if (STRNICMP(arg, "toplevel", 8) == 0 && next - arg == 8)
|
||||
if (*arg == NUL)
|
||||
{
|
||||
if (curwin->w_s->b_syn_spell == SYNSPL_TOP)
|
||||
MSG(_("syntax spell toplevel"));
|
||||
else if (curwin->w_s->b_syn_spell == SYNSPL_NOTOP)
|
||||
MSG(_("syntax spell notoplevel"));
|
||||
else
|
||||
MSG(_("syntax spell default"));
|
||||
}
|
||||
else if (STRNICMP(arg, "toplevel", 8) == 0 && next - arg == 8)
|
||||
curwin->w_s->b_syn_spell = SYNSPL_TOP;
|
||||
else if (STRNICMP(arg, "notoplevel", 10) == 0 && next - arg == 10)
|
||||
curwin->w_s->b_syn_spell = SYNSPL_NOTOP;
|
||||
@@ -3556,6 +3579,9 @@ syntax_clear(synblock_T *block)
|
||||
block->b_syn_ic = FALSE; /* Use case, by default */
|
||||
block->b_syn_spell = SYNSPL_DEFAULT; /* default spell checking */
|
||||
block->b_syn_containedin = FALSE;
|
||||
#ifdef FEAT_CONCEAL
|
||||
block->b_syn_conceal = FALSE;
|
||||
#endif
|
||||
|
||||
/* free the keywords */
|
||||
clear_keywtab(&block->b_keywtab);
|
||||
@@ -4543,7 +4569,8 @@ get_group_name(
|
||||
get_syn_options(
|
||||
char_u *arg, /* next argument to be checked */
|
||||
syn_opt_arg_T *opt, /* various things */
|
||||
int *conceal_char UNUSED)
|
||||
int *conceal_char UNUSED,
|
||||
int skip) /* TRUE if skipping over command */
|
||||
{
|
||||
char_u *gname_start, *gname;
|
||||
int syn_id;
|
||||
@@ -4626,17 +4653,17 @@ get_syn_options(
|
||||
EMSG(_("E395: contains argument not accepted here"));
|
||||
return NULL;
|
||||
}
|
||||
if (get_id_list(&arg, 8, &opt->cont_list) == FAIL)
|
||||
if (get_id_list(&arg, 8, &opt->cont_list, skip) == FAIL)
|
||||
return NULL;
|
||||
}
|
||||
else if (flagtab[fidx].argtype == 2)
|
||||
{
|
||||
if (get_id_list(&arg, 11, &opt->cont_in_list) == FAIL)
|
||||
if (get_id_list(&arg, 11, &opt->cont_in_list, skip) == FAIL)
|
||||
return NULL;
|
||||
}
|
||||
else if (flagtab[fidx].argtype == 3)
|
||||
{
|
||||
if (get_id_list(&arg, 9, &opt->next_list) == FAIL)
|
||||
if (get_id_list(&arg, 9, &opt->next_list, skip) == FAIL)
|
||||
return NULL;
|
||||
}
|
||||
else if (flagtab[fidx].argtype == 11 && arg[5] == '=')
|
||||
@@ -4846,7 +4873,10 @@ syn_cmd_keyword(exarg_T *eap, int syncing UNUSED)
|
||||
|
||||
if (rest != NULL)
|
||||
{
|
||||
syn_id = syn_check_group(arg, (int)(group_name_end - arg));
|
||||
if (eap->skip)
|
||||
syn_id = -1;
|
||||
else
|
||||
syn_id = syn_check_group(arg, (int)(group_name_end - arg));
|
||||
if (syn_id != 0)
|
||||
/* allocate a buffer, for removing backslashes in the keyword */
|
||||
keyword_copy = alloc((unsigned)STRLEN(rest) + 1);
|
||||
@@ -4868,7 +4898,8 @@ syn_cmd_keyword(exarg_T *eap, int syncing UNUSED)
|
||||
p = keyword_copy;
|
||||
for ( ; rest != NULL && !ends_excmd(*rest); rest = skipwhite(rest))
|
||||
{
|
||||
rest = get_syn_options(rest, &syn_opt_arg, &conceal_char);
|
||||
rest = get_syn_options(rest, &syn_opt_arg, &conceal_char,
|
||||
eap->skip);
|
||||
if (rest == NULL || ends_excmd(*rest))
|
||||
break;
|
||||
/* Copy the keyword, removing backslashes, and add a NUL. */
|
||||
@@ -4981,7 +5012,7 @@ syn_cmd_match(
|
||||
syn_opt_arg.cont_list = NULL;
|
||||
syn_opt_arg.cont_in_list = NULL;
|
||||
syn_opt_arg.next_list = NULL;
|
||||
rest = get_syn_options(rest, &syn_opt_arg, &conceal_char);
|
||||
rest = get_syn_options(rest, &syn_opt_arg, &conceal_char, eap->skip);
|
||||
|
||||
/* get the pattern. */
|
||||
init_syn_patterns();
|
||||
@@ -4991,7 +5022,7 @@ syn_cmd_match(
|
||||
syn_opt_arg.flags |= HL_HAS_EOL;
|
||||
|
||||
/* Get options after the pattern */
|
||||
rest = get_syn_options(rest, &syn_opt_arg, &conceal_char);
|
||||
rest = get_syn_options(rest, &syn_opt_arg, &conceal_char, eap->skip);
|
||||
|
||||
if (rest != NULL) /* all arguments are valid */
|
||||
{
|
||||
@@ -5117,7 +5148,7 @@ syn_cmd_region(
|
||||
while (rest != NULL && !ends_excmd(*rest))
|
||||
{
|
||||
/* Check for option arguments */
|
||||
rest = get_syn_options(rest, &syn_opt_arg, &conceal_char);
|
||||
rest = get_syn_options(rest, &syn_opt_arg, &conceal_char, eap->skip);
|
||||
if (rest == NULL || ends_excmd(*rest))
|
||||
break;
|
||||
|
||||
@@ -5628,12 +5659,13 @@ syn_cmd_cluster(exarg_T *eap, int syncing UNUSED)
|
||||
break;
|
||||
|
||||
clstr_list = NULL;
|
||||
if (get_id_list(&rest, opt_len, &clstr_list) == FAIL)
|
||||
if (get_id_list(&rest, opt_len, &clstr_list, eap->skip) == FAIL)
|
||||
{
|
||||
EMSG2(_(e_invarg2), rest);
|
||||
break;
|
||||
}
|
||||
syn_combine_list(&SYN_CLSTR(curwin->w_s)[scl_id].scl_list,
|
||||
if (scl_id >= 0)
|
||||
syn_combine_list(&SYN_CLSTR(curwin->w_s)[scl_id].scl_list,
|
||||
&clstr_list, list_op);
|
||||
got_clstr = TRUE;
|
||||
}
|
||||
@@ -5931,8 +5963,9 @@ syn_cmd_sync(exarg_T *eap, int syncing UNUSED)
|
||||
get_id_list(
|
||||
char_u **arg,
|
||||
int keylen, /* length of keyword */
|
||||
short **list) /* where to store the resulting list, if not
|
||||
short **list, /* where to store the resulting list, if not
|
||||
NULL, the list is silently skipped! */
|
||||
int skip)
|
||||
{
|
||||
char_u *p = NULL;
|
||||
char_u *end;
|
||||
@@ -6015,7 +6048,8 @@ get_id_list(
|
||||
}
|
||||
else if (name[1] == '@')
|
||||
{
|
||||
id = syn_check_cluster(name + 2, (int)(end - p - 1));
|
||||
if (!skip)
|
||||
id = syn_check_cluster(name + 2, (int)(end - p - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
365
src/tag.c
365
src/tag.c
@@ -35,19 +35,15 @@ typedef struct tag_pointers
|
||||
} tagptrs_T;
|
||||
|
||||
/*
|
||||
* The matching tags are first stored in ga_match[]. In which one depends on
|
||||
* the priority of the match.
|
||||
* At the end, the matches from ga_match[] are concatenated, to make a list
|
||||
* The matching tags are first stored in one of the ht_match[] hash tables. In
|
||||
* which one depends on the priority of the match.
|
||||
* At the end, all the matches from ht_match[] are concatenated, to make a list
|
||||
* sorted on priority.
|
||||
*/
|
||||
#define MT_ST_CUR 0 /* static match in current file */
|
||||
#define MT_GL_CUR 1 /* global match in current file */
|
||||
#define MT_GL_OTH 2 /* global match in other file */
|
||||
#define MT_ST_OTH 3 /* static match in other file */
|
||||
#define MT_IC_ST_CUR 4 /* icase static match in current file */
|
||||
#define MT_IC_GL_CUR 5 /* icase global match in current file */
|
||||
#define MT_IC_GL_OTH 6 /* icase global match in other file */
|
||||
#define MT_IC_ST_OTH 7 /* icase static match in other file */
|
||||
#define MT_IC_OFF 4 /* add for icase match */
|
||||
#define MT_RE_OFF 8 /* add for regexp match */
|
||||
#define MT_MASK 7 /* mask for printing priority */
|
||||
@@ -1341,12 +1337,9 @@ find_tags(
|
||||
int is_etag; /* current file is emaces style */
|
||||
#endif
|
||||
|
||||
struct match_found
|
||||
{
|
||||
int len; /* nr of chars of match[] to be compared */
|
||||
char_u match[1]; /* actually longer */
|
||||
} *mfp, *mfp2;
|
||||
garray_T ga_match[MT_COUNT];
|
||||
char_u *mfp;
|
||||
hashtab_T ht_match[MT_COUNT];
|
||||
hash_T hash = 0;
|
||||
int match_count = 0; /* number of matches found */
|
||||
char_u **matches;
|
||||
int mtt;
|
||||
@@ -1402,16 +1395,16 @@ find_tags(
|
||||
vimconv.vc_type = CONV_NONE;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Allocate memory for the buffers that are used
|
||||
*/
|
||||
/*
|
||||
* Allocate memory for the buffers that are used
|
||||
*/
|
||||
lbuf = alloc(lbuf_size);
|
||||
tag_fname = alloc(MAXPATHL + 1);
|
||||
#ifdef FEAT_EMACS_TAGS
|
||||
ebuf = alloc(LSIZE);
|
||||
#endif
|
||||
for (mtt = 0; mtt < MT_COUNT; ++mtt)
|
||||
ga_init2(&ga_match[mtt], (int)sizeof(struct match_found *), 100);
|
||||
hash_init(&ht_match[mtt]);
|
||||
|
||||
/* check for out of memory situation */
|
||||
if (lbuf == NULL || tag_fname == NULL
|
||||
@@ -2206,10 +2199,12 @@ parse_line:
|
||||
}
|
||||
|
||||
/*
|
||||
* If a match is found, add it to ga_match[].
|
||||
* If a match is found, add it to ht_match[].
|
||||
*/
|
||||
if (match)
|
||||
{
|
||||
int len = 0;
|
||||
|
||||
#ifdef FEAT_CSCOPE
|
||||
if (use_cscope)
|
||||
{
|
||||
@@ -2262,179 +2257,170 @@ parse_line:
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the found match in ga_match[mtt], avoiding duplicates.
|
||||
* Add the found match in ht_match[mtt].
|
||||
* Store the info we need later, which depends on the kind of
|
||||
* tags we are dealing with.
|
||||
*/
|
||||
if (ga_grow(&ga_match[mtt], 1) == OK)
|
||||
if (help_only)
|
||||
{
|
||||
int len;
|
||||
int heuristic;
|
||||
|
||||
if (help_only)
|
||||
{
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
# define ML_EXTRA 3
|
||||
#else
|
||||
# define ML_EXTRA 0
|
||||
#endif
|
||||
/*
|
||||
* Append the help-heuristic number after the
|
||||
* tagname, for sorting it later.
|
||||
*/
|
||||
*tagp.tagname_end = NUL;
|
||||
len = (int)(tagp.tagname_end - tagp.tagname);
|
||||
mfp = (struct match_found *)
|
||||
alloc((int)sizeof(struct match_found) + len
|
||||
+ 10 + ML_EXTRA);
|
||||
if (mfp != NULL)
|
||||
{
|
||||
/* "len" includes the language and the NUL, but
|
||||
* not the priority. */
|
||||
mfp->len = len + ML_EXTRA + 1;
|
||||
#define ML_HELP_LEN 6
|
||||
p = mfp->match;
|
||||
STRCPY(p, tagp.tagname);
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
p[len] = '@';
|
||||
STRCPY(p + len + 1, help_lang);
|
||||
#endif
|
||||
|
||||
heuristic = help_heuristic(tagp.tagname,
|
||||
match_re ? matchoff : 0, !match_no_ic);
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
heuristic += help_pri;
|
||||
#endif
|
||||
sprintf((char *)p + len + 1 + ML_EXTRA, "%06d",
|
||||
heuristic);
|
||||
}
|
||||
*tagp.tagname_end = TAB;
|
||||
}
|
||||
else if (name_only)
|
||||
/*
|
||||
* Append the help-heuristic number after the tagname, for
|
||||
* sorting it later. The heuristic is ignored for
|
||||
* detecting duplicates.
|
||||
* The format is {tagname}@{lang}NUL{heuristic}NUL
|
||||
*/
|
||||
*tagp.tagname_end = NUL;
|
||||
len = (int)(tagp.tagname_end - tagp.tagname);
|
||||
mfp = (char_u *)alloc((int)sizeof(char_u) + len + 10 + ML_EXTRA + 1);
|
||||
if (mfp != NULL)
|
||||
{
|
||||
if (get_it_again)
|
||||
int heuristic;
|
||||
|
||||
p = mfp;
|
||||
STRCPY(p, tagp.tagname);
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
p[len] = '@';
|
||||
STRCPY(p + len + 1, help_lang);
|
||||
#endif
|
||||
|
||||
heuristic = help_heuristic(tagp.tagname,
|
||||
match_re ? matchoff : 0, !match_no_ic);
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
heuristic += help_pri;
|
||||
#endif
|
||||
sprintf((char *)p + len + 1 + ML_EXTRA, "%06d",
|
||||
heuristic);
|
||||
}
|
||||
*tagp.tagname_end = TAB;
|
||||
}
|
||||
else if (name_only)
|
||||
{
|
||||
if (get_it_again)
|
||||
{
|
||||
char_u *temp_end = tagp.command;
|
||||
|
||||
if (*temp_end == '/')
|
||||
while (*temp_end && *temp_end != '\r'
|
||||
&& *temp_end != '\n'
|
||||
&& *temp_end != '$')
|
||||
temp_end++;
|
||||
|
||||
if (tagp.command + 2 < temp_end)
|
||||
{
|
||||
char_u *temp_end = tagp.command;
|
||||
|
||||
if (*temp_end == '/')
|
||||
while (*temp_end && *temp_end != '\r'
|
||||
&& *temp_end != '\n'
|
||||
&& *temp_end != '$')
|
||||
temp_end++;
|
||||
|
||||
if (tagp.command + 2 < temp_end)
|
||||
{
|
||||
len = (int)(temp_end - tagp.command - 2);
|
||||
mfp = (struct match_found *)alloc(
|
||||
(int)sizeof(struct match_found) + len);
|
||||
if (mfp != NULL)
|
||||
{
|
||||
mfp->len = len + 1; /* include the NUL */
|
||||
p = mfp->match;
|
||||
vim_strncpy(p, tagp.command + 2, len);
|
||||
}
|
||||
}
|
||||
else
|
||||
mfp = NULL;
|
||||
get_it_again = FALSE;
|
||||
len = (int)(temp_end - tagp.command - 2);
|
||||
mfp = (char_u *)alloc(len + 2);
|
||||
if (mfp != NULL)
|
||||
vim_strncpy(mfp, tagp.command + 2, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
len = (int)(tagp.tagname_end - tagp.tagname);
|
||||
mfp = (struct match_found *)alloc(
|
||||
(int)sizeof(struct match_found) + len);
|
||||
if (mfp != NULL)
|
||||
{
|
||||
mfp->len = len + 1; /* include the NUL */
|
||||
p = mfp->match;
|
||||
vim_strncpy(p, tagp.tagname, len);
|
||||
}
|
||||
|
||||
/* if wanted, re-read line to get long form too */
|
||||
if (State & INSERT)
|
||||
get_it_again = p_sft;
|
||||
}
|
||||
mfp = NULL;
|
||||
get_it_again = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Save the tag in a buffer.
|
||||
* Emacs tag: <mtt><tag_fname><NUL><ebuf><NUL><lbuf>
|
||||
* other tag: <mtt><tag_fname><NUL><NUL><lbuf>
|
||||
* without Emacs tags: <mtt><tag_fname><NUL><lbuf>
|
||||
*/
|
||||
len = (int)STRLEN(tag_fname)
|
||||
+ (int)STRLEN(lbuf) + 3;
|
||||
#ifdef FEAT_EMACS_TAGS
|
||||
if (is_etag)
|
||||
len += (int)STRLEN(ebuf) + 1;
|
||||
else
|
||||
++len;
|
||||
#endif
|
||||
mfp = (struct match_found *)alloc(
|
||||
(int)sizeof(struct match_found) + len);
|
||||
len = (int)(tagp.tagname_end - tagp.tagname);
|
||||
mfp = (char_u *)alloc((int)sizeof(char_u) + len + 1);
|
||||
if (mfp != NULL)
|
||||
{
|
||||
mfp->len = len;
|
||||
p = mfp->match;
|
||||
p[0] = mtt;
|
||||
STRCPY(p + 1, tag_fname);
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
/* Ignore differences in slashes, avoid adding
|
||||
* both path/file and path\file. */
|
||||
slash_adjust(p + 1);
|
||||
#endif
|
||||
s = p + 1 + STRLEN(tag_fname) + 1;
|
||||
#ifdef FEAT_EMACS_TAGS
|
||||
if (is_etag)
|
||||
{
|
||||
STRCPY(s, ebuf);
|
||||
s += STRLEN(ebuf) + 1;
|
||||
}
|
||||
else
|
||||
*s++ = NUL;
|
||||
#endif
|
||||
STRCPY(s, lbuf);
|
||||
}
|
||||
}
|
||||
vim_strncpy(mfp, tagp.tagname, len);
|
||||
|
||||
if (mfp != NULL)
|
||||
{
|
||||
/*
|
||||
* Don't add identical matches.
|
||||
* This can take a lot of time when finding many
|
||||
* matches, check for CTRL-C now and then.
|
||||
* Add all cscope tags, because they are all listed.
|
||||
*/
|
||||
#ifdef FEAT_CSCOPE
|
||||
if (use_cscope)
|
||||
i = -1;
|
||||
else
|
||||
#endif
|
||||
for (i = ga_match[mtt].ga_len; --i >= 0 && !got_int; )
|
||||
{
|
||||
mfp2 = ((struct match_found **)
|
||||
(ga_match[mtt].ga_data))[i];
|
||||
if (mfp2->len == mfp->len
|
||||
&& memcmp(mfp2->match, mfp->match,
|
||||
(size_t)mfp->len) == 0)
|
||||
break;
|
||||
fast_breakcheck();
|
||||
}
|
||||
if (i < 0)
|
||||
{
|
||||
((struct match_found **)(ga_match[mtt].ga_data))
|
||||
[ga_match[mtt].ga_len++] = mfp;
|
||||
++match_count;
|
||||
}
|
||||
else
|
||||
vim_free(mfp);
|
||||
/* if wanted, re-read line to get long form too */
|
||||
if (State & INSERT)
|
||||
get_it_again = p_sft;
|
||||
}
|
||||
}
|
||||
else /* Out of memory! Just forget about the rest. */
|
||||
else
|
||||
{
|
||||
retval = OK;
|
||||
stop_searching = TRUE;
|
||||
break;
|
||||
#define TAG_SEP 0x01
|
||||
size_t tag_fname_len = STRLEN(tag_fname);
|
||||
#ifdef FEAT_EMACS_TAGS
|
||||
size_t ebuf_len = 0;
|
||||
#endif
|
||||
|
||||
/* Save the tag in a buffer.
|
||||
* Use 0x01 to separate fields (Can't use NUL, because the
|
||||
* hash key is terminated by NUL).
|
||||
* Emacs tag: <mtt><tag_fname><0x01><ebuf><0x01><lbuf><NUL>
|
||||
* other tag: <mtt><tag_fname><0x01><0x01><lbuf><NUL>
|
||||
* without Emacs tags: <mtt><tag_fname><0x01><lbuf><NUL>
|
||||
* Here <mtt> is the "mtt" value plus 1 to avoid NUL.
|
||||
*/
|
||||
len = (int)tag_fname_len + (int)STRLEN(lbuf) + 3;
|
||||
#ifdef FEAT_EMACS_TAGS
|
||||
if (is_etag)
|
||||
{
|
||||
ebuf_len = STRLEN(ebuf);
|
||||
len += (int)ebuf_len + 1;
|
||||
}
|
||||
else
|
||||
++len;
|
||||
#endif
|
||||
mfp = (char_u *)alloc((int)sizeof(char_u) + len + 1);
|
||||
if (mfp != NULL)
|
||||
{
|
||||
p = mfp;
|
||||
p[0] = mtt + 1;
|
||||
STRCPY(p + 1, tag_fname);
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
/* Ignore differences in slashes, avoid adding
|
||||
* both path/file and path\file. */
|
||||
slash_adjust(p + 1);
|
||||
#endif
|
||||
p[tag_fname_len + 1] = TAG_SEP;
|
||||
s = p + 1 + tag_fname_len + 1;
|
||||
#ifdef FEAT_EMACS_TAGS
|
||||
if (is_etag)
|
||||
{
|
||||
STRCPY(s, ebuf);
|
||||
s[ebuf_len] = TAG_SEP;
|
||||
s += ebuf_len + 1;
|
||||
}
|
||||
else
|
||||
*s++ = TAG_SEP;
|
||||
#endif
|
||||
STRCPY(s, lbuf);
|
||||
}
|
||||
}
|
||||
|
||||
if (mfp != NULL)
|
||||
{
|
||||
hashitem_T *hi;
|
||||
|
||||
/*
|
||||
* Don't add identical matches.
|
||||
* Add all cscope tags, because they are all listed.
|
||||
* "mfp" is used as a hash key, there is a NUL byte to end
|
||||
* the part matters for comparing, more bytes may follow
|
||||
* after it. E.g. help tags store the priority after the
|
||||
* NUL.
|
||||
*/
|
||||
#ifdef FEAT_CSCOPE
|
||||
if (use_cscope)
|
||||
hash++;
|
||||
else
|
||||
#endif
|
||||
hash = hash_hash(mfp);
|
||||
hi = hash_lookup(&ht_match[mtt], mfp, hash);
|
||||
if (HASHITEM_EMPTY(hi))
|
||||
{
|
||||
if (hash_add_item(&ht_match[mtt], hi, mfp, hash)
|
||||
== FAIL)
|
||||
{
|
||||
/* Out of memory! Just forget about the rest. */
|
||||
retval = OK;
|
||||
stop_searching = TRUE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
++match_count;
|
||||
}
|
||||
else
|
||||
/* duplicate tag, drop it */
|
||||
vim_free(mfp);
|
||||
}
|
||||
}
|
||||
#ifdef FEAT_CSCOPE
|
||||
@@ -2532,7 +2518,7 @@ findtag_end:
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Move the matches from the ga_match[] arrays into one list of
|
||||
* Move the matches from the ht_match[] arrays into one list of
|
||||
* matches. When retval == FAIL, free the matches.
|
||||
*/
|
||||
if (retval == FAIL)
|
||||
@@ -2546,22 +2532,35 @@ findtag_end:
|
||||
match_count = 0;
|
||||
for (mtt = 0; mtt < MT_COUNT; ++mtt)
|
||||
{
|
||||
for (i = 0; i < ga_match[mtt].ga_len; ++i)
|
||||
hashitem_T *hi;
|
||||
long_u todo;
|
||||
|
||||
todo = (long)ht_match[mtt].ht_used;
|
||||
for (hi = ht_match[mtt].ht_array; todo > 0; ++hi)
|
||||
{
|
||||
mfp = ((struct match_found **)(ga_match[mtt].ga_data))[i];
|
||||
if (matches == NULL)
|
||||
vim_free(mfp);
|
||||
else
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
/* To avoid allocating memory again we turn the struct
|
||||
* match_found into a string. For help the priority was not
|
||||
* included in the length. */
|
||||
mch_memmove(mfp, mfp->match,
|
||||
(size_t)(mfp->len + (help_only ? ML_HELP_LEN : 0)));
|
||||
matches[match_count++] = (char_u *)mfp;
|
||||
mfp = hi->hi_key;
|
||||
if (matches == NULL)
|
||||
vim_free(mfp);
|
||||
else
|
||||
{
|
||||
if (!name_only)
|
||||
{
|
||||
/* Change mtt back to zero-based. */
|
||||
*mfp = *mfp - 1;
|
||||
|
||||
/* change the TAG_SEP back to NUL */
|
||||
for (p = mfp + 1; *p != NUL; ++p)
|
||||
if (*p == TAG_SEP)
|
||||
*p = NUL;
|
||||
}
|
||||
matches[match_count++] = (char_u *)mfp;
|
||||
}
|
||||
todo--;
|
||||
}
|
||||
}
|
||||
ga_clear(&ga_match[mtt]);
|
||||
hash_clear(&ht_match[mtt]);
|
||||
}
|
||||
|
||||
*matchesp = matches;
|
||||
|
||||
@@ -175,6 +175,7 @@ NEW_TESTS = test_arglist.res \
|
||||
test_normal.res \
|
||||
test_packadd.res \
|
||||
test_perl.res \
|
||||
test_profile.res \
|
||||
test_quickfix.res \
|
||||
test_ruby.res \
|
||||
test_search.res \
|
||||
|
||||
@@ -32,7 +32,7 @@ func Test_assert_notequal()
|
||||
call assert_notequal([1, 2, 3], s)
|
||||
|
||||
call assert_notequal('foo', s)
|
||||
call assert_match("Expected 'foo' differs from 'foo'", v:errors[0])
|
||||
call assert_match("Expected not equal to 'foo'", v:errors[0])
|
||||
call remove(v:errors, 0)
|
||||
endfunc
|
||||
|
||||
|
||||
146
src/testdir/test_profile.vim
Normal file
146
src/testdir/test_profile.vim
Normal file
@@ -0,0 +1,146 @@
|
||||
" Test Vim profiler
|
||||
if !has('profile')
|
||||
finish
|
||||
endif
|
||||
|
||||
func Test_profile_func()
|
||||
let lines = [
|
||||
\ "func! Foo1()",
|
||||
\ "endfunc",
|
||||
\ "func! Foo2()",
|
||||
\ " let l:count = 100",
|
||||
\ " while l:count > 0",
|
||||
\ " let l:count = l:count - 1",
|
||||
\ " endwhile",
|
||||
\ "endfunc",
|
||||
\ "func! Foo3()",
|
||||
\ "endfunc",
|
||||
\ "func! Bar()",
|
||||
\ "endfunc",
|
||||
\ "call Foo1()",
|
||||
\ "call Foo1()",
|
||||
\ "profile pause",
|
||||
\ "call Foo1()",
|
||||
\ "profile continue",
|
||||
\ "call Foo2()",
|
||||
\ "call Foo3()",
|
||||
\ "call Bar()",
|
||||
\ "if !v:profiling",
|
||||
\ " delfunc Foo2",
|
||||
\ "endif",
|
||||
\ "delfunc Foo3",
|
||||
\ ]
|
||||
|
||||
call writefile(lines, 'Xprofile_func.vim')
|
||||
call system(v:progpath
|
||||
\ . ' -es -u NONE -U NONE -i NONE --noplugin'
|
||||
\ . ' -c "profile start Xprofile_func.log"'
|
||||
\ . ' -c "profile func Foo*"'
|
||||
\ . ' -c "so Xprofile_func.vim"'
|
||||
\ . ' -c "qall!"')
|
||||
call assert_equal(0, v:shell_error)
|
||||
|
||||
let lines = readfile('Xprofile_func.log')
|
||||
|
||||
" - Foo1() is called 3 times but should be reported as called twice
|
||||
" since one call is in between "profile pause" .. "profile continue".
|
||||
" - Foo2() should come before Foo1() since Foo1() does much more work.
|
||||
" - Foo3() is not reported because function is deleted.
|
||||
" - Unlike Foo3(), Foo2() should not be deleted since there is a check
|
||||
" for v:profiling.
|
||||
" - Bar() is not reported since it does not match "profile func Foo*".
|
||||
call assert_equal(28, len(lines))
|
||||
|
||||
call assert_equal('FUNCTION Foo1()', lines[0])
|
||||
call assert_equal('Called 2 times', lines[1])
|
||||
call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2])
|
||||
call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3])
|
||||
call assert_equal('', lines[4])
|
||||
call assert_equal('count total (s) self (s)', lines[5])
|
||||
call assert_equal('', lines[6])
|
||||
call assert_equal('FUNCTION Foo2()', lines[7])
|
||||
call assert_equal('Called 1 time', lines[8])
|
||||
call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[9])
|
||||
call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[10])
|
||||
call assert_equal('', lines[11])
|
||||
call assert_equal('count total (s) self (s)', lines[12])
|
||||
call assert_match('^\s*1\s\+.*\slet l:count = 100$', lines[13])
|
||||
call assert_match('^\s*101\s\+.*\swhile l:count > 0$', lines[14])
|
||||
call assert_match('^\s*100\s\+.*\s let l:count = l:count - 1$', lines[15])
|
||||
call assert_match('^\s*100\s\+.*\sendwhile$', lines[16])
|
||||
call assert_equal('', lines[17])
|
||||
call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[18])
|
||||
call assert_equal('count total (s) self (s) function', lines[19])
|
||||
call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[20])
|
||||
call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[21])
|
||||
call assert_equal('', lines[22])
|
||||
call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[23])
|
||||
call assert_equal('count total (s) self (s) function', lines[24])
|
||||
call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[25])
|
||||
call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[26])
|
||||
call assert_equal('', lines[27])
|
||||
|
||||
call delete('Xprofile_func.vim')
|
||||
call delete('Xprofile_func.log')
|
||||
endfunc
|
||||
|
||||
func Test_profile_file()
|
||||
let lines = [
|
||||
\ 'func! Foo()',
|
||||
\ 'endfunc',
|
||||
\ 'for i in range(10)',
|
||||
\ ' " a comment',
|
||||
\ ' call Foo()',
|
||||
\ 'endfor',
|
||||
\ 'call Foo()',
|
||||
\ ]
|
||||
|
||||
call writefile(lines, 'Xprofile_file.vim')
|
||||
call system(v:progpath
|
||||
\ . ' -es -u NONE -U NONE -i NONE --noplugin'
|
||||
\ . ' -c "profile start Xprofile_file.log"'
|
||||
\ . ' -c "profile file Xprofile_file.vim"'
|
||||
\ . ' -c "so Xprofile_file.vim"'
|
||||
\ . ' -c "so Xprofile_file.vim"'
|
||||
\ . ' -c "qall!"')
|
||||
call assert_equal(0, v:shell_error)
|
||||
|
||||
let lines = readfile('Xprofile_file.log')
|
||||
|
||||
call assert_equal(14, len(lines))
|
||||
|
||||
call assert_match('^SCRIPT .*Xprofile_file.vim$', lines[0])
|
||||
call assert_equal('Sourced 2 times', lines[1])
|
||||
call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2])
|
||||
call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3])
|
||||
call assert_equal('', lines[4])
|
||||
call assert_equal('count total (s) self (s)', lines[5])
|
||||
call assert_equal(' func! Foo()', lines[6])
|
||||
call assert_equal(' endfunc', lines[7])
|
||||
" Loop iterates 10 times. Since script runs twice, body executes 20 times.
|
||||
" First line of loop executes one more time than body to detect end of loop.
|
||||
call assert_match('^\s*22\s\+\d\+\.\d\+\s\+for i in range(10)$', lines[8])
|
||||
call assert_equal(' " a comment', lines[9])
|
||||
call assert_match('^\s*20\s\+\d\+\.\d\+\s\+\d\+\.\d\+\s\+call Foo()$', lines[10])
|
||||
call assert_match('^\s*20\s\+\d\+\.\d\+\s\+endfor$', lines[11])
|
||||
" if self and total are equal we only get one number
|
||||
call assert_match('^\s*2\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[12])
|
||||
call assert_equal('', lines[13])
|
||||
|
||||
call delete('Xprofile_file.vim')
|
||||
call delete('Xprofile_file.log')
|
||||
endfunc
|
||||
|
||||
func Test_profile_completion()
|
||||
call feedkeys(":profile \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"profile continue file func pause start', @:)
|
||||
|
||||
call feedkeys(":profile start test_prof\<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_match('^"profile start.* test_profile\.vim', @:)
|
||||
endfunc
|
||||
|
||||
func Test_profile_errors()
|
||||
call assert_fails("profile func Foo", 'E750:')
|
||||
call assert_fails("profile pause", 'E750:')
|
||||
call assert_fails("profile continue", 'E750:')
|
||||
endfunc
|
||||
@@ -162,3 +162,164 @@ func Test_syntax_completion()
|
||||
call feedkeys(":syn match \<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_match('^"syn match Boolean Character ', @:)
|
||||
endfunc
|
||||
|
||||
func Test_syntax_arg_skipped()
|
||||
syn clear
|
||||
syntax case ignore
|
||||
if 0
|
||||
syntax case match
|
||||
endif
|
||||
call assert_match('case ignore', execute('syntax case'))
|
||||
|
||||
syn keyword Foo foo
|
||||
call assert_match('Foo', execute('syntax'))
|
||||
syn clear
|
||||
call assert_match('case match', execute('syntax case'))
|
||||
call assert_notmatch('Foo', execute('syntax'))
|
||||
|
||||
if has('conceal')
|
||||
syn clear
|
||||
syntax conceal on
|
||||
if 0
|
||||
syntax conceal off
|
||||
endif
|
||||
call assert_match('conceal on', execute('syntax conceal'))
|
||||
syn clear
|
||||
call assert_match('conceal off', execute('syntax conceal'))
|
||||
|
||||
syntax conceal on
|
||||
syntax conceal off
|
||||
call assert_match('conceal off', execute('syntax conceal'))
|
||||
endif
|
||||
|
||||
syntax region Tar start=/</ end=/>/
|
||||
if 0
|
||||
syntax region NotTest start=/</ end=/>/ contains=@Spell
|
||||
endif
|
||||
call assert_match('Tar', execute('syntax'))
|
||||
call assert_notmatch('NotTest', execute('syntax'))
|
||||
call assert_notmatch('Spell', execute('syntax'))
|
||||
|
||||
hi Foo ctermfg=blue
|
||||
let a = execute('hi Foo')
|
||||
if 0
|
||||
syntax rest
|
||||
endif
|
||||
call assert_equal(a, execute('hi Foo'))
|
||||
|
||||
set ft=tags
|
||||
syn off
|
||||
if 0
|
||||
syntax enable
|
||||
endif
|
||||
call assert_match('No Syntax items defined', execute('syntax'))
|
||||
syntax enable
|
||||
call assert_match('tagComment', execute('syntax'))
|
||||
set ft=
|
||||
|
||||
syn clear
|
||||
if 0
|
||||
syntax include @Spell nothing
|
||||
endif
|
||||
call assert_notmatch('Spell', execute('syntax'))
|
||||
|
||||
syn clear
|
||||
syn iskeyword 48-57,$,_
|
||||
call assert_match('48-57,$,_', execute('syntax iskeyword'))
|
||||
if 0
|
||||
syn clear
|
||||
syn iskeyword clear
|
||||
endif
|
||||
call assert_match('48-57,$,_', execute('syntax iskeyword'))
|
||||
syn iskeyword clear
|
||||
call assert_match('not set', execute('syntax iskeyword'))
|
||||
syn iskeyword 48-57,$,_
|
||||
syn clear
|
||||
call assert_match('not set', execute('syntax iskeyword'))
|
||||
|
||||
syn clear
|
||||
syn keyword Foo foo
|
||||
if 0
|
||||
syn keyword NotAdded bar
|
||||
endif
|
||||
call assert_match('Foo', execute('syntax'))
|
||||
call assert_notmatch('NotAdded', execute('highlight'))
|
||||
|
||||
syn clear
|
||||
syn keyword Foo foo
|
||||
call assert_match('Foo', execute('syntax'))
|
||||
call assert_match('Foo', execute('syntax list'))
|
||||
call assert_notmatch('Foo', execute('if 0 | syntax | endif'))
|
||||
call assert_notmatch('Foo', execute('if 0 | syntax list | endif'))
|
||||
|
||||
syn clear
|
||||
syn match Fopi /asdf/
|
||||
if 0
|
||||
syn match Fopx /asdf/
|
||||
endif
|
||||
call assert_match('Fopi', execute('syntax'))
|
||||
call assert_notmatch('Fopx', execute('syntax'))
|
||||
|
||||
syn clear
|
||||
syn spell toplevel
|
||||
call assert_match('spell toplevel', execute('syntax spell'))
|
||||
if 0
|
||||
syn spell notoplevel
|
||||
endif
|
||||
call assert_match('spell toplevel', execute('syntax spell'))
|
||||
syn spell notoplevel
|
||||
call assert_match('spell notoplevel', execute('syntax spell'))
|
||||
syn spell default
|
||||
call assert_match('spell default', execute('syntax spell'))
|
||||
|
||||
syn clear
|
||||
if 0
|
||||
syntax cluster Spell
|
||||
endif
|
||||
call assert_notmatch('Spell', execute('syntax'))
|
||||
|
||||
syn clear
|
||||
syn keyword Foo foo
|
||||
syn sync ccomment
|
||||
syn sync maxlines=5
|
||||
if 0
|
||||
syn sync maxlines=11
|
||||
endif
|
||||
call assert_match('on C-style comments', execute('syntax sync'))
|
||||
call assert_match('maximal 5 lines', execute('syntax sync'))
|
||||
syn sync clear
|
||||
if 0
|
||||
syn sync ccomment
|
||||
endif
|
||||
call assert_notmatch('on C-style comments', execute('syntax sync'))
|
||||
|
||||
syn clear
|
||||
endfunc
|
||||
|
||||
func Test_invalid_arg()
|
||||
call assert_fails('syntax case asdf', 'E390:')
|
||||
call assert_fails('syntax conceal asdf', 'E390:')
|
||||
call assert_fails('syntax spell asdf', 'E390:')
|
||||
endfunc
|
||||
|
||||
func Test_syn_sync()
|
||||
syntax region HereGroup start=/this/ end=/that/
|
||||
syntax sync match SyncHere grouphere HereGroup "pattern"
|
||||
call assert_match('SyncHere', execute('syntax sync'))
|
||||
syn sync clear
|
||||
call assert_notmatch('SyncHere', execute('syntax sync'))
|
||||
syn clear
|
||||
endfunc
|
||||
|
||||
func Test_syn_clear()
|
||||
syntax keyword Foo foo
|
||||
syntax keyword Tar tar
|
||||
call assert_match('Foo', execute('syntax'))
|
||||
call assert_match('Tar', execute('syntax'))
|
||||
syn clear Foo
|
||||
call assert_notmatch('Foo', execute('syntax'))
|
||||
call assert_match('Tar', execute('syntax'))
|
||||
syn clear Foo Tar
|
||||
call assert_notmatch('Foo', execute('syntax'))
|
||||
call assert_notmatch('Tar', execute('syntax'))
|
||||
endfunc
|
||||
|
||||
@@ -46,3 +46,47 @@ function! Test_System()
|
||||
|
||||
call assert_fails('call system("wc -l", 99999)', 'E86:')
|
||||
endfunction
|
||||
|
||||
function! Test_system_exmode()
|
||||
if has('unix') " echo $? only works on Unix
|
||||
let cmd = ' -es -u NONE -c "source Xscript" +q; echo $?'
|
||||
" Need to put this in a script, "catch" isn't found after an unknown
|
||||
" function.
|
||||
call writefile(['try', 'call doesnotexist()', 'catch', 'endtry'], 'Xscript')
|
||||
let a = system(v:progpath . cmd)
|
||||
call assert_equal('0', a[0])
|
||||
call assert_equal(0, v:shell_error)
|
||||
endif
|
||||
|
||||
" Error before try does set error flag.
|
||||
call writefile(['call nosuchfunction()', 'try', 'call doesnotexist()', 'catch', 'endtry'], 'Xscript')
|
||||
if has('unix') " echo $? only works on Unix
|
||||
let a = system(v:progpath . cmd)
|
||||
call assert_notequal('0', a[0])
|
||||
endif
|
||||
|
||||
let cmd = ' -es -u NONE -c "source Xscript" +q'
|
||||
let a = system(v:progpath . cmd)
|
||||
call assert_notequal(0, v:shell_error)
|
||||
call delete('Xscript')
|
||||
|
||||
if has('unix') " echo $? only works on Unix
|
||||
let cmd = ' -es -u NONE -c "call doesnotexist()" +q; echo $?'
|
||||
let a = system(v:progpath. cmd)
|
||||
call assert_notequal(0, a[0])
|
||||
endif
|
||||
|
||||
let cmd = ' -es -u NONE -c "call doesnotexist()" +q'
|
||||
let a = system(v:progpath. cmd)
|
||||
call assert_notequal(0, v:shell_error)
|
||||
|
||||
if has('unix') " echo $? only works on Unix
|
||||
let cmd = ' -es -u NONE -c "call doesnotexist()|let a=1" +q; echo $?'
|
||||
let a = system(v:progpath. cmd)
|
||||
call assert_notequal(0, a[0])
|
||||
endif
|
||||
|
||||
let cmd = ' -es -u NONE -c "call doesnotexist()|let a=1" +q'
|
||||
let a = system(v:progpath. cmd)
|
||||
call assert_notequal(0, v:shell_error)
|
||||
endfunc
|
||||
|
||||
@@ -23,6 +23,24 @@ func Test_cancel_ptjump()
|
||||
quit
|
||||
endfunc
|
||||
|
||||
func Test_static_tagjump()
|
||||
set tags=Xtags
|
||||
call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
|
||||
\ "one\tXfile1\t/^one/;\"\tf\tfile:\tsignature:(void)",
|
||||
\ "word\tXfile2\tcmd2"],
|
||||
\ 'Xtags')
|
||||
new Xfile1
|
||||
call setline(1, ['empty', 'one()', 'empty'])
|
||||
write
|
||||
tag one
|
||||
call assert_equal(2, line('.'))
|
||||
|
||||
set tags&
|
||||
call delete('Xtags')
|
||||
call delete('Xfile1')
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Tests for [ CTRL-I and CTRL-W CTRL-I commands
|
||||
function Test_keyword_jump()
|
||||
call writefile(["#include Xinclude", "",
|
||||
|
||||
@@ -764,6 +764,46 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
200,
|
||||
/**/
|
||||
199,
|
||||
/**/
|
||||
198,
|
||||
/**/
|
||||
197,
|
||||
/**/
|
||||
196,
|
||||
/**/
|
||||
195,
|
||||
/**/
|
||||
194,
|
||||
/**/
|
||||
193,
|
||||
/**/
|
||||
192,
|
||||
/**/
|
||||
191,
|
||||
/**/
|
||||
190,
|
||||
/**/
|
||||
189,
|
||||
/**/
|
||||
188,
|
||||
/**/
|
||||
187,
|
||||
/**/
|
||||
186,
|
||||
/**/
|
||||
185,
|
||||
/**/
|
||||
184,
|
||||
/**/
|
||||
183,
|
||||
/**/
|
||||
182,
|
||||
/**/
|
||||
181,
|
||||
/**/
|
||||
180,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user