Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lockup on loading scripts with opcode at col 0 #146

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions skytemple_ssb_debugger/model/editor_text_mark_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def remove_breakpoint_line_mark(cls, b: GtkSource.Buffer, ssb_filename: str, opc
@classmethod
def create_opcode_mark(cls, b: GtkSource.Buffer, ssb_filename: str,
offset: int, line: int, col: int, is_for_macro_call: bool):
if col == 0:
# XXX: Bug in GtkSourceView 4. Placing it at col 0 will cause it to hang. It shouldn't be a big issue in most cases.
col = 1
textiter = b.get_iter_at_line_offset(line, col)
macro_call_suffix = '_call' if is_for_macro_call else ''
b.create_source_mark(f'opcode_<<<{ssb_filename}>>>_{offset}{macro_call_suffix}', CATEGORY_OPCODE, textiter)
Expand Down