Skip to content

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

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

Closed
darkred opened this issue Jan 23, 2018 · 5 comments
Labels

Comments

@darkred
Copy link
Collaborator

darkred commented Jan 23, 2018

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.

@darkred darkred changed the title 'GitHub Toggle Code Wrap' and 'GitHub Copy Code Snippet' conflict (by themselves and) with 'GitHub Collapse In Comment' 'GitHub Toggle Code Wrap' and 'GitHub Copy Code Snippet' conflict by themselves and with 'GitHub Collapse In Comment' Jan 23, 2018
@Mottie
Copy link
Owner

Mottie commented Jan 23, 2018

Hi @darkred!

Thanks for letting me know! Hmm, actually they behave differently depending on the priority; though either way, they misbehave! I'll see what I can do later tonight.

@Mottie Mottie added the bug label Jan 23, 2018
@Mottie Mottie closed this as completed in d06891e Jan 24, 2018
@darkred
Copy link
Collaborator Author

darkred commented Jan 24, 2018

Thank you for fixing the conflict of ''GitHub Copy Code Snippet'.
Also, the icons of the two scripts no longer competely overlap, i.e. you now have to lower the mouse to reveal the 2nd icon.

I see that you closed the issue, but in your commit, no changes for ''GitHub Toggle Code Wrap' were included, but it also conflicts with 'GitHub Collapse In Comment', i.e. the code block doesn't collapse when the former is enabled.
If there's nothing you can do to make these two compatible, ok.
I just wanted to mention it to you in case it might have missed your attention.

@Mottie
Copy link
Owner

Mottie commented Jan 24, 2018

Oops, I forgot about the Toggle code wrap code.

@Mottie Mottie reopened this Jan 24, 2018
@darkred darkred changed the title 'GitHub Toggle Code Wrap' and 'GitHub Copy Code Snippet' conflict by themselves and with 'GitHub Collapse In Comment' 'Toggle Code Wrap' and 'Copy Code Snippet' conflict by themselves and with 'Collapse In Comment' Jan 25, 2018
@Mottie Mottie closed this as completed in c7a225f Jan 28, 2018
@Mottie
Copy link
Owner

Mottie commented Jan 28, 2018

All fixed! Please make sure to update both scripts.

@darkred
Copy link
Collaborator Author

darkred commented Jan 28, 2018

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants