bugGNU nano - Bugs: bug #46980, pressing Alt+6 should not scroll...

 
 

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

bug #46980: pressing Alt+6 should not scroll the screen

Submitter:  Benno Schulenberg <bens>
Submitted:  Tue 26 Jan 2016 09:39:49 AM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Tue 23 Feb 2016 12:09:12 PM UTC, comment #3: 

Fixed in SVN, r5671, with an improved patch: only restore the cursor position when the mark was set.

Benno Schulenberg <bens>
Group administrator
Thu 18 Feb 2016 08:23:50 AM UTC, comment #2: 

Same patch as already posted on the mailing list.

(file #36375)

Benno Schulenberg <bens>
Group administrator
Sat 30 Jan 2016 03:05:31 PM UTC, comment #1: 

When nothing is marked, the result of Alt+6 is to copy the current line to the cutbuffer and move the cursor to the beginning of the next line.  When a region is marked, Alt+6 copies this region to the cutfbuffer and puts the cursor at the end of the previously marked region (also when the region was marked backwards, which I find very odd).

Since, when a marked region is copied with Alt+6, it is not possible to /add/ stuff to this copied region, there is no point in moving the cursor one line down nor anywhere else.  So when a region is marked, I think Alt+6 should not move the cursor /at all/, also not when the region is marked backwards.  The principle of minimum necessary change.

So the expected behaviour of pressing Alt+6 when a region is marked is: just copy the region, undo the highlight, and for the rest leave everything as it is -- don't scroll, don't displace the cursor, don't call the fanfare, and don't segfault.

Benno Schulenberg <bens>
Group administrator
Tue 26 Jan 2016 09:39:49 AM UTC, original submission:  

To reproduce, run 'src/nano +22 README' and type:
M-A  ^V  M-6

Before the M-6, the cursor is on the centre line of the screen;
after the M-6, the cursor is on the bottom line.

Before version 2.4.1, an M-6 would make the screen scroll until the current line was the centre line; since 2.4.1 it scrolls until the current line is the bottom line.  Neither is desirable.

Even worse, when the marking is done from bottom to top, an M-6 will actually /move/ the cursor, from the beginning of the marked region to the end.  I don't know whether this is desirable.

Benno Schulenberg <bens>
Group administrator

 

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

Attached Files

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-27 bens Open/ClosedOpen Closed
    2016-02-23 bens StatusIn Progress Fixed
    2016-02-18 bens Attached File- Added remember-and-restore-position.patch, #36375
        StatusNone In Progress
        Assigned toNone bens
    2016-01-30 bens Summarypressing Alt+6 scrolls the screen -- it shouldn\'t pressing Alt+6 should not scroll the screen

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code