]> git.neil.brown.name Git - edlib.git/commitdiff
autospell: fix detection of existing spell range handler
authorNeilBrown <neil@brown.name>
Mon, 9 Oct 2023 22:35:04 +0000 (09:35 +1100)
committerNeilBrown <neil@brown.name>
Mon, 9 Oct 2023 22:35:04 +0000 (09:35 +1100)
Two cases:
 no rangecheck at all - return is 0
 rangecheck existgs, but not for spell: return is Efalse

So test <= 0.

Signed-off-by: NeilBrown <neil@brown.name>
python/lib-autospell.py

index 79c6c3d8fe0e5511fa9f31b02c9e6d3d01085299..5b13abc65ff83ebb338aaa62bcdce71cfa245fe4 100644 (file)
@@ -152,8 +152,8 @@ class autospell_view(edlib.Pane):
             self.vstart = mark.dup()
             self.vend = mark2.dup()
             if (not self.helper_attached and
-                not self.call("doc:notify:rangetrack:add",
-                              "autospell")):
+                self.call("doc:notify:rangetrack:add",
+                              "autospell") <= 0):
                 if self.call("rangetrack:new", "autospell") > 0:
                     self.helper_attached = True
                 else: