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

Cut-Off code when pasting a large minified style #21

Closed
silverwind opened this issue Oct 3, 2014 · 8 comments
Closed

Cut-Off code when pasting a large minified style #21

silverwind opened this issue Oct 3, 2014 · 8 comments

Comments

@silverwind
Copy link
Contributor

When pasting 80k of minified code with no line breaks into the CodeMirror editor, the content of the code box gets cut off at around 15k characters. I suspect this might be caused by the old CodeMirror version in use.

@JasonBarnabe
Copy link
Contributor

Do you have any evidence that would point to it being fixed if I updated CodeMirror?

@silverwind
Copy link
Contributor Author

No real evidence. It's just a suspicion as CM has probably changed a lot in recent years.

@marijnh: This is probably far-fetched, but do you remember an issue where pasting into CM could cut off the pasted text? The CM version in use here is 2.36.

@Baegus
Copy link
Contributor

Baegus commented Oct 3, 2014

Unfortunately, it seems to be caused by Chromium. See:
codemirror/codemirror5#848

@JasonBarnabe
Copy link
Contributor

@silverwind
Copy link
Contributor Author

Hmm, not totally conviced. Here's a sample CSS: http://goo.gl/SSS5mj

I can paste the content of this file fine on http://codemirror.net/demo/theme.html as well as another CM 4.6 instance I run.

@Baegus
Copy link
Contributor

Baegus commented Oct 4, 2014

I just tried installing the latest CodeMirror into Stylish and it seems to be fixed, at least with the CSS you provided there.

@silverwind
Copy link
Contributor Author

Nice! Maybe you could do a PR with the updated CM, so this can get fixed quickly.

@marijnh
Copy link

marijnh commented Oct 4, 2014

Yes, this was a Chrome bug that CodeMirror is now working around with, if I remember correctly, turning off line wrapping in its hidden textarea.

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

No branches or pull requests

4 participants