Tapatalk

Counting lines in status bar - with or without last "invisible" line

Counting lines in status bar - with or without last "invisible" line

1581
Power UserPower User
1581

    Feb 21, 2020#1

    The status bar shows (along others) the number of counted lines.

    Sometimes it counts one line to much . see images. What's the background?
    ue_count_2.png (7.94KiB)
    ue_count_1.png (74.73KiB)
    UE 26.20.0.74 German / Win 10 x 64 Pro

    6,685587
    Grand MasterGrand Master
    6,685587

      Feb 21, 2020#2

      The status bar shows the number of line terminators found in file plus one, i.e. the number of carriage return + line-feed pairs in a text file using DOS/Windows line terminators incremented by one. A string at end of file with no line termination is technically no line. But in a text editor this string at end of file with no line termination is displayed nevertheless on a line. I suppose plus one is used to get displayed the same line number in status bar as in line number area on no line termination at end of file. It would be more accurate not incrementing the number of found line terminators by one on file ends with a line termination in my opinion.
      Best regards from an UC/UE/UES for Windows user from Austria

      1581
      Power UserPower User
      1581

        Feb 21, 2020#3

        But sometimes it does not "add plus 1" - see above, see here. But that's not that important; more a strange thing. Maybe @idm will take a look.
        ue_count_3.png (18.91KiB)
        UE 26.20.0.74 German / Win 10 x 64 Pro