Skip to content

Commit cd5c8f8

Browse files
committed
Update runtime files.
1 parent f8ec998 commit cd5c8f8

File tree

12 files changed

+320
-133
lines changed

12 files changed

+320
-133
lines changed

runtime/compiler/rst.vim

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
" Vim compiler file
2-
" Compiler: reStructuredText Documentation Format
2+
" Compiler: sphinx >= 1.0.8, http://www.sphinx-doc.org
3+
" Description: reStructuredText Documentation Format
34
" Previous Maintainer: Nikolai Weibull <[email protected]>
4-
" Latest Revision: 2006-04-19
5+
" Latest Revision: 2017-03-31
56

67
if exists("current_compiler")
78
finish
@@ -11,12 +12,18 @@ let current_compiler = "rst"
1112
let s:cpo_save = &cpo
1213
set cpo&vim
1314

14-
setlocal errorformat=
15-
\%f:%l:\ (%tEBUG/0)\ %m,
16-
\%f:%l:\ (%tNFO/1)\ %m,
17-
\%f:%l:\ (%tARNING/2)\ %m,
18-
\%f:%l:\ (%tRROR/3)\ %m,
19-
\%f:%l:\ (%tEVERE/3)\ %m,
15+
if exists(":CompilerSet") != 2
16+
command -nargs=* CompilerSet setlocal <args>
17+
endif
18+
19+
CompilerSet errorformat=
20+
\%f\\:%l:\ %tEBUG:\ %m,
21+
\%f\\:%l:\ %tNFO:\ %m,
22+
\%f\\:%l:\ %tARNING:\ %m,
23+
\%f\\:%l:\ %tRROR:\ %m,
24+
\%f\\:%l:\ %tEVERE:\ %m,
25+
\%f\\:%s:\ %tARNING:\ %m,
26+
\%f\\:%s:\ %tRROR:\ %m,
2027
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
2128
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
2229
\%DMaking\ %*\\a\ in\ %f

runtime/doc/autocmd.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 8.0. Last change: 2017 Jan 14
1+
*autocmd.txt* For Vim version 8.0. Last change: 2017 Apr 07
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -621,7 +621,7 @@ FileChangedShell When Vim notices that the modification time of
621621
to tell Vim what to do next.
622622
NOTE: When this autocommand is executed, the
623623
current buffer "%" may be different from the
624-
buffer that was changed "<afile>".
624+
buffer that was changed, which is in "<afile>".
625625
NOTE: The commands must not change the current
626626
buffer, jump to another buffer or delete a
627627
buffer. *E246* *E811*

runtime/doc/eval.txt

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.0. Last change: 2017 Mar 27
1+
*eval.txt* For Vim version 8.0. Last change: 2017 Apr 09
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4379,12 +4379,14 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but
43794379
includes an extra item in the list:
43804380
[bufnum, lnum, col, off, curswant] ~
43814381
The "curswant" number is the preferred column when moving the
4382-
cursor vertically.
4382+
cursor vertically. Also see |getpos()|.
4383+
43834384
This can be used to save and restore the cursor position: >
43844385
let save_cursor = getcurpos()
43854386
MoveTheCursorAround
43864387
call setpos('.', save_cursor)
4387-
<
4388+
< Note that this only works within the window. See
4389+
|winrestview()| for restoring more state.
43884390
*getcwd()*
43894391
getcwd([{winnr} [, {tabnr}]])
43904392
The result is a String, which is the name of the current
@@ -4682,13 +4684,16 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
46824684
<
46834685
*getwinposx()*
46844686
getwinposx() The result is a Number, which is the X coordinate in pixels of
4685-
the left hand side of the GUI Vim window. The result will be
4686-
-1 if the information is not available.
4687+
the left hand side of the GUI Vim window. Also works for an
4688+
xterm.
4689+
The result will be -1 if the information is not available.
4690+
The value can be used with `:winpos`.
46874691

46884692
*getwinposy()*
46894693
getwinposy() The result is a Number, which is the Y coordinate in pixels of
4690-
the top of the GUI Vim window. The result will be -1 if the
4691-
information is not available.
4694+
the top of the GUI Vim window. Also works for an xterm.
4695+
The result will be -1 if the information is not available.
4696+
The value can be used with `:winpos`.
46924697

