Lines Matching refs:pos
193 let pos = match(line, '[][(){}]', 0)
198 while pos != -1
199 if !s:IsInStringOrComment(a:lnum, pos + 1)
200 if line[pos] == '('
201 call add(opening.parentheses, {'type': '(', 'pos': pos})
202 elseif line[pos] == ')'
204 call add(closing.parentheses, {'type': ')', 'pos': pos})
208 elseif line[pos] == '{'
209 call add(opening.braces, {'type': '{', 'pos': pos})
210 elseif line[pos] == '}'
212 call add(closing.braces, {'type': '}', 'pos': pos})
216 elseif line[pos] == '['
217 call add(opening.brackets, {'type': '[', 'pos': pos})
218 elseif line[pos] == ']'
220 call add(closing.brackets, {'type': ']', 'pos': pos})
227 let pos = match(line, '[][(){}]', pos + 1)
232 let rightmost_opening = {'type': '(', 'pos': -1}
233 let rightmost_closing = {'type': ')', 'pos': -1}
236 if opening.pos > rightmost_opening.pos
242 if closing.pos > rightmost_closing.pos
350 if opening.pos != -1
358 let nonspace = matchend(line, '\S', opening.pos + 1) - 1
361 elseif closing.pos != -1
362 call cursor(lnum, closing.pos + 1)