Skip to content

Commit 3ec574f

Browse files
committed
Update runtime files.
Includes changing &sw to shiftwidth() for all indent scripts.
1 parent 2102035 commit 3ec574f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+345
-422
lines changed

runtime/doc/channel.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*channel.txt* For Vim version 8.0. Last change: 2016 Dec 02
1+
*channel.txt* For Vim version 8.0. Last change: 2017 Jun 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -489,6 +489,11 @@ If you want to handle both stderr and stdout with one handler use the
489489
"callback" option: >
490490
let job = job_start(command, {"callback": "MyHandler"})
491491
492+
Depending on the system, starting a job can put Vim in the background, the
493+
started job gets the focus. To avoid that, use the `foreground()` function.
494+
This might not always work when called early, put in the callback handler or
495+
use a timer to call it after the job has started.
496+
492497
You can send a message to the command with ch_evalraw(). If the channel is in
493498
JSON or JS mode you can use ch_evalexpr().
494499

runtime/doc/eval.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.0. Last change: 2017 Jun 05
1+
*eval.txt* For Vim version 8.0. Last change: 2017 Jun 13
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5465,7 +5465,10 @@ line({expr}) The result is a Number, which is the line number of the file
54655465
< *last-position-jump*
54665466
This autocommand jumps to the last known position in a file
54675467
just after opening it, if the '" mark is set: >
5468-
:au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
5468+
:au BufReadPost *
5469+
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
5470+
\ | exe "normal! g`\""
5471+
\ | endif
54695472
54705473
line2byte({lnum}) *line2byte()*
54715474
Return the byte count from the start of the buffer for line

runtime/doc/pattern.txt

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

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1076,12 +1076,16 @@ x A single character, with no special meaning, matches itself
10761076
":s/[/x/" searches for "[/x" and replaces it with nothing. It does
10771077
not search for "[" and replaces it with "x"!
10781078

1079+
*E944* *E945*
10791080
If the sequence begins with "^", it matches any single character NOT
10801081
in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
10811082
- If two characters in the sequence are separated by '-', this is
10821083
shorthand for the full list of ASCII characters between them. E.g.,
1083-
"[0-9]" matches any decimal digit. Non-ASCII characters can be
1084-
used, but the character values must not be more than 256 apart.
1084+
"[0-9]" matches any decimal digit. If the starting character exceeds
1085+
the ending character, e.g. [c-a], E944 occurs. Non-ASCII characters
1086+
can be used, but the character values must not be more than 256 apart
1087+
in the old regexp engine. For example, searching by [\u3000-\u4000]
1088+
after setting re=1 emits a E945 error. Prepending \%#=2 will fix it.
10851089
- A character class expression is evaluated to the set of characters
10861090
belonging to that character class. The following character classes
10871091
are supported:

