gsantner / markor

Text editor - Notes & ToDo (for Android) - Markdown, todo.txt, plaintext, math, ..
https://github.com/gsantner/markor/discussions/2269
Other
3.85k stars 370 forks source link

Disable auto renumbering the ordered list on pasting/inserting newline etc #2436

Open goyalyashpal opened 1 month ago

goyalyashpal commented 1 month ago

⚠️ This issue respects the following points: ⚠️

Description

Disable auto renumbering the ordered list on pasting/inserting newline etc

  1. When working with explicitly numbered ordered list, like 5. in asciidoc (& i suppose md too) ,
  2. and doing various actions like insert newline, delete an item, paste an item etc...
  3. all the carefully crafted custom numbering like ssy 10. 9. 8. ... get replaced with the unintended 1. 2. 3. ...

then

this often then leads to important data being overwritten or lost.

Information

Android version: 13 Device: rmx3381 App Version: v2.12.5 (154)

Source

F-Droid

Format / File type

Not specific

Additional info / Log

-
harshad1 commented 1 month ago

the undo-redo, and save stuff often glitches out with cut-pasting operations

This is a separate bug. I would appreciate it if you could document and file it with steps to reproduce

If you want to disable auto-renumbering:

you have 2 choices:

  1. Switch format to plain text, Paste, Switch back
  2. Disable auto-formatting (3 dots -> file settings -> auto formatting)

Note that you can still renumber a list by long pressing the ordered list button when auto-formatting is disabled

goyalyashpal commented 1 month ago

2. Disable auto-formatting (3 dots -> file settings -> auto formatting)

is that not available as a global config option?

harshad1 commented 1 month ago

No. IMO we can consider making a global default for new files.

goyalyashpal commented 1 month ago

we can consider making a global default for new files.

then in the per-file settings for auto-formatting, there should be 3 options:

gsantner commented 1 month ago

Bloat to have it in many ways, also harder for users to understand. Better just one button up there that toggles globally instead per-file.

goyalyashpal commented 1 month ago

better no per-file option AND global option.

ohw, ohkayh. i thought he said about giving additional option of global along with per f;le one

harshad1 commented 1 month ago

Pretty sure we went over this before when I was developing the auto renumbering system. Need to pull that discussion up.

Iirc the conclusion was that auto-numbering all files is the correct default and that we can disable it per file if needed.