bugGNU nano - Bugs: bug #57015, doing a 'chopwordleft' at...

 
 

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

bug #57015: doing a 'chopwordleft' at start-of-buffer results in "Modified"

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 07 Oct 2019 02:51:26 PM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Mon 07 Oct 2019 03:31:34 PM UTC, comment #2: 

Fixed in git, commit 53d4224b.

Benno Schulenberg <bens>
Group administrator
Mon 07 Oct 2019 03:05:21 PM UTC, comment #1: 

The offending commit is 4314b8de "display: blank the status bar on a successful cut or paste".  That seems weird, but the commit changes a call of cut_text() to do_cut_text(...).  That causes the check at the start of cut_text() to be skipped.  :|

Benno Schulenberg <bens>
Group administrator
Mon 07 Oct 2019 02:51:26 PM UTC, original submission:  

To reproduce, add the following two lines at the end of your ~/.nanorc:

  bind ^D cutwordleft main
  bind ^F cutwordright main

Then run:

  src/nano +1 NEWS

and type: ^D
See that the top right corner now says "Modified" even though nothing was deleted and the buffer has not been modified at all.

Now type: M-U M-/ ^F
See that the status bar says "[ Nothing was cut ]".  This is the right behavior.  ^D at start-of-buffer should behave the same.

Bug exists since nano-4.4.  Versions 4.3 down to 4.0 did the right things: they said nothing was cut.  Versions before 4.0 down to at least 2.7.4 simply did nothing, without giving any feedback.

Expected behavior: chopwordleft at the head of the buffer should not mark the file as modified and give the same feedback as chopwordright at the tail of the buffer.

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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-30 bens Open/ClosedOpen Closed
    2019-10-08 bens Severity3 - Normal 2 - Minor
    2019-10-07 bens StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code