Menu

#4 [BUG] In status bar, "Ln", "Col" and "Pos" sometimes show "Â " instead of locale-induced NBSP

1.0
pending
Bug (2)
2025-01-03
2024-12-04
dtyl
No

The status bar usually displays cursor position by:
Ln : LINENUM Col : COLNUM Pos : POSNUM
The issue often appears when one or several of these LINENUM/COLNUM/POSNUM exceeds 1000. Such values are formatted using the locale, which on my computer (fr) implies adding a no-break space (NBSP) between thousands/millions/...

Steps:

  1. Write several lines with more than 1000 characters.
  2. Write more than 1000 lines.
  3. Navigate between lines and columns.

Current behavior:
Sometimes NBSP (U+00A0) of all these numbers is replaced by "Â " i.e. bytes of U+00A0 are displayed using ANSI codepage 1252 (A0 00). When the issue appears, it impacts all numbers greater than or equal to 1000 of that status line.
The column containing the line number (the primary goal of that plugin) seems not being impacted.
I have not found any clue indicating when this bug appears or disappears. It does not appear when this plugin is disabled, and appears with only that plugin enabled.

Expected behavior:
NBSP is displayed as a single blank character for each of the position numbers.

Debug information:
Notepad++ v8.7.1 (64-bit)
Build time : Oct 31 2024 - 00:48:56
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 22H2
OS Build : 19045.5131
Current ANSI codepage : 1252
Plugins :
CustomLineNumbers (1.1.10)

Discussion

  • Andreas Heim

    Andreas Heim - 2024-12-07
    • labels: --> Bug
    • status: open --> accepted
    • assigned_to: Andreas Heim
     
  • Andreas Heim

    Andreas Heim - 2024-12-07

    I can reproduce this issue. I will have a look at it but this may take some time. Please be patient.

     
  • Andreas Heim

    Andreas Heim - 2025-01-03
    • status: accepted --> pending
     
  • Andreas Heim

    Andreas Heim - 2025-01-03

    I was able to fix your issue. It only occured in the 64 bit version of the plugin, presumably because of a bug in the RTL of Delphi XE2 related to regular expressions.

    I changed the implementation of the code that sets the status bar position infos away from a regular expression approach to a handcrafted method using character searches. Though I have tested it carefully, I would appreciate it very much if you would test the new version of the plugin and give some feedback, especially if you find bugs.

    You can download the newest version 1.1.11 from the "Files" section of this repository.

     

Log in to post a comment.

MongoDB Logo MongoDB