Skip to content

'Toggle Code Wrap' and 'Copy Code Snippet' conflict by themselves and with 'Collapse In Comment' #35

Closed
@darkred

Description

@darkred

STR

  • Using TM 4.5.5663beta in Firefox 58 or TM 4.5 in Chrome 63:
    install latest versions of:
    'GitHub Collapse In Comment' 1.0.13
    'GitHub Toggle Code Wrap' 1.1.3
    'GitHub Copy Code Snippet' 0.1.0

  • here is a long code example:

SublimeLinter: error in SublimeLinter daemon: 
SublimeLinter: -------------------- 
SublimeLinter: Traceback (most recent call last):
  File "C:\Users\Kostas\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\lint\queue.py", line 57, in loop
    item = self.q.get(block=True, timeout=self.MIN_DELAY)
  File "./python3.3/queue.py", line 175, in get
queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Kostas\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\lint\queue.py", line 65, in loop
    self.lint(view_id, timestamp)
  File "C:\Users\Kostas\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\lint\queue.py", line 111, in lint
    self.callback(view_id, timestamp)
  File "C:\Users\Kostas\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\sublime_linter.py", line 263, in lint
    Linter.lint_view(view, filename, code, hit_time, callback)
  File "C:\Users\Kostas\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\lint\linter.py", line 1008, in lint_view
    callback(cls.get_view(vid), linters, hit_time)
  File "C:\Users\Kostas\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\sublime_linter.py", line 316, in highlight
    highlights.draw(other_view)
  File "C:\Users\Kostas\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\lint\highlight.py", line 133, in draw
    all.draw(view)
  File "C:\Users\Kostas\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\lint\highlight.py", line 477, in draw
    icon = self.get_style("icon", style, error_type)
  File "C:\Users\Kostas\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\lint\highlight.py", line 184, in wrapper
    return persist.gutter_marks["icons"][error_type]
KeyError: 'warning'
 
SublimeLinter: -------------------- 
  • Here is how the markdown is displayed, i.e. the code is not collapsed:
    2018-01-23_180240
  • Clicking the header:
    2018-01-23_181209
  • Disabling either 'GitHub Toggle Code Wrap' or 'GitHub Copy Code Snippet' or both fixes the issue:
    2018-01-23_180307

Additionally, the two scripts 'GitHub Toggle Code Wrap' and 'GitHub Copy Code Snippet'
work ok by themselves, but their icon is displayed on top of one another.
and so, in order to be able to use them, you have to have only one enabled at a time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions