bugGNU nano - Bugs: bug #46896, edit_redraw() seems to be...

 
 

bug #46896: edit_redraw() seems to be seriously confused

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Thu 14 Jan 2016 01:44:56 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 24 Jan 2016 03:45:47 PM UTC, comment #3:

This has been addressed in SVN, r5583.

Probably in the last 'if' something can be optimized still, but I can't be bothered now.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 18 Jan 2016 04:14:05 PM UTC, comment #2:

Attached patch works fine for me. It unifies the three loops (that repaint the lines between old_current and current) into a single loop. It means that, when the mark is on, old_current will get repainted twice, but I don't mind -- better that than a confusing reduplication of code.

(file #36082)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 14 Jan 2016 08:52:24 PM UTC, comment #1:

I think there is no point in repainting any lines before the viewing port has been readjusted.

(file #36037)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 14 Jan 2016 01:44:56 PM UTC, original submission:

The body of edit_redraw() in src/winio.c seems to do three times the same thing: repainting the lines that are between the current cursor position and the previous cursor position. It will require some studying to find out which of these really is needed.

Benno Schulenberg <bens>
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:
   

Attached Files
file #36037:  snip-redundant.patch added by bens (1KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 24 Jan 2016 03:45:47 PM UTCbensStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Mon 18 Jan 2016 04:14:05 PM UTCbensAttached File-=>Added do-no-more-than-needed.patch, #36082
    Fri 15 Jan 2016 04:46:05 PM UTCbensStatusNone=>In Progress
      Assigned toNone=>bens
    Thu 14 Jan 2016 08:52:24 PM UTCbensAttached File-=>Added snip-redundant.patch, #36037

    Back to the top


    Powered by Savane 3.1-cleanup1