10000 Merge pull request #22 from vovkkk/patch-2 · demon386/SmartMarkdown@dfdda53 · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Merge pull request #22 from vovkkk/patch-2
Browse files Browse the repository at this point in the history
fixes class SmartNewLineCommand
  • Loading branch information
demon386 committed Jun 16, 2013
2 parents 651c10a + 5c9a14c commit dfdda53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion smart_folding.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ def run(self, edit):
r = self.view.full_line(s)
if headline._is_region_folded(r.b + 1, self.view):
i = headline.region_of_content_of_headline_at_point(self.view, s.b)
points.append(i)
else:
i = sublime.Region(r.a, r.b - 1)
points.append(i)
self.view.insert(edit, i.b, '\n')
self.view.sel().clear()
for p in points:
self.view.sel().add(p.b + 1)


class SmartFoldingCommand(sublime_plugin.TextCommand):
"""Smart folding is used to fold / unfold headline at the point.
Expand Down

0 comments on commit dfdda53

Please sign in to comment.
0