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

Don't Modify File Just by Viewing #1966

Closed
1 task done
Greg-McPherran opened this issue Mar 7, 2020 · 4 comments
Closed
1 task done

Don't Modify File Just by Viewing #1966

Greg-McPherran opened this issue Mar 7, 2020 · 4 comments

Comments

@Greg-McPherran
Copy link

Greg-McPherran commented Mar 7, 2020

Description

When open existing file just to view, it becomes modified, and because I use AutoSave, it saves the changes. The changes made relate to adding blank line after SetExt heading (e.g. heading 2). When I edit it as text I have no blank line after the SetExt "-----------------" but MarkText adds it. Even if this or other sytnax is not right, I don't want MarkText to change the file automatically (i.e. unless I want it to.)

Great Markdown tool, by the way!!

  • Can you reproduce the issue?

Steps to reproduce

1 .Edit with normal text editor:

Test Heading
--------------
Test line of data.
  1. Open with Marktext with AutoSave on and file is changed such that if again open with normal text editor it appears as follows with blank line added after heading:
Test Heading
--------------

Test line of data.

Expected behavior:

File should not be modified and saved automatically (e.g. with blank line added).

Actual behavior:

Blank line is added triggering file save because AutoSave is on.

Versions

  • Mark Text: 0.16.0-rc3
  • Operating system: Windows 10.0.18362
@zhengpd
Copy link
Contributor

zhengpd commented Mar 11, 2020

The automatic changes issue is discussed at #1354 . For now MarkText would parse the file before showing it in editor, which cause some automatic changes.

@Greg-McPherran
Copy link
Author

Solution: Offer and "Open for Viewing" menu option, that opens the file as read only. From there the user could switch to "editing mode" if they want.

This allows you to keep parsing and changing your internal buffer the way that you already do - just the buffer won't be treated as a file to be saved unless user switches to "edit mode".

Thank You.

@zhengpd
Copy link
Contributor

zhengpd commented Mar 11, 2020

@Greg-McPherran As a suggestion, you might close this issue and follow up to #1354 to get latest update related to automatic changes. The dev team are discussing possible option there. I'm also a user who wants the read-but-not-auto-change behavior.

@fxha
Copy link
Contributor

fxha commented Jun 6, 2020

I'm closing this issue in favour of #2189. You may want to subscribe there for further updates.

@fxha fxha closed this as completed Jun 6, 2020
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

3 participants