From e3e007628391306e728446828fef7045c9b4495c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=80=D0=B5=D0=B4=D1=80=D0=B0=D0=B3=20=D0=9D=D0=B8?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=B8=D1=9B?= Date: Sat, 19 Aug 2023 10:21:50 +0200 Subject: [PATCH] don't fold spaces regions --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 20e80ca..b9c8872 100644 --- a/main.py +++ b/main.py @@ -78,6 +78,8 @@ def run(self, _: sublime.Edit) -> None: def fold(view: sublime.View, fold_r: sublime.Region, preceding_text: Optional[str] = None) -> None: + if view.substr(fold_r).isspace(): # closes: https://github.com/predragnikolic/InlineFold/issues/4 + return if view.is_folded(fold_r): return if preceding_text: