Hi. What does this block do? it finds "functions" and...
What numbers 500,1500 do?
while True:
next = view.find("\\bfunction\\b", cur)
if next is None or next.b > pos or (next.a == -1 and next.b == -1): break
line = view.line(next.a)
if line.a < pos - 1500: line = sublime.Region(pos - 1500, line.b)
indent = count_indentation(view.substr(line))
if indent < min_indent:
min_indent = indent
start = line.a
cur = line.b
return sublime.Region(start, min(pos + 500, region.b))
It decides on which range around a changed piece of code to send to the server. It prefers starting at a function boundary, and does not scan back more than 1500 characters.
Hi. What does this block do? it finds "functions" and... What numbers 500,1500 do?