Skip to content

Commit 3b011f6

Browse files
committed
Do not fail because of styles (closes #91)
1 parent 9203b09 commit 3b011f6

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

cs_eval.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,18 @@ def toggle_phantom(self, text, styles):
115115
self.phantom_id = self.view.add_phantom(self.value_key(), sublime.Region(point, point), body, sublime.LAYOUT_BLOCK)
116116

117117
def phantom_styles(self, scope):
118-
styles = []
119-
_, fg = self.scope_color(f"{scope}_fg")
120-
if fg:
121-
styles.append(f"color: {fg};")
122-
_, bg = self.scope_color(f"{scope}_bg")
123-
if bg:
124-
styles.append(f"background-color: {bg};")
125-
if styles:
126-
return " ".join(styles)
118+
try:
119+
styles = []
120+
_, fg = self.scope_color(f"{scope}_fg")
121+
if fg:
122+
styles.append(f"color: {fg};")
123+
_, bg = self.scope_color(f"{scope}_bg")
124+
if bg:
125+
styles.append(f"background-color: {bg};")
126+
if styles:
127+
return " ".join(styles)
128+
except:
129+
pass
127130

128131
def toggle_pprint(self):
129132
node = cs_parser.parse(self.value)

script/socket_repl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os, subprocess
33

44
if __name__ == '__main__':
5+
print("Starting Server Socket REPL at port 5555")
56
os.chdir(os.path.dirname(__file__) + "/..")
67
subprocess.check_call(['clojure',
78
'-J--add-opens=java.base/java.io=ALL-UNNAMED',

0 commit comments

Comments
 (0)