Skip to content

Commit

Permalink
fix: Disable bracket pair colorization until color bug is not resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlin7 committed Mar 30, 2024
1 parent 88e4329 commit 0811729
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions biscuit/core/components/editors/texteditor/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,11 @@ def close_bracket(self, e: tk.Event):
if c == e.char:
self.mark_set(tk.INSERT, "insert+1c")
return "break"

self.insert(tk.INSERT, stack.pop(), self.base.theme.editors.bracket_colors[(i%3)] if i > -1 else 'red')
else:
self.insert(tk.INSERT, e.char, 'red')

# TODO; coloring not done right. whatever color the last bracket has that color is spread to the next characters
# self.insert(tk.INSERT, stack.pop(), self.base.theme.editors.bracket_colors[(i%3)] if i > -1 else 'red')
# else:
self.insert(tk.INSERT, e.char, 'red')
return "break"

def complete_pair(self, e: tk.Event, tag=None):
Expand All @@ -249,10 +250,11 @@ def complete_pair(self, e: tk.Event, tag=None):
return

# if there is no selection, insert the character and move cursor inside the pair
if tag:
self.insert(tk.INSERT, char + end, tag)
else:
self.insert(tk.INSERT, char + end)
# TODO; coloring is not done properly
# if tag:
# self.insert(tk.INSERT, char + end, tag)
# else:
self.insert(tk.INSERT, char + end)
self.mark_set(tk.INSERT, "insert-1c")
return "break"

Expand Down

0 comments on commit 0811729

Please sign in to comment.