Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes class SmartNewLineCommand

ctrl+enter should insert new line if headline isn't folded
  • Loading branch information...
commit 5c9a14c2ae7ed9ac1551d802409c4cb9ff057301 1 parent 651c10a
@vovkkk vovkkk authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 smart_folding.py
View
5 smart_folding.py
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.