runtime/doc/tags

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4519,6 +4519,8 @@ E940 eval.txt /*E940*
45194519
E941 eval.txt /*E941*
45204520
E942 eval.txt /*E942*
45214521
E943 message.txt /*E943*
4522+
E944 pattern.txt /*E944*
4523+
E945 pattern.txt /*E945*
45224524
E95 message.txt /*E95*
45234525
E96 diff.txt /*E96*
45244526
E97 diff.txt /*E97*

runtime/doc/todo.txt

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*todo.txt* For Vim version 8.0. Last change: 2017 Jun 05
1+
*todo.txt* For Vim version 8.0. Last change: 2017 Jun 13
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -113,6 +113,7 @@ With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
113113
(Marcin Szewczyk, 2017 Apr 26)
114114

115115
ml_get error when using a Python. (Yggdroot, 2017 Jun 1, #1737)
116+
Lemonboy can reproduce (2017 Jun 5)
116117

117118
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
118119

@@ -144,15 +145,9 @@ Openhab syntax file (mueller, #1678)
144145

145146
Use gvimext.dll from the nightly build? (Issue #249)
146147

147-
Patch to remove HAVE_GTK_MULTIHEAD-relevant code. (Kazunobu Kuriyama, 2017 May
148-
5) Update May 11
149-
150148
'synmaxcol' works with bytes instead of screen cells. (Llandon, 2017 May 31,
151149
#1736)
152150

153-
Patch to pass quickfix list index to functions. (Yegappan Lakshmanan, 2017 May
154-
31)
155-
156151
Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
157152
8, #1690)
158153

@@ -168,35 +163,15 @@ manager. Problem with Motif?
168163
Bogus characters inserted when triggering indent while changing text.
169164
(Vitor Antunes, 2016 Nov 22, #1269)
170165

171-
Patch to have ":stag" respect 'switchbuf'. (Ingo Karkat, 2017 May 5, #1681)
172-
173-
Patch to improve building with MSVC. (Leonardo Manera, #1747)
174-
175-
Wrong selection of quoted text (Guraga, #1687)
176-
Patch to fix selection of quoted text. (Christian Brabandt, 2017 May 7, #1687)
177-
178-
Patch to use separate error message for regex range. (Itchyny, Ken Hamada,
179-
2017 May 16)
180-
181166
Segmentation fault with complete(). (Lifepillar, 2017 Apr 29, #1668)
182167
Check for "pat" to be NULL in search_for_exact_line()?
183168
How did it get NULL? Comment by Christian, Apr 30.
184169

185170
Is it possible to keep the complete menu open when calling complete()?
186171
(Prabir Shrestha, 2017 May 19, #1713)
187172

188-
Calling may_req_ambiguous_char_width() and may_req_bg_color() only after
189-
executing command line commands may not work properly.
190-
(Rastislav Barlink, 2017 May 18)
191-
Set "starting" to 0 earlier, and move the may_req calls above exe_commands()?
192-
No, that's a problem with using "-c quit", not running Vim interactive.
193-
194173
Memory leak in test97? The string is actually freed. Weird.
195174

196-
Patch for shellescape(). (Christian Brabandt, 2017 Apr 20, #1590)
197-
198-
Patch for flickering redraw. (Hirohito Higashi, 2017 Apr 23, #1637)
199-
200175
New value "uselast" for 'switchbuf'. (Lemonboy, 2017 Apr 23, #1652)
201176

202177
Add a toolbar in the terminal. Can be global, above all windows, or specific
@@ -212,18 +187,6 @@ Perhaps simpler: actually delete the mappings. Use maplist() to list matching
212187
mappings (with a lhs prefix, like maparg()), mapdelete() to delete,
213188
maprestore() to restore (using the output of maplist().
214189

215-
Patch to support chinese wordcount in utf-8. (Rain, 2017 May 24, #1722)
216-
Or not?
217-
218-
"gn" selects one character instead of the searched text. (keyboardfire, #1683)
219-
Patch by Christian, 2017 May 7.
220-
221-
Wrong memory access using p_fdm, found in patch to add tests for diff mode
222-
(#1658) (Dominique Pelle, 2017 May 6)
223-
224-
Patch to improve test coverage for diff mode. (Dominique Pelle, 2017 May 11,
225-
#1685)
226-
227190
Add an argument to :mkvimrc (or add aother command) to skip mappings from
228191
plugins (source is a Vim script). No need to put these in a .vimrc, they will
229192
be defined when the plugin is loaded.
@@ -249,6 +212,7 @@ Also get E749 on exit.
249212
Another example in #1309
250213

251214
Patch to change all use of &sw to shiftwidth(). (Tyru, 2017 Feb 19)
215+
Takuya Fujiwara
252216
Wait until maintainers integrate it.
253217

254218
When deleting a mark or register, leave a tombstone, so that it's also deleted
@@ -358,6 +322,8 @@ Patch for wrong cursor position on wrapped line, involving breakindent.
358322
(Ozaki Kiichi, 2016 Nov 25)
359323
Does this also fix #1408 ?
360324

325+
Patch to add "module" to quickfix entries. (Coot, 2017 Jun 8, #1757)
326+
361327
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
362328

363329
When 'completeopt' has "noselect" does not insert a newline. (Lifepillar, 2017
@@ -500,9 +466,6 @@ This does not work: :set cscopequickfix=a-
500466

501467
Possibly wrong value for seq_cur. (Florent Fayolle, 2016 May 15, #806)
502468

503-
Patch to add separate highlighting for quickfix current line.
504-
(anishsane, 2016 Sep 16, #1080)
505-
506469
Filetype plugin for awk. (Doug Kearns, 2016 Sep 5)
507470

508471
Patch to improve map documentation. Issue #799.
@@ -539,6 +502,9 @@ Because of using the initial buffer? (Dun Peal, 2016 May 12)
539502
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
540503
Updated 2016 Jun 10, #858 Update 2017 Mar 28: use <buffer>
541504

505+
Patch to fix that an encoding conversion failure results in a corrupted or
506+
empty file. (Christian Brabandt, #1765, https://github.com/chrisbra/vim-mq-patches/blob/master/conversion_error)
507+
542508
Add redrawtabline command. (Naruhiko Nishino, 2016 Jun 11)
543509

544510
Neovim patch for utfc_ptr2char_len() https://github.com/neovim/neovim/pull/4574
@@ -1032,8 +998,6 @@ Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12)
1032998
Patch to add "ntab" item in 'listchars' to repeat first character. (Nathaniel
1033999
Braun, pragm, 2013 Oct 13) A better solution 2014 Mar 5.
10341000

1035-
/[b-a] gives error E16, should probably be E769.
1036-
10371001
7 Windows XP: When using "ClearType" for text smoothing, a column of yellow
10381002
pixels remains when typing spaces in front of a "D" ('guifont' set to
10391003
"lucida_console:h8").

runtime/filetype.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim support file to detect file types
22
"
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last Change: 2017 Jun 04
4+
" Last Change: 2017 Jun 12
55

66
" Listen very carefully, I will say this only once
77
if exists("did_load_filetypes")
@@ -2253,6 +2253,8 @@ func! s:FTtex()
22532253
let format = tolower(matchstr(firstline, '\a\+'))
22542254
let format = substitute(format, 'pdf', '', '')
22552255
if format == 'tex'
2256+
let format = 'latex'
2257+
elseif format == 'plaintex'
22562258
let format = 'plain'
22572259
endif
22582260
else

runtime/indent/ada.vim

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function s:MainBlockIndent (prev_indent, prev_lnum, blockstart, stop_at)
8787
endwhile
8888
endwhile
8989
" Fallback - just move back one
90-
return a:prev_indent - &sw
90+
return a:prev_indent - shiftwidth()
9191
endfunction MainBlockIndent
9292

9393
" Section: s:EndBlockIndent {{{1
@@ -131,7 +131,7 @@ function s:EndBlockIndent( prev_indent, prev_lnum, blockstart, blockend )
131131
endwhile
132132
endwhile
133133
" Fallback - just move back one
134-
return a:prev_indent - &sw
134+
return a:prev_indent - shiftwidth()
135135
endfunction EndBlockIndent
136136

137137
" Section: s:StatementIndent {{{1
@@ -213,15 +213,15 @@ function GetAdaIndent()
213213
endif
214214
" Move indent in
215215
if ! false_match
216-
let ind = ind + &sw
216+
let ind = ind + shiftwidth()
217217
endif
218218
elseif line =~ '^\s*\(case\|exception\)\>'
219219
" Move indent in twice (next 'when' will move back)
220-
let ind = ind + 2 * &sw
220+
let ind = ind + 2 * shiftwidth()
221221
elseif line =~ '^\s*end\s*record\>'
222222
" Move indent back to tallying 'type' preceeding the 'record'.
223223
" Allow indent to be equal to 'end record's.
224-
let ind = s:MainBlockIndent( ind+&sw, lnum, 'type\>', '' )
224+
let ind = s:MainBlockIndent( ind+shiftwidth(), lnum, 'type\>', '' )
225225
elseif line =~ '\(^\s*new\>.*\)\@<!)\s*[;,]\s*$'
226226
" Revert to indent of line that started this parenthesis pair
227227
exe lnum
@@ -235,10 +235,10 @@ function GetAdaIndent()
235235
exe v:lnum
236236
elseif line =~ '[.=(]\s*$'
237237
" A statement continuation - move in one
238-
let ind = ind + &sw
238+
let ind = ind + shiftwidth()
239239
elseif line =~ '^\s*new\>'
240240
" Multiple line generic instantiation ('package blah is\nnew thingy')
241-
let ind = s:StatementIndent( ind - &sw, lnum )
241+
let ind = s:StatementIndent( ind - shiftwidth(), lnum )
242242
elseif line =~ ';\s*$'
243243
" Statement end (but not 'end' ) - try to find current statement-start indent
244244
let ind = s:StatementIndent( ind, lnum )
@@ -256,17 +256,17 @@ function GetAdaIndent()
256256
elseif continuation && line =~ '^\s*('
257257
" Don't do this if we've already indented due to the previous line
258258
if ind == initind
259-
let ind = ind + &sw
259+
let ind = ind + shiftwidth()
260260
endif
261261
elseif line =~ '^\s*\(begin\|is\)\>'
262262
let ind = s:MainBlockIndent( ind, lnum, '\(procedure\|function\|declare\|package\|task\)\>', 'begin\>' )
263263
elseif line =~ '^\s*record\>'
264-
let ind = s:MainBlockIndent( ind, lnum, 'type\>\|for\>.*\<use\>', '' ) + &sw
264+
let ind = s:MainBlockIndent( ind, lnum, 'type\>\|for\>.*\<use\>', '' ) + shiftwidth()
265265
elseif line =~ '^\s*\(else\|elsif\)\>'
266266
let ind = s:MainBlockIndent( ind, lnum, 'if\>', '' )
267267
elseif line =~ '^\s*when\>'
268268
" Align 'when' one /in/ from matching block start
269-
let ind = s:MainBlockIndent( ind, lnum, '\(case\|exception\)\>', '' ) + &sw
269+
let ind = s:MainBlockIndent( ind, lnum, '\(case\|exception\)\>', '' ) + shiftwidth()
270270
elseif line =~ '^\s*end\>\s*\<if\>'
271271
" End of if statements
272272
let ind = s:EndBlockIndent( ind, lnum, 'if\>', 'end\>\s*\<if\>' )

runtime/indent/awk.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function! GetAwkIndent()
6060
" 'pattern { action }' (simple check match on /{/ increases the indent then)
6161

6262
if s:Get_brace_balance( prev_data, '{', '}' ) > 0
63-
return ind + &sw
63+
return ind + shiftwidth()
6464
endif
6565

6666
let brace_balance = s:Get_brace_balance( prev_data, '(', ')' )
@@ -99,7 +99,7 @@ function! GetAwkIndent()
9999
return s:Safe_indent( ind, s:First_word_len(prev_data), getline(v:lnum))
100100
else
101101
" if/for/while without '{'
102-
return ind + &sw
102+
return ind + shiftwidth()
103103
endif
104104
endif
105105
endif
@@ -140,7 +140,7 @@ function! GetAwkIndent()
140140

141141
" Decrease indent if this line contains a '}'.
142142
if getline(v:lnum) =~ '^\s*}'
143-
let ind = ind - &sw
143+
let ind = ind - shiftwidth()
144144
endif
145145

146146
return ind

runtime/indent/bst.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function! GetBstIndent(lnum) abort
6969
endif
7070
let fakeline = substitute(line,'^}','','').matchstr(cline,'^}')
7171
let ind = indent(lnum)
72-
let ind = ind + &sw * s:count(line,'{')
73-
let ind = ind - &sw * s:count(fakeline,'}')
72+
let ind = ind + shiftwidth() * s:count(line,'{')
73+
let ind = ind - shiftwidth() * s:count(fakeline,'}')
7474
return ind
7575
endfunction

runtime/indent/bzl.vim

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim indent file
22
" Language: Bazel (http://bazel.io)
33
" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
4-
" Last Change: 2015 Aug 11
4+
" Last Change: 2017 Jun 13
55

66
if exists('b:did_indent')
77
finish
@@ -41,11 +41,8 @@ function GetBzlIndent(lnum) abort
4141
if exists('g:pyindent_open_paren')
4242
let l:pyindent_open_paren = g:pyindent_open_paren
4343
endif
44-
" Vim 7.3.693 and later defines a shiftwidth() function to get the effective
45-
" shiftwidth value. Fall back to &shiftwidth if the function doesn't exist.
46-
let l:sw_expr = exists('*shiftwidth') ? 'shiftwidth()' : '&shiftwidth'
47-
let g:pyindent_nested_paren = l:sw_expr . ' * 2'
48-
let g:pyindent_open_paren = l:sw_expr . ' * 2'
44+
let g:pyindent_nested_paren = 'shiftwidth() * 2'
45+
let g:pyindent_open_paren = 'shiftwidth() * 2'
4946
endif
5047

5148
let l:indent = -1

0 commit comments

Comments
 (0)