Hi all :)

Well, I should have said "half deterministic gqap". This command reflows
a paragraph, and in certain circumstances if you apply it repeteadly on
some paragraphs, the layout is different.

The details: you have a badly flowing paragraph and want to reflow it to
fit nicely in the current textwidth. That produces a new layout of the
words in the paragraph. Once it is properly reflowed, issuing "gqap"
again on the same paragraph shouldn't change the current layout, since
it is already reflowed. The problem is that the algorithm produces a new
layout. No line is longer than textwidth, so the algorithm thinks the
layout is correct. If you use "gqap" again, the previous layout is
generated. Each time you use "gqap" (after the first time, of course)
the algorithm switches between those two layouts.

This doesn't happen always. For example, the paragraphs above only have
that layout after gqap'ing them at my 72 textwidth, but some other
paragraphs don't. I'm afraid that the cause is that sometimes gqap
leaves a line exactly "textwidth" long when it is reflowing, but when
reflowing again, it considers such lines as "long". That is, gqap is
producing lines that are longer than what it considers "long", so
reflowing forces a layout change. If this is so, finding a line that
produces the problem is hard.

I'm sorry I don't have such a paragraph right now: last time I noticed I
didn't save the "offending" paragraph so I cannot show a proper example.
I just want to know if any other has experienced this and if so, try to
isolate the problem and maybe write a patch.

If I can find a problematic paragraph I'll post it as a reply to this
message.

Thanks :)

-- 
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to