46934698
getwininfo([{winid}]) *getwininfo()*
46944699
Returns information about windows as a List with Dictionaries.
@@ -5304,13 +5309,29 @@ json_decode({string}) *json_decode()*
53045309
in Vim values. See |json_encode()| for the relation between
53055310
JSON and Vim values.
53065311
The decoding is permissive:
5307-
- A trailing comma in an array and object is ignored.
5312+
- A trailing comma in an array and object is ignored, e.g.
5313+
"[1, 2, ]" is the same as "[1, 2]".
53085314
- More floating point numbers are recognized, e.g. "1." for
5309-
"1.0".
5310-
However, a duplicate key in an object is not allowed. *E938*
5311-
The result must be a valid Vim type:
5312-
- An empty object member name is not allowed.
5313-
- Duplicate object member names are not allowed.
5315+
"1.0", or "001.2" for "1.2". Special floating point values
5316+
"Infinity" and "NaN" (capitalization ignored) are accepted.
5317+
- Leading zeroes in integer numbers are ignored, e.g. "012"
5318+
for "12" or "-012" for "-12".
5319+
- Capitalization is ignored in literal names null, true or
5320+
false, e.g. "NULL" for "null", "True" for "true".
5321+
- Control characters U+0000 through U+001F which are not
5322+
escaped in strings are accepted, e.g. " " (tab
5323+
character in string) for "\t".
5324+
- Backslash in an invalid 2-character sequence escape is
5325+
ignored, e.g. "\a" is decoded as "a".
5326+
- A correct surrogate pair in JSON strings should normally be
5327+
a 12 character sequence such as "\uD834\uDD1E", but
5328+
json_decode() silently accepts truncated surrogate pairs
5329+
such as "\uD834" or "\uD834\u"
5330+
*E938*
5331+
A duplicate key in an object, valid in rfc7159, is not
5332+
accepted by json_decode() as the result must be a valid Vim
5333+
type, e.g. this fails: {"a":"b", "a":"c"}
5334+
53145335

53155336
json_encode({expr}) *json_encode()*
53165337
Encode {expr} as JSON and return this as a string.
@@ -7879,7 +7900,6 @@ test_override({name}, {val}) *test_override()*
78797900

78807901
name effect when {val} is non-zero ~
78817902
redraw disable the redrawing() function
7882-
silent_mode enable silent mode (like using |-s| after |-e|)
78837903
char_avail disable the char_avail() function
78847904
ALL clear all overrides ({val} is not used)
78857905

@@ -8473,7 +8493,7 @@ listcmds Compiled with commands for the buffer list |:files|
84738493
and the argument list |arglist|.
84748494
localmap Compiled with local mappings and abbr. |:map-local|
84758495
lua Compiled with Lua interface |Lua|.
8476-
mac Any Macintosh version of Vim.
8496+
mac Any Macintosh version of Vim, but not all OS X.
84778497
macunix Compiled for OS X, with darwin
84788498
osx Compiled for OS X, with or without darwin
84798499
menu Compiled with support for |:menu|.
@@ -10650,6 +10670,22 @@ missing: >
1065010670
: echo "You will _never_ see this message"
1065110671
:endif
1065210672
10673+
To execute a command only when the |+eval| feature is disabled requires a trick,
10674+
as this example shows: >
10675+
if 1
10676+
nnoremap : :"
10677+
endif
10678+
normal :set history=111<CR>
10679+
if 1
10680+
nunmap :
10681+
endif
10682+
10683+
The "<CR>" here is a real CR character, type CTRL-V Enter to get it.
10684+
10685+
When the |+eval| feature is available the ":" is remapped to add a double
10686+
quote, which has the effect of commenging-out the command. without the
10687+
|+eval| feature the nnoremap command is skipped and the command is executed.
10688+
1065310689
==============================================================================
1065410690
11. The sandbox *eval-sandbox* *sandbox* *E48*
1065510691

runtime/doc/insert.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*insert.txt* For Vim version 8.0. Last change: 2016 Jan 31
1+
*insert.txt* For Vim version 8.0. Last change: 2017 Apr 07
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -159,7 +159,8 @@ CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
159159
CTRL-R CTRL-O {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-O*
160160
Insert the contents of a register literally and don't
161161
auto-indent. Does the same as pasting with the mouse
162-
|<MiddleMouse>|.
162+
|<MiddleMouse>|. When the register is linewise this will
163+
insert the text above the current line, like with `P`.
163164
Does not replace characters!
164165
The '.' register (last inserted text) is still inserted as
165166
typed. {not in Vi}

runtime/doc/pattern.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*pattern.txt* For Vim version 8.0. Last change: 2017 Mar 05
1+
*pattern.txt* For Vim version 8.0. Last change: 2017 Mar 29
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/todo.txt

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*todo.txt* For Vim version 8.0. Last change: 2017 Mar 29
1+
*todo.txt* For Vim version 8.0. Last change: 2017 Apr 09
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,6 +35,8 @@ entered there will not be repeated below, unless there is extra information.
3535
*known-bugs*
3636
-------------------- Known bugs and current work -----------------------
3737

38+
Remove the Farsi code?
39+
3840
+channel:
3941
- Try out background make plugin:
4042
https://github.com/AndrewVos/vim-make-background
@@ -110,9 +112,6 @@ manager. Problem with Motif?
110112

111113
Memory leak in test97? The string is actually freed. Weird.
112114

113-
Patch for deleting the quickfix lists and a test for it. (Yegappan, 2017 Mar
114-
21)
115-
116115
Add a toolbar in the terminal. Can be global, above all windows, or specific
117116
for one window.
118117
Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
@@ -122,49 +121,28 @@ Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
122121
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
123122
What if there is an invalid character?
124123

125-
Patch for broken foldtext. (Christian 2017 Mar 22, #1567, 2nd one)
126-
127124
Json string with trailing \u should be an error. (Lcd)
128125

129-
On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
130-
lines: :g/^/normal yyp On Unix it works OK. (Bryce Orgill, 2016 Nov 5)
131-
Another example 2017 Mar 10.
132-
133-
Multi-byte bug: dv} splits char. (Urtica Dioica, 2017 Jan 9)
134-
135126
When session file has name in argument list but the buffer was deleted, the
136127
buffer is not deleted when using the session file. (#1393)
137128
Should add the buffer in hidden state.
138129

139130
When an item in the quickfix list has a file name that does not exist, behave
140131
like the item was not a match for :cnext.
141132

142-
Patch to test regexp classes. (Dominique, 2017 Mar 13, #1560)
143-
Do we need to adjust the implementation?
144-
Make different classes that depend on the system and that don't.
145-
146133
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
147134
Also get E749 on exit.
148135
Another example in #1309
149136

150137
Patch to change all use of &sw to shiftwidth(). (Tyru, 2017 Feb 19)
151138
Wait until maintainers integrate it.
152139

153-
Patch to change mb_char2len() to utf_char2len(c) when known to use UTF.
154-
(Dominique, 2017 Mar 21, #1582)
155-
156-
Completion for user-defined commands does not work if a few characters were
157-
already typed. (Dominique, 2017 Jan 26)
158-
159140
When deleting a mark or register, leave a tombstone, so that it's also deleted
160141
when writing viminfo (and the delete was the most recent action). #1339
161142

162143
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
163144
#1330)
164145

165-
Patch to Modernize GtkForm Implmentation. (Kazuki Kuriyama, 2017 Mar 26)
166-
Any objections?
167-
168146
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
169147

170148
Completion for :!cmd shows each match twice. #1435

runtime/indent/r.vim

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function GetRIndent()
274274
let nlnum = s:Get_prev_line(nlnum)
275275
let nline = SanitizeRLine(getline(nlnum)) . nline
276276
endwhile
277-
if nline =~ '^\s*function\s*(' && indent(nlnum) == &sw
277+
if nline =~ '^\s*function\s*(' && indent(nlnum) == shiftwidth()
278278
return 0
279279
endif
280280
endif
@@ -285,22 +285,22 @@ function GetRIndent()
285285

286286
" line is an incomplete command:
287287
if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\<else$' || line =~ '<-$' || line =~ '->$'
288-
return indent(lnum) + &sw
288+
return indent(lnum) + shiftwidth()
289289
endif
290290

291291
" Deal with () and []
292292

293293
let pb = s:Get_paren_balance(line, '(', ')')
294294

295295
if line =~ '^\s*{$' || line =~ '(\s*{' || (pb == 0 && (line =~ '{$' || line =~ '(\s*{$'))
296-
return indent(lnum) + &sw
296+
return indent(lnum) + shiftwidth()
297297
endif
298298

299299
let s:curtabstop = repeat(' ', &tabstop)
300300

301301
if g:r_indent_align_args == 1
302302
if pb > 0 && line =~ '{$'
303-
return s:Get_last_paren_idx(line, '(', ')', pb) + &sw
303+
return s:Get_last_paren_idx(line, '(', ')', pb) + shiftwidth()
304304
endif
305305

306306
let bb = s:Get_paren_balance(line, '[', ']')
@@ -364,11 +364,11 @@ function GetRIndent()
364364
if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
365365
return indent(lnum)
366366
else
367-
return indent(lnum) + &sw
367+
return indent(lnum) + shiftwidth()
368368
endif
369369
else
370370
if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
371-
return indent(lnum) - &sw
371+
return indent(lnum) - shiftwidth()
372372
endif
373373
endif
374374
endif
@@ -383,7 +383,7 @@ function GetRIndent()
383383
let line = linepiece . line
384384
endwhile
385385
if line =~ '{$' && post_block == 0
386-
return indent(lnum) + &sw
386+
return indent(lnum) + shiftwidth()
387387
endif
388388

389389
" Now we can do some tests again
@@ -393,19 +393,19 @@ function GetRIndent()
393393
if post_block == 0
394394
let newl = SanitizeRLine(line)
395395
if newl =~ '\<\(if\|while\|for\|function\)\s*()$' || newl =~ '\<else$' || newl =~ '<-$'
396-
return indent(lnum) + &sw
396+
return indent(lnum) + shiftwidth()
397397
endif
398398
endif
399399
endif
400400

401401
if cline =~ '^\s*else'
402402
if line =~ '<-\s*if\s*()'
403-
return indent(lnum) + &sw
403+
return indent(lnum) + shiftwidth()
404404
else
405405
if line =~ '\<if\s*()'
406406
return indent(lnum)
407407
else
408-
return indent(lnum) - &sw
408+
return indent(lnum) - shiftwidth()
409409
endif
410410
endif
411411
endif
@@ -474,12 +474,12 @@ function GetRIndent()
474474
let ind = indent(lnum)
475475

476476
if g:r_indent_align_args == 0 && pb != 0
477-
let ind += pb * &sw
477+
let ind += pb * shiftwidth()
478478
return ind
479479
endif
480480

481481
if g:r_indent_align_args == 0 && bb != 0
482-
let ind += bb * &sw
482+
let ind += bb * shiftwidth()
483483
return ind
484484
endif
485485

@@ -489,7 +489,7 @@ function GetRIndent()
489489
let pind = 0
490490
endif
491491

492-
if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0)
492+
if ind == pind || (ind == (pind + shiftwidth()) && pline =~ '{$' && ppost_else == 0)
493493
return ind
494494
endif
495495

@@ -509,7 +509,7 @@ function GetRIndent()
509509
let pbb = s:Get_paren_balance(pline, '[', ']')
510510
endwhile
511511
let pind = indent(plnum)
512-
if ind == (pind + &sw) && pline =~ '{$'
512+
if ind == (pind + shiftwidth()) && pline =~ '{$'
513513
return ind
514514
endif
515515
endwhile

runtime/indent/rhelp.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function GetRHelpIndent()
8282
let closeb = strlen(line2) - strlen(line3)
8383
let bb = openb - closeb
8484

85-
let ind = indent(lnum) + (bb * &sw)
85+
let ind = indent(lnum) + (bb * shiftwidth())
8686

8787
if line =~ '^\s*}\s*$'
8888
let ind = indent(lnum)

0 commit comments

Comments
 (0)