- Code: Select all
view = sublime.active_window().active_view()
endline, endcol = view.rowcol(view.size())
line = 0
regions = 
while line < endline:
region = view.full_line(view.text_point(line, 0))
data = view.substr(region)
line += 1
And save. All the "Hello" lines will be folded up leaving us with only the "World!" lines, which is the correct behavior.
Now try to unfold these by moving the mouse cursor to the left and click on one of the triangles. The text is not unfolding, and also in my opinion the triangles are off by one line (the first triangle should be shown at the first World! and not the """).