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

notify the user that we only overwrite text with length >=2 #2198

Open
4 tasks done
XYIheng opened this issue Jan 4, 2024 · 4 comments
Open
4 tasks done

notify the user that we only overwrite text with length >=2 #2198

XYIheng opened this issue Jan 4, 2024 · 4 comments

Comments

@XYIheng
Copy link

XYIheng commented Jan 4, 2024

⚠️ This issue respects the following points: ⚠️

  • This is a bug. Not a question or feature request.
  • The topic is not already reported at Issues. (I've searched it).
  • Markor is up to date. See Releases for the latest version. Updates are available from F-Droid and GitHub.
  • The bug is still present in the latest development version (git master). (Please download and try the test version of Markor, named Marder. Don't worry; Markor and Marder appear as completely separate applications. You can install both side-by-side, and Markor settings are not touched. In case the issue is resolved there, you don't need to create a bug report. The change will be part of the next Markor update.)

Description

I created a file named "A.md" with content "A". Then I click FAB to create "A.md" again. Markor doesn't redirect" to the existing file and just creates a new A.md with empty content.
It only happens when the length of the content equals 1.

Steps to reproduce

  1. Create a file named "A.md" with content "A"
  2. Back to file list
  3. Click FAB to create a file with the same name "A.md"
  4. See the error: markor shows empty content rather than redirect to the existing file

Information

Android version: 8
Device:
App Version: 2.11.1

Source

F-Droid

Format / File type

Not specific

Additional info / Log

- a relevant bug report https://github.com/gsantner/markor/issues/994
@harshad1
Copy link
Collaborator

harshad1 commented Jan 4, 2024

@XYIheng
Copy link
Author

XYIheng commented Jan 4, 2024

@harshad1 Thanks for the explanation!

@XYIheng
Copy link
Author

XYIheng commented Jan 5, 2024

It seems weird. Maybe it's better to overwrite text length >=1. Or we should give a hint to notify the user that we only overwrite text with length >=2

@gsantner
Copy link
Owner

Making a Toast.LENGTH_SHORT would be a option, when this non saving case triggers.

You can reach the ~1-2 chars by i.e. \n / \r\n. If you really want to clear out a file you always have the save button to explicitly save a empty document. OR the option to delete the file as a whole.

@gsantner gsantner reopened this Mar 27, 2024
@gsantner gsantner changed the title Bug: Create new file with the same name overwrite existing file content notify the user that we only overwrite text with length >=2 Mar 27, 2024
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