Hi

I was just wondering, in Synedit, there are many Lazarus specific
modifications. On top of this the original code (or what I believe to be
the original code) is kept.
They are distinguished by "IFDEF SYNLAZ" statements.

The question is what is the reason to keep the old/original code? As far
as I can see it isn't even used. Because until a week ago one of the
IFDEF had its IF/ELSE blocks swapped, so the Non-Laz version would have
a reference to a Method only defined in the Laz-Version. In other words
until a week ago, the non-laz version afaik wouldn't even have compiled.

If anyone knows any background on this, I would be interested in hearing
it. But it isn't important. I don't need the answer to archive anything,
except satisfying my curiosity.

Thanks
Martin


ps.

The "swapped" ifdef I am talking about was fixed by the patch for
http://bugs.freepascal.org/view.php?id=10591 (see the snipped below)
The "else" was refering to ScreenRowToRow, which is declared inside a
"ifdef syn_laz" block only.

> --- components/synedit/synedit.pp    (revision 15471)
> +++ components/synedit/synedit.pp    (working copy)
> @@ -2691,8 +2691,11 @@
>    nC2 := nC1 +
>      (rcClip.Right - fGutterWidth - 2 + CharWidth - 1) div CharWidth;
>    // lines
> -  nL1 := Max({$IFDEF SYN_LAZARUS}TopLine + rcClip.Top div fTextHeight
> -             {$ELSE}ScreenRowToRow(rcClip.Top div fTextHeight){$ENDIF},
> +  nL1 := Max({$IFDEF SYN_LAZARUS}
> +             ScreenRowToRow(rcClip.Top div fTextHeight)
> +             {$ELSE}
> +             TopLine + rcClip.Top div fTextHeight
> +             {$ENDIF},
>               TopLine);
>    nL2 := Min({$IFDEF SYN_LAZARUS}
>               ScreenRowToRow((rcClip.Bottom-1) div fTextHeight+1),


_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to