Menu

Bug: wrong number of characters reported

cchris
2009-04-28
2012-11-13
  • cchris

    cchris - 2009-04-28

    In Notepad++ 5.3.1 unicode:

    1/ Write the following lines of text:

    aaaaa aaaaa aaaaa
    bbbbb bbbbb bbbbb
    ccccc ccccc ccccc

    2/ make a rectangular selection between column 3 and 5 on the 3 lines.

    You would expect 9 characters in selection? The status bar displays: Sel: 41 !

    3/ Now do Alt-Shift-Left 3 times. There is no more character selected on the screen, selection has zero (3-3) width. Sel: 38.

    Explaination: there are 17 characters on the first line after the selection start, including the final \r\n. 19 on the full second line. 5 on the third line until selection end. 17+19+5=41 qed. And column extension counts one character less, instead of <number of lines> less. So 41-3=38.

    Can't be a feature, so it is a bug.

    CChris

     
    • Thell Fowler

      Thell Fowler - 2009-04-28

      I'd say that's a bug; and I see the same here.

      I assume you posted this in the forum rather than a bug report to get a confirmation.

       
    • cchris

      cchris - 2009-04-28

      yep, wil file one. I don't use that display often, nor rectangular selections, so I cannot say when it started breaking.

      I looked at it when I thought "zero width selections are invisible, but they should have a Sel: 0 footprint or something that shows they are there". Well, they are quite visible after all...

      CChris