-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow text files to be edited even when empty #1724
Allow text files to be edited even when empty #1724
Conversation
I'll close #1723 in favor of working on it here, it clearly doesn't solve the entire problem. |
The previous commit works as expected. I made the document's There is a helper |
- CodeEditTextView 0.7.3 -> 0.7.4 - CodeEditSourceEditor 0.7.2 -> 0.7.3 - CodeEditLanguages 0.1.18 -> 0.1.19
…llow-edit-text-file-when-contents-in-empty
Only check for when `CodeFileDocument.content` is not nil. If the content is an empty string, it means we're viewing an empty text file, which is a predictable behavior. Also, the extra checks cause unexpected behaviors. Check the related pull request (CodeEditApp#1724) for visuals.
Showing the visuals for 45c39ce WITH EXTRA CHECKS: specific-non-empty-files-open-with-quicklook.movThe affected files are same as in #1722 (comment)
WITHOUT THE EXTRA CHECKS: predictable-behavior-so-far.mov |
…llow-edit-text-file-when-contents-in-empty Why merge conflicts????
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, please merge conflicts and we can merge
…llow-edit-text-file-when-contents-in-empty
…llow-edit-text-file-when-contents-in-empty
Description
This is done by making sure the opened file can be encoded as text.
Has been tested against a plethora of file types.
Related Issues
Checklist
Screenshots
allow-text-files-to-be-edited-even-when-empty.mov