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

 
 

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

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

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission 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>
Project 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>
Project 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>
Project 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>
Project AdministratorIn charge of this item.
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>
Project 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>
Project AdministratorIn charge of this item.
Wed 19 Oct 2016 09:32:56 AM UTC, comment #2:

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

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

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by dolorous (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
    Sun 02 Apr 2017 09:40:26 AM UTCbensOpen/ClosedOpen=>Closed
    Thu 23 Mar 2017 06:38:21 PM UTCbensStatusNone=>Fixed
      Assigned toNone=>dolorous

    Back to the top


    Powered by Savane 3.1-cleanup1