-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Marktext changes stuff even if nothing was done pressed by the user #2048
Comments
Hi @B0pol, The Gif 2 example seems perfectly logical to me. You open Mark Text and get an empty document (not saved yet). You type something (and delete it). Mark Text then assumes the document has changed and asks you to to save it. Any editor does it like that. Gif 1 example: The README.md file you are opening - is that a proper Markdown file or is it actually a HTML file? Simply opening any proper .md file and putting the cursor on top does not make Mark Text suggest file save when I test it. |
Not vscode, not atom. And if it you changed nothing at the end, when quitting, it makes no sense to save nothing. But indeed gedit, libreoffice do that.
It's this repos's README.md in the GIF. But it also happens with all the README.md I've tested mixing HTML and markdown. It doesn't happen with .md files with text only. |
Hi again, @B0pol Agreed, not all editor does it like that. I tested Sublime Text and LibreOffice only - which did. Regarding Gif 2 I am able to reproduce the issue by creating a simple .md file with this test content (there are two empty lines below the table):
When Mark Text opens this file it silently removes the last empty line and indicate that the document has changed. When saving it from Mark Text the file then has 14 lines, and there where 15 lines in the original file. |
Looks related to #1966. |
In the case of an empty buffer, I suggest that no save confirmation is provided, regardless of whether the buffer was always empty or had been modified. An empty buffer is a special case. Because no content exists to be saved, it is reasonable to assume that the user has no wish to write a file. Of course, writing an empty file ought to be possible. But even if the user forgets, no work is lost. |
I'm closing this issue in favour of #2189. You may want to subscribe there for further updates. |
Description
Marktext edits the file, even if I haven't changed anything
Steps to reproduce
Gif 1:
Gif 2:
Expected behavior:
Gif 1 & Gif 2:
Marktext doesn't show a button at top to mean the file has changed.
Marktext doesn't ask for confirmation when quitting.
Marktext doesn't edit stuff when I press nothing. We expect it to automatically edit files with a key combination, not pressing anything.
Actual behavior:
add lines or delete lines, reorder characters…
Link to an example: [optional]
Versions
PS: as you can see some things are deprecated, but it's not the subject of this ticket
The text was updated successfully, but these errors were encountered: