bugGNU nano - Bugs: bug #58123, the word count is wrong when...

 
 

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

bug #58123: the word count is wrong when --wordchars is used

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 06 Apr 2020 08:49:29 AM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Sun 24 May 2020 08:11:43 AM UTC, comment #3: 

Released in version 4.9.3.

Benno Schulenberg <bens>
Group administrator
Mon 06 Apr 2020 09:18:46 AM UTC, comment #2: 

Fixed in git, commit 547de4a7.

Benno Schulenberg <bens>
Group administrator
Mon 06 Apr 2020 09:05:48 AM UTC, comment #1: 

Bug exists since version 2.6.2.  The offending commit is 6f12992c: "add the option --wordchars, to set extra word characters".

Benno Schulenberg <bens>
Group administrator
Mon 06 Apr 2020 08:49:29 AM UTC, original submission:  

To reproduce, first run 'src/nano --ignore README', and type: M-D.
See that is says: "Words: 430".
Exit and then run 'src/nano --ignore README -X"a"', and type: M-D.
See that it now says: "Words: 475"

It should not make any difference, because "a" is already among the word-forming characters.

The problem is that in is_word_char() the check for is_punct() is never reached as soon as 'wordchars' is set.  Oww...  What a silly mistake that is.  :|

Benno Schulenberg <bens>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-24 bens Open/ClosedOpen Closed
    2020-04-06 bens StatusIn Progress Fixed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code