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

Inconsistent text width using minimum raggedness algorithm #35

Open
rljacobson opened this issue Jun 20, 2020 · 1 comment
Open

Inconsistent text width using minimum raggedness algorithm #35

rljacobson opened this issue Jun 20, 2020 · 1 comment
Labels

Comments

@rljacobson
Copy link

I get different paragraph widths, sometimes dramatically different, within the same source file. This appears to occur only when using the minimum raggedness algorithm.

Screenshots of the inconsistent behavior between the two algorithms are attached. In case it is relevant, I have set visual markers at 80 characters and at 100 characters, and I have it set to hard wrap at 100 characters.

I hate to suggest this, especially given my own personal inclinations, but... As interesting as the SMAWK algorithm is, in practice it is likely to provide an advantage only in the most esoteric applications none of which are likely to be realizable within IntelliJ. The simplest dynamic programming algorithm, despite its O(n^2) asymptotic running time, is simpler, shorter, and likely runs faster for any given input it will ever see as an IntelliJ plugin.

Not that I'm criticizing. I totally would have implemented SMAWK, too! My point is only that, from the perspective of maintenance, bug squashing, and checking correctness, it might be worth swapping it out for the simple undergraduate version.

Thank you for such a useful plugin!

Screen Shot 2020-06-20 at 1 29 02 AM

Screen Shot 2020-06-20 at 1 30 20 AM

@rljacobson rljacobson changed the title Inconsistent text with using minimum raggedness algorithm Inconsistent text width using minimum raggedness algorithm Jun 20, 2020
@abrookins
Copy link
Owner

@rljacobson Truer words were never spoken. One day I’ll have more time for this plugin... 😂

@abrookins abrookins added the bug label Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants