On Wed, Mar 30, 2005 at 10:12:01AM +0200, Jean-Marc Lasgouttes wrote: > >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Martin Vermeer wrote: > >>> Do you have problems with 1.4.0cvs? The counting code seems > >>> reasonable there (although there is a +1 I am not sure to > >>> understand). > >> I was wondering about that too. Angus should know. > > Angus> return int(lyx::count(str.begin(), str.end(),'\n') + 1); > > Angus> How many lines in: "foo\nbar\nbaz" ? > > Two (that is, two new lines have been created). It is not the lines > that are counted, but the carriage returns.
Yes, I agree. "foo" is appended to an existing line. > JMarc I removed the "+ 1" from Note inset and recompiled; works impeccably now. I propose to do this for all insets having this counting statement. OK? - Martin
pgpFXuJJ652v2.pgp
Description: PGP signature