bugGNU nano - Bugs: bug #49100, with softwrap, a line that takes...

 
 

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

bug #49100: with softwrap, a line that takes up more than one screenful causes problems

Submitter:  David Lawrence Ramsey <dolorous>
Submitted:  Thu 15 Sep 2016 08:01:44 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  dolorous Open/Closed:  Closed

Jump to the original submission

Sun 02 Apr 2017 09:40:26 AM UTC, comment #8: 

(See bug #50687 and bug #50691 for a small remaining problem and its fix.)

Benno Schulenberg <bens>
Group administrator
Thu 23 Mar 2017 08:39:26 PM UTC, comment #7: 

(See bug #50621 for the unexpected Badness warning with an extremely long line.)

Benno Schulenberg <bens>
Group administrator
Thu 23 Mar 2017 06:38:21 PM UTC, comment #6: 

Fixed in git, e52d5b0, by David's softwrap overhaul.

(However, when opening the suggested example file and then typing M-=, it will give a "Badness" warning.  I'll report a separate bug for that.)

Benno Schulenberg <bens>
Group administrator
Wed 07 Dec 2016 04:10:00 AM UTC, comment #5: 

Okay.  I'll do that as soon as I can put together a detailed proposal of what should change.  (For example, the Up and Down behaviors need to change, but I figure Home and End should still work on the line as a whole instead of virtual lines, after seeing how some other editors do softwrapping.)

David Lawrence Ramsey <dolorous>
Group Member
Fri 02 Dec 2016 11:39:15 AM UTC, comment #4: 

Yes, it would be better if in softwrap mode the cursor would move between screen lines instead of between logical lines.  When the logical lines are just a bit longer than the screen width, one can still live with the current behavior, but when each logical line occupies several screen lines, getting to the desired place in a line is a major nuisance.

Better take this question to nano-devel, because it will be a big change to how softwrap works.

Benno Schulenberg <bens>
Group administrator
Thu 01 Dec 2016 09:45:20 PM UTC, comment #3: 

I've been thinking about how to fix this, since it effectively makes softwrap mode unusable under these circumstances, and the only way I can think of is to change how softwrap mode behaves.

Specifically, instead of having Up/Down move through an entire softwrapped line (one line on disk, but multiple lines onscreen), it should move through one line-length chunk of that softwrapped line (editwincols characters' worth of one line on disk, but one line onscreen).

David Lawrence Ramsey <dolorous>
Group Member
Wed 19 Oct 2016 09:32:56 AM UTC, comment #2: 

(For completeness: commit d66ea08 fixed bug #49374.)

Benno Schulenberg <bens>
Group administrator
Tue 18 Oct 2016 07:36:46 PM UTC, comment #1: 

The segfault was fixed by commit d66ea08.  I don't know yet what to do about the cursor placement problem.

Benno Schulenberg <bens>
Group administrator
Thu 15 Sep 2016 08:01:44 PM UTC, original submission:  

Borrowing a bit from bug 47710, again, but with a much longer line:

"To reproduce, run 'for x in $(seq 2000); do echo -n "xx "; done >lotsofexes', then run 'stty cols 50 && src/nano --ignore --soft --smooth --nowrap lotsofexes'."

This assumes a terminal size of 80x24, so that the line is long enough to take up more than one screenful.

Press Down to go to the magicline after the line of exes.  Then press Left to go back to the end of the line of exes.  Problem 1: The cursor will be wedged at the end of the line onscreen.  Problem 2: Pressing Right at this point will cause nano to segfault in move.c at line 484 (in do_down(), in the attempt to calculate how many lines to scroll, and in the further attempt to  reduce the number of lines to scroll when there are overlong lines at the top).

David Lawrence Ramsey <dolorous>
Group Member

 

(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 (Posted a comment)
  • -email is unavailable- added by dolorous (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
    2017-04-02 bens Open/ClosedOpen Closed
    2017-03-23 bens StatusNone Fixed
        Assigned toNone dolorous

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code