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

Strange behavior when editing large files #2505

Open
4 tasks done
jourje opened this issue Jan 9, 2025 · 7 comments
Open
4 tasks done

Strange behavior when editing large files #2505

jourje opened this issue Jan 9, 2025 · 7 comments

Comments

@jourje
Copy link

jourje commented Jan 9, 2025

⚠️ 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

When editing some files (it seems to happen only on large files, 200+ lines), the first input after changing the focused line cause a strange behavior. The newly focused line is modified with part of the old focused line (see screenshot), and I have to undo a few times to get the right text back. This only happens once when opening the file. On those files it happens every time. It doesn't happen on every file.

I run the latest FDroid version. But this has been the case for as long as I've been using the app (a year or 2).

Opening the file:
Screenshot_20250109-130126

Changing focus and hitting new line:
Screenshot_20250109-130137

Steps to reproduce

  1. Open a large file
  2. Choose a different line
  3. Input something

Information

Android version: 15
Device: Pixel 8
App Version: v2.14.0 (157)

Source

F-Droid

Format / File type

Not specific

Additional info / Log

-
@jourje
Copy link
Author

jourje commented Jan 9, 2025

One of the files:
mtg.txt

@harshad1
Copy link
Collaborator

I can't reproduce this at all.

Are you using a 3rd party keyboard?

@jourje
Copy link
Author

jourje commented Jan 10, 2025

No, I am using the default AOSP keyboard shipped with grapheneOS.

But you are right, it may very well be a system issue and not an app issue. Especially since I seem to be the only one experiencing it.

I will try with another editor and report here if it behaves the same.

@nyanpasu64
Copy link

I seem to be the only one experiencing it.

I recall getting a similar issue with Markor and Gboard, and switched to Obsidian on Android over it. Then I started getting truncated files or failing to save changes, and nobody seems to have reported that either, so I'm planning to test Markor again. I haven't gotten this issue yet, but will keep this thread updated.

@nyanpasu64
Copy link

Sorry, the specific different issue I got was the keyboard freezing up when I slid the backspace key left to delete by words.

@c-s-n
Copy link

c-s-n commented Jan 25, 2025

I am relieved that someone else also faces this issue 😟 I have been trying to find reliable steps to reproduce on my device for quite some time, but haven't succeeded yet. It has been annoying me for months and is imho rather severe in the sense that it screws up the file (yes, Undo luckily works).

Device and OS

  • Android version: 15, CalyxOS
  • Device: Pixel 7a
  • App Version: v2.14.0
  • AOSP keyboard

Rather similar to the one from @jourje I'd say.

Issue description
My take on describing the issue: When opening a file that I had opened in Markor before, the cursor is at the position where I previously left. When then tapping into a different line, the cursor visibly changes to that position. When now starting to type (via AOSP on-screen keyboard), the typed character is written to the old position instead. And additionally, left to this typed character, the contents from the tapped on line replace the corresponding amount of characters here. It hence screws up the text around the old cursor position.

Further findings

  • This happened for me within Markdown files (I mainly use this type), but also within todo.txt.
  • It indeed seems to be related to a larger file size.
  • It generally happens when freshly reopening a file, but once I noticed it also during the editing of a file, after hitting Enter a lot of times to move a text block "out of sight"; where the subsequent tap into another line and then typing also caused described behavior.
  • For me this seems to have started with v2.13.x, but not 100% sure on this bit.

Reasons why I think that it is not related to the AOSP keyboard:

  • It only happens in Markor, not any other messenger or the like.
  • It generally only happens after opening a file in Markor, that seems like a keyboard-independent context.
  • The keyboard should not have control over the cursor position, i.e. cannot jump back nor knows that position?

@o-alquimista
Copy link

The keyboard should not have control over the cursor position, i.e. cannot jump back nor knows that position?

The AOSP keyboard shipped with CalyxOS comes with a gesture that controls the cursor by sliding your finger over the Space bar, so it does have some control over the cursor.

But I can only reproduce this problem in Markor, on both CalyxOS and LineageOS.

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

5 participants