- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Dynamic paragraphing no longer usable #3996
Comments
Would be really awesome if you could bisect this... /cc egmont just because it faintly remember you did a lot of work on the editor / viewer back in the time. |
Do we want move to the next paragraph after format of current one? |
I worked on the viewer only, so that's not relevant here. |
Hi again, turns out memory decieved me. Debian 8 wasn't fine, but Debian 7 (4.8.3) was. Always bugged me, should've reported it earlier...
Downloaded bin packages from Ubuntu and Slackware to narrow it down:
I really can't see how this could be intentional, you can't edit a text if your cursor keeps jumping away. Even when you're already in the last paragraph the cursor jumps to the end of that after each letter. In its current form Dyn. Para. is useless except when adding to or deleting from the very end of the last paragraph.
I guess I could attempt to bisect, however it's obvious that this is not just 1 unlucky commit, some kind of rework took place 4.8.5→10, which then someone tried to fix 4.8.10→12, and only got it almost right. And even if I find the (at least) 2 commits in question, I doubt you'll be able to revert them, the code surely has changed too much. So if you ask me to bisect, I will, but only if you think it will actually help you.
Thanks & regards |
Replying to JRottm:
I've already found the bad commit (see comment:2).
I would like to get a reply to my question in comment:3:
|
IMHO current behavior makes no sense. If one's intention was to only format all paragraphs, one after the other, why would you have to add/delete a letter in each to trigger the formatting. If someone wants batch-formatting they'd just filter it through fold(1). Rather, it's supposed to wrap dynamically while you're editing your text, but you can't edit when the cursor keeps jumping away. |
Nitpicking: There's a function for this in mcedit: F9 -> Format -> Format paragraph (M-p). This action should (and does) jump to the beginning of the next paragraph, so that you can simply repeat it multiple times (or hold M-p) to get it repeated for multiple paragraphs.
I fully agree. While typing (or erasing) text, the cursor needs to stay at the same logical position within the text during automatic formatting, so that (apart from space <-> newline conversions) the text ends up being whatever you type. Otherwise this functionality is useless.
Two side notes:
As I'm testing this feature now, I face other buggy behavior as well. There's nothing concrete I could reproduce and report at this moment, but I've faced a line getting wrapped much sooner than desired; also a complete line getting erased from the display, as part of a bigger display corruption where each line got fixed as soon as the cursor entered it.
If this feature has been broken for 5-6 years without anyone reporting it, it's pretty much a sign that hardly anyone wishes to have this mode. Instead of fixing it, removing it for good is another possibility to consider. I mean, OP would sure be disappointed by this resolution, but from the project's maintenance point of view it might make sense. Note: I'm not saying this is what the project should do, I'm just saying it might be a reasonable step to consider. (Do popular text editors, e.g. vim and emacs have such a mode?) |
Branch: 3996_dynamic_format_fix |
|
|
Important
This issue was migrated from Trac:
JRottm
(JRottm@….de)egmont
(@egmontkob)dynamic
,paragraphing
To reproduce:
1) open a new, empty file in mcedit
2) Options->General: enable Dynamic paragraphing. Hint: also set line length e.g. to 20, makes the next step faster, because you don't have to type so much.
3) Type rubbish words and occasional spaces e.g. "lorem ipsum dolor sit amet..." or whatever until you have filled 2-4 lines.
4) Start a new paragraph by pressing enter twice.
5) Repeat until you have 2-3 paragraphs.
6) Move cursor back to 1st paragraph.
7) Try to edit something in the 1st paragraph.
Expected behavior:
You can edit 1st paragraph. Lines should wrap dynamically if you add or delete words.
Observed behaviour:
After just 1 keypress (added or deleted letter) cursor immediately jumps to start of next paragraph. If you had intended to add a whole word in 1st paragraph you have to move cursor back, add another letter, move cursor back, add another letter, etc. This makes "dynamic paragraphing" utterly unusable.
Affected versions:
My current system:
Debian 10, x86, 64 bit.
GNU Midnight Commander 4.8.22
Built with GLib 2.58.2
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
mc --configure-options: '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' 'AWK=awk' 'X11_WWW=x-www-browser' '--libexecdir=/usr/lib' '--with-x' '--with-screen=slang' '--disable-rpath' '--disable-static' '--disable-silent-rules' '--enable-aspell' '--enable-vfs-sftp' '--enable-vfs-undelfs' '--enable-tests' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/mc-4.8.22=. -fstack-protector-strong -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
Thanks, and best regards
The text was updated successfully, but these errors were encountered: