https://bugs.documentfoundation.org/show_bug.cgi?id=155494

--- Comment #23 from Attila Szűcs <attila.sz...@collabora.com> ---
justified alignment means text are from left margin to right margin... so,
spaces after last letter MUST be on the margin.

dropping spaces to new line wont help here.. only if we break the justified
alignment.. but i bet we dont want to do that... justified alignment is a
commonly used good feature.
(justified is not the only problem, but seemed easy to explain)


If we accept spaces on margin.. we can choose to 
A) hide all those spaces.. 
B) try to show all spaces
C) try to show some spaces.. and maybe have some tricks

A) all spaces was hidden before my commit...
pro: there was nothing to argue about, if the space/cursor is over the margin
or the page, or cell border...
con: we dont have a chance to find extra spaces if that is a problem.. + cursor
movement problems

B) showing all spaces is impossible normally .. if i insert 1 million spaces..
?! ... would we make a scrollbar 10000 times wider as the page itself?! :)

C) showing some spaces is what i tried to achieve... 
pro: we can see some extra spaces, and may move on them ... 
practically we can eliminate A) con part for a limited amount of spaces... in
default case it is about 20 space
con: after the limited amount of spaces it will have some problems... based on
what we do after it.. 

i did not do much after it .. because:
1) That was the fastest way :) (doing nothing :) )
However i handled a few special cases i found.. like if you put an image into
the text... i made sure the cursor wont be displayed under/after the image
2) naively i thought having ~100 meaningless spaces is a so rare case, that we
could accept that is a bit ugly , and suggest to delete some of them.. :)
3) There is many special cases that should be handled, and i dont even know
every case... if you found 1 and report it.. someone may fix that case..

But dont forget.. we can mix A) and C) in different cases.... or based on an
option.. like a toggle button to show spaces or not... or whatever...


I think we should rather analyze the special cases where and what is the
problem.. and set the limitation based on that... 

For example .. i thought having cursor + extra spaces go from margin only
untill the page end .. would be better... then it would be like A) with a bit
of extension.. that is will work for like 20 spaces better

it is good that someone mentioned that in tables it is a bigger problem.. 
we should fix it... we could disable this behaviour there.. and fallback to A)
case... i think

Or if someone would find a common solution.. where not to display or move the
cursor.. / display the spaces... but im not sure if we could find a common
solution..


Selection is just an other special case i did not fixed because of 1) .. :)
but if i have to fix all related problems while i fix a bug... then i wont be
able to fix any complex problems. :)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to