Update runtime files

This commit is contained in:
Bram Moolenaar
2021-09-09 21:55:11 +02:00
parent d176ca3dde
commit 6c391a74fe
80 changed files with 247 additions and 167 deletions

View File

@ -16,8 +16,8 @@ if exists("*CdlGetIndent")
"finish
endif
" find out if an "...=..." expresion is an assignment (or a conditional)
" it scans 'line' first, and then the previos lines
" find out if an "...=..." expression is an assignment (or a conditional)
" it scans 'line' first, and then the previous lines
fun! CdlAsignment(lnum, line)
let f = -1
let lnum = a:lnum
@ -33,7 +33,7 @@ fun! CdlAsignment(lnum, line)
endif
" it's formula if there's a ';', 'elsE', 'theN', 'enDif' or 'expr'
" conditional if there's a '<', '>', 'elseif', 'if', 'and', 'or', 'not',
" 'memberis', 'childrenof' and other \k\+of funcions
" 'memberis', 'childrenof' and other \k\+of functions
let f = line[inicio-1] =~? '[en;]' || strpart(line, inicio-4, 4) =~? 'ndif\|expr'
endw
let lnum = prevnonblank(lnum-1)
@ -106,7 +106,7 @@ fun! CdlGetIndent(lnum)
elseif c == '(' || c ==? 'f' " '(' or 'if'
let ind = ind + shiftwidth()
else " c == '='
" if it is an asignment increase indent
" if it is an assignment increase indent
if f == -1 " we don't know yet, find out
let f = CdlAsignment(lnum, strpart(line, 0, inicio))
end
@ -117,11 +117,11 @@ fun! CdlGetIndent(lnum)
endw
" CURRENT LINE, if it starts with a closing element, decrease indent
" or if it starts with '=' (asignment), increase indent
" or if it starts with '=' (assignment), increase indent
if match(thisline, '^\c\s*\(else\|then\|endif\|[);]\)') >= 0
let ind = ind - shiftwidth()
elseif match(thisline, '^\s*=') >= 0
if f == -1 " we don't know yet if is an asignment, find out
if f == -1 " we don't know yet if is an assignment, find out
let f = CdlAsignment(lnum, "")
end
if f == 1 " formula increase it