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

 
 

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

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Mon 18 Sep 2017 07:31:54 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: David Lawrence Ramsey <dolorous>Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

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

Benno Schulenberg <bens>
Project 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>
Project AdministratorIn charge of this item.
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>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 19 Sep 2017 07:18:08 PM UTCbensStatusNone=>Fixed
      Assigned toNone=>dolorous
    Tue 19 Sep 2017 01:10:05 AM UTCdolorousAttached File-=>Added 0001-search-properly-trim-search-string-length-for-failed.patch, #41833

    Back to the top


    Powered by Savane 3.1-cleanup1