On Mon, Aug 15, 2011 at 6:06 AM, Uwe Stöhr <uwesto...@web.de> wrote:


> Am 12.08.2011 20:12, schrieb Vincent van Ravesteijn:
>
>
>
>> Paragraph::insert(...) just calls Paragraph::insertChar(). Looking at
>> Paragraph::insertChar(...,
>> bool trackChanges) you can see that this does nothing else than
>> Paragraph::insertChar(..., Change
>> const & change) except for using "Change(trackChanges ? Change::INSERTED :
>> Change::UNCHANGED)".
>>
>>
>
> Thanks!
>
> The attached patch now works also in case of ChangeTracking correctly.
>
> So what is now only missing is to allow to insert a protected space in
> LyX-Code.
>
> regards Uwe
>
>
>
>  - } else if (style.free_spacing) {
> -  os << '~';
> + }
> + // we need a normal space here ('\ ') that allows line breaks
> + // and no protected space ('~') see bug #4742
> + else if (style.free_spacing) {
> +  os << "\\ ";
>   } else {
>    os << ' ';
>
I would prefer the comment within the else if {..} block.


>     } else {
> -    par.insertChar(pos, *cit, font, bparams.trackChanges);
> -    ++pos;
> +    // transfporm tabulators to 4 spaces because LaTeX cannot handle
>

transfporm -> transform

> +    // tabulators and outputting a single space instead is not what we
> +    // want in FreeSpacing mode
> +    par.insert(pos, from_ascii("    "), font, Change(bparams.trackChanges
> ?
> +        Change::INSERTED : Change::UNCHANGED));
> +    pos = pos + 4;
>      space_inserted = true;
>     }
>
I don't understand this. About which freespacing environments are we
talking. InsetListings for example can handle tabulators without problem, so
in that case it would be wrong to convert to four spaces. In ERT it's the
user's own responsibility not to use tabulators.

Could you elaborate on the idea behind this (or should* *I read the bug) ?

Vincent

Reply via email to