Skip to content

Commit

Permalink
Update runtime files.
Browse files Browse the repository at this point in the history
  • Loading branch information
brammool committed Apr 9, 2017
1 parent f8ec998 commit cd5c8f8
Show file tree
Hide file tree
Showing 12 changed files with 320 additions and 133 deletions.
23 changes: 15 additions & 8 deletions runtime/compiler/rst.vim
@@ -1,7 +1,8 @@
" Vim compiler file
" Compiler: reStructuredText Documentation Format
" Compiler: sphinx >= 1.0.8, http://www.sphinx-doc.org
" Description: reStructuredText Documentation Format
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Latest Revision: 2017-03-31

if exists("current_compiler")
finish
Expand All @@ -11,12 +12,18 @@ let current_compiler = "rst"
let s:cpo_save = &cpo
set cpo&vim

setlocal errorformat=
\%f:%l:\ (%tEBUG/0)\ %m,
\%f:%l:\ (%tNFO/1)\ %m,
\%f:%l:\ (%tARNING/2)\ %m,
\%f:%l:\ (%tRROR/3)\ %m,
\%f:%l:\ (%tEVERE/3)\ %m,
if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif

CompilerSet errorformat=
\%f\\:%l:\ %tEBUG:\ %m,
\%f\\:%l:\ %tNFO:\ %m,
\%f\\:%l:\ %tARNING:\ %m,
\%f\\:%l:\ %tRROR:\ %m,
\%f\\:%l:\ %tEVERE:\ %m,
\%f\\:%s:\ %tARNING:\ %m,
\%f\\:%s:\ %tRROR:\ %m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%DMaking\ %*\\a\ in\ %f
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.0. Last change: 2017 Jan 14
*autocmd.txt* For Vim version 8.0. Last change: 2017 Apr 07


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -621,7 +621,7 @@ FileChangedShell When Vim notices that the modification time of
to tell Vim what to do next.
NOTE: When this autocommand is executed, the
current buffer "%" may be different from the
buffer that was changed "<afile>".
buffer that was changed, which is in "<afile>".
NOTE: The commands must not change the current
buffer, jump to another buffer or delete a
buffer. *E246* *E811*
Expand Down
66 changes: 51 additions & 15 deletions runtime/doc/eval.txt
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.0. Last change: 2017 Mar 27
*eval.txt* For Vim version 8.0. Last change: 2017 Apr 09


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -4379,12 +4379,14 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but
includes an extra item in the list:
[bufnum, lnum, col, off, curswant] ~
The "curswant" number is the preferred column when moving the
cursor vertically.
cursor vertically. Also see |getpos()|.

This can be used to save and restore the cursor position: >
let save_cursor = getcurpos()
MoveTheCursorAround
call setpos('.', save_cursor)
<
< Note that this only works within the window. See
|winrestview()| for restoring more state.
*getcwd()*
getcwd([{winnr} [, {tabnr}]])
The result is a String, which is the name of the current
Expand Down Expand Up @@ -4682,13 +4684,16 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
<
*getwinposx()*
getwinposx() The result is a Number, which is the X coordinate in pixels of
the left hand side of the GUI Vim window. The result will be
-1 if the information is not available.
the left hand side of the GUI Vim window. Also works for an
xterm.
The result will be -1 if the information is not available.
The value can be used with `:winpos`.

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

getwininfo([{winid}]) *getwininfo()*
Returns information about windows as a List with Dictionaries.
Expand Down Expand Up @@ -5304,13 +5309,29 @@ json_decode({string}) *json_decode()*
in Vim values. See |json_encode()| for the relation between
JSON and Vim values.
The decoding is permissive:
- A trailing comma in an array and object is ignored.
- A trailing comma in an array and object is ignored, e.g.
"[1, 2, ]" is the same as "[1, 2]".
- 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.
"1.0", or "001.2" for "1.2". Special floating point values
"Infinity" and "NaN" (capitalization ignored) are accepted.
- Leading zeroes in integer numbers are ignored, e.g. "012"
for "12" or "-012" for "-12".
- Capitalization is ignored in literal names null, true or
false, e.g. "NULL" for "null", "True" for "true".
- Control characters U+0000 through U+001F which are not
escaped in strings are accepted, e.g. " " (tab
character in string) for "\t".
- Backslash in an invalid 2-character sequence escape is
ignored, e.g. "\a" is decoded as "a".
- A correct surrogate pair in JSON strings should normally be
a 12 character sequence such as "\uD834\uDD1E", but
json_decode() silently accepts truncated surrogate pairs
such as "\uD834" or "\uD834\u"
*E938*
A duplicate key in an object, valid in rfc7159, is not
accepted by json_decode() as the result must be a valid Vim
type, e.g. this fails: {"a":"b", "a":"c"}


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

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

Expand Down Expand Up @@ -8473,7 +8493,7 @@ listcmds Compiled with commands for the buffer list |:files|
and the argument list |arglist|.
localmap Compiled with local mappings and abbr. |:map-local|
lua Compiled with Lua interface |Lua|.
mac Any Macintosh version of Vim.
mac Any Macintosh version of Vim, but not all OS X.
macunix Compiled for OS X, with darwin
osx Compiled for OS X, with or without darwin
menu Compiled with support for |:menu|.
Expand Down Expand Up @@ -10650,6 +10670,22 @@ missing: >
: echo "You will _never_ see this message"
:endif
To execute a command only when the |+eval| feature is disabled requires a trick,
as this example shows: >
if 1
nnoremap : :"
endif
normal :set history=111<CR>
if 1
nunmap :
endif
The "<CR>" here is a real CR character, type CTRL-V Enter to get it.

When the |+eval| feature is available the ":" is remapped to add a double
quote, which has the effect of commenging-out the command. without the

This comment has been minimized.

Copy link
@chrisbra

chrisbra Apr 10, 2017

Member

typo: "commenting"

This comment has been minimized.

Copy link
@brammool

brammool Apr 10, 2017

Author Contributor

Thanks

|+eval| feature the nnoremap command is skipped and the command is executed.

==============================================================================
11. The sandbox *eval-sandbox* *sandbox* *E48*

Expand Down
5 changes: 3 additions & 2 deletions runtime/doc/insert.txt
@@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.0. Last change: 2016 Jan 31
*insert.txt* For Vim version 8.0. Last change: 2017 Apr 07


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -159,7 +159,8 @@ CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
CTRL-R CTRL-O {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-O*
Insert the contents of a register literally and don't
auto-indent. Does the same as pasting with the mouse
|<MiddleMouse>|.
|<MiddleMouse>|. When the register is linewise this will
insert the text above the current line, like with `P`.
Does not replace characters!
The '.' register (last inserted text) is still inserted as
typed. {not in Vi}
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 8.0. Last change: 2017 Mar 05
*pattern.txt* For Vim version 8.0. Last change: 2017 Mar 29


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down
28 changes: 3 additions & 25 deletions runtime/doc/todo.txt
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.0. Last change: 2017 Mar 29
*todo.txt* For Vim version 8.0. Last change: 2017 Apr 09


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

Remove the Farsi code?

+channel:
- Try out background make plugin:
https://github.com/AndrewVos/vim-make-background
Expand Down Expand Up @@ -110,9 +112,6 @@ manager. Problem with Motif?

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

Patch for deleting the quickfix lists and a test for it. (Yegappan, 2017 Mar
21)

Add a toolbar in the terminal. Can be global, above all windows, or specific
for one window.
Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
Expand All @@ -122,49 +121,28 @@ Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
What if there is an invalid character?

Patch for broken foldtext. (Christian 2017 Mar 22, #1567, 2nd one)

Json string with trailing \u should be an error. (Lcd)

On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
lines: :g/^/normal yyp On Unix it works OK. (Bryce Orgill, 2016 Nov 5)
Another example 2017 Mar 10.

Multi-byte bug: dv} splits char. (Urtica Dioica, 2017 Jan 9)

When session file has name in argument list but the buffer was deleted, the
buffer is not deleted when using the session file. (#1393)
Should add the buffer in hidden state.

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.

Patch to test regexp classes. (Dominique, 2017 Mar 13, #1560)
Do we need to adjust the implementation?
Make different classes that depend on the system and that don't.

Wrong diff highlighting with three files. (2016 Oct 20, #1186)
Also get E749 on exit.
Another example in #1309

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

Patch to change mb_char2len() to utf_char2len(c) when known to use UTF.
(Dominique, 2017 Mar 21, #1582)

Completion for user-defined commands does not work if a few characters were
already typed. (Dominique, 2017 Jan 26)

When deleting a mark or register, leave a tombstone, so that it's also deleted
when writing viminfo (and the delete was the most recent action). #1339

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

Patch to Modernize GtkForm Implmentation. (Kazuki Kuriyama, 2017 Mar 26)
Any objections?

Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)

Completion for :!cmd shows each match twice. #1435
Expand Down
28 changes: 14 additions & 14 deletions runtime/indent/r.vim
Expand Up @@ -274,7 +274,7 @@ function GetRIndent()
let nlnum = s:Get_prev_line(nlnum)
let nline = SanitizeRLine(getline(nlnum)) . nline
endwhile
if nline =~ '^\s*function\s*(' && indent(nlnum) == &sw
if nline =~ '^\s*function\s*(' && indent(nlnum) == shiftwidth()
return 0
endif
endif
Expand All @@ -285,22 +285,22 @@ function GetRIndent()

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

" Deal with () and []

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

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

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

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

let bb = s:Get_paren_balance(line, '[', ']')
Expand Down Expand Up @@ -364,11 +364,11 @@ function GetRIndent()
if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
return indent(lnum)
else
return indent(lnum) + &sw
return indent(lnum) + shiftwidth()
endif
else
if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
return indent(lnum) - &sw
return indent(lnum) - shiftwidth()
endif
endif
endif
Expand All @@ -383,7 +383,7 @@ function GetRIndent()
let line = linepiece . line
endwhile
if line =~ '{$' && post_block == 0
return indent(lnum) + &sw
return indent(lnum) + shiftwidth()
endif

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

if cline =~ '^\s*else'
if line =~ '<-\s*if\s*()'
return indent(lnum) + &sw
return indent(lnum) + shiftwidth()
else
if line =~ '\<if\s*()'
return indent(lnum)
else
return indent(lnum) - &sw
return indent(lnum) - shiftwidth()
endif
endif
endif
Expand Down Expand Up @@ -474,12 +474,12 @@ function GetRIndent()
let ind = indent(lnum)

if g:r_indent_align_args == 0 && pb != 0
let ind += pb * &sw
let ind += pb * shiftwidth()
return ind
endif

if g:r_indent_align_args == 0 && bb != 0
let ind += bb * &sw
let ind += bb * shiftwidth()
return ind
endif

Expand All @@ -489,7 +489,7 @@ function GetRIndent()
let pind = 0
endif

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

Expand All @@ -509,7 +509,7 @@ function GetRIndent()
let pbb = s:Get_paren_balance(pline, '[', ']')
endwhile
let pind = indent(plnum)
if ind == (pind + &sw) && pline =~ '{$'
if ind == (pind + shiftwidth()) && pline =~ '{$'
return ind
endif
endwhile
Expand Down
2 changes: 1 addition & 1 deletion runtime/indent/rhelp.vim
Expand Up @@ -82,7 +82,7 @@ function GetRHelpIndent()
let closeb = strlen(line2) - strlen(line3)
let bb = openb - closeb

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

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

0 comments on commit cd5c8f8

Please sign in to comment.