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

Duplicate clear button #70

Open
pykong opened this issue Feb 8, 2020 · 1 comment
Open

Duplicate clear button #70

pykong opened this issue Feb 8, 2020 · 1 comment
Labels

Comments

@pykong
Copy link
Collaborator

pykong commented Feb 8, 2020

Executing a cell results (inline) will render two clear buttons ("x") of which only the lower one is functional.
See screenshot:

image

@pykong pykong added the bug label Feb 28, 2020
@pykong pykong changed the title Bug: Duplicate clear button Duplicate clear button Feb 28, 2020
@cgahr
Copy link
Collaborator

cgahr commented Mar 23, 2021

This problem is caused by the single if statement in line 505:
grafik

I'm not sure if this behavior is intended. Afaik, if "image/png" is present, "text/plain" doesn't contain anything.

A possible fix could be sorting and replacing if with elif:

def _write_mime_data_to_view(
    self, mime_data: dict, region: sublime.Region, view: sublime.View
) -> None:
    if "image/png" in mime_data:
        pass
    elif "text/plain" in mime_data:
        pass
    elif "text/html" in mime_data:
        pas
           

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