Skip to content

Commit

Permalink
Fix default block implementation (#1708)
Browse files Browse the repository at this point in the history
`self` was a typo I think, see comment-block for an implementation that
works.

This fixes a bug with saying "block" in c-style languages. Before this
PR, it crashes. After this PR, it uses the default successfully.
  • Loading branch information
SCdF authored Jan 27, 2025
1 parent 16adf1c commit b57dac8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lang/tags/imperative.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
mod.tag("code_block_c_like", desc="Language uses C style code blocks, i.e. braces")

c_like_ctx.matches = """
tag: self.code_block_c_like
tag: user.code_block_c_like
"""


Expand Down Expand Up @@ -65,7 +65,7 @@ def code_try_catch():
"""Inserts try/catch. If selection is true, does so around the selection"""


@c_like_ctx.action_class("self")
@c_like_ctx.action_class("user")
class CActions:
def code_block():
actions.user.insert_between("{", "}")
Expand Down

0 comments on commit b57dac8

Please sign in to comment.