bugGNU nano - Bugs: bug #52057, the report of a failed search is...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #52057: the report of a failed search is mistakenly dottified

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 18 Sep 2017 07:31:54 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  dolorous Open/Closed:  Closed

Tue 19 Sep 2017 07:18:08 PM UTC, comment #2: 

Thanks for the patch.  Pushed to git: 5561d22f.

Benno Schulenberg <bens>
Group administrator
Tue 19 Sep 2017 01:10:05 AM UTC, comment #1: 

The problem is that, in not_found_msg(), numchars is getting the index of a byte count (via mbstrnlen()) instead of a column count (via strnlenpt()).  It's a screwup from when nano was first converted to UTF-8, specifically, in commit 65658ef.

The attached patch against git fd86696 fixes it.  (Also, numchars should be a size_t instead of an int, since that's what actual_x() returns; the patch fixes that as well.)

(file #41833)

David Lawrence Ramsey <dolorous>
Group Member
Mon 18 Sep 2017 07:31:54 PM UTC, original submission:  

To reproduce, run:

  src/nano --ignore NEWS

Then type: ^W M-V 004422.  A chinese character appears in the prompt bar.  Now press <Enter>.  See how on the status bar it says:

  [ "..." not found ]

When entering two of those 䐢 characters, it will show one of them plus three dots.  When entering four (䐢䐢䐢䐢), it will show two of them plus three dots.

Somehow it miscalculates the length of the search string when reporting a failed search.

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dolorous (Updated the item)
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-19 bens Open/ClosedOpen Closed
    2017-09-19 bens StatusNone Fixed
        Assigned toNone dolorous
    2017-09-19 dolorous Attached File- Added 0001-search-properly-trim-search-string-length-for-failed.patch, #41833

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code