Skip to content

Commit

Permalink
Remove hidden syntax highlighting characters when copying from the de…
Browse files Browse the repository at this point in the history
…bugger console
  • Loading branch information
daveleroy committed Oct 15, 2022
1 parent 49ac98a commit bff6628
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/debugger_console_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ def on_query_context(self, key: str, operator: int, operand: Any, match_all: boo
self.set_input_mode()
return None

def on_post_text_command(self, command_name: str, args: Any):
if command_name == 'copy':
sublime.set_clipboard(sublime.get_clipboard().replace('\u200c', '').replace('\u200b', '').replace('\u200d', ''))

def on_text_command(self, command_name: str, args: Any):
if command_name == 'insert' and args['characters'] == '\n' and self.enter():
return ('noop')
Expand Down
1 change: 1 addition & 0 deletions modules/debugger_output_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def on_selection_modified(self): ...
def on_activated(self): ...
def on_deactivated(self): ...
def on_text_command(self, command_name: str, args: Any): ...
def on_post_text_command(self, command_name: str, args: Any): ...
def on_query_context(self, key: str, operator: int, operand: Any, match_all: bool) -> bool|None: ...
def on_query_completions(self, prefix: str, locations: list[int]) -> Any: ...

Expand Down

0 comments on commit bff6628

Please sign in to comment.