bugGNU nano - Bugs: bug #48331, backgrounding+foregrounding eats a...

 
 

bug #48331: backgrounding+foregrounding eats a key stroke

Submitted by:  Mike Frysinger <vapier>
Submitted on:  Tue 28 Jun 2016 05:40:42 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.

 

(Jump to the original submission Jump to the original submission)

Wed 04 Oct 2017 08:06:07 PM UTC, comment #8:

In current git, I have removed the ungetch() again that fixed the dropped character when resuming from suspension. In my experience it is no longer needed. Please verify whether this is the case for you too.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 29 Jun 2016 06:56:19 PM UTC, comment #7:

Fixed in git, 2ae490c and 1d7c177.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 29 Jun 2016 04:29:20 PM UTC, comment #6:

seems OK now from a quick test

Mike Frysinger <vapier>
Project Member
Wed 29 Jun 2016 11:24:02 AM UTC, comment #5:

When nano resumes, it shouldn't simulate a SIGWINCH in order to get the screen regenerated, it should simply directly regenerate the screen. This was overlooked when the handling of sigwinches was improved.

With attached patch both the flash and the dropped keys should be gone.

(file #37620)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 29 Jun 2016 08:49:19 AM UTC, comment #4:

I don't see the flash -- not on a Gnome Terminal. Only on a Linux console, after many tries, sometimes the titlebar flashes, and once I saw the help lines flash. Yes, that is not nice.

The thing is, before commit a878f5f nano didn't actually adapt its size when you resized the terminal while nano was sleeping. It does resize now, and rightaway too. I don't understand why it then flashes (regenerates the screen again) upon the first keystroke -- I will have to think about that.

But for now I have a workaround (which will not work when you use slang): it enters a fake key so that the flash will happen immediately upon resume, so that it should be unnoticeable. See patch.

(I found it hard to find a key that does nothing. It's strange that not even the Unicode guys thought of including a control code that is defined as "do absolutely nothing".)

(file #37618)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 28 Jun 2016 10:02:45 PM UTC, comment #3:

that fixes the missing key stroke, but there's still an unnecessary screen flash/refresh. it's kind of distracting :(.

Mike Frysinger <vapier>
Project Member
Tue 28 Jun 2016 06:09:13 PM UTC, comment #2:

Oops. Pythonism. C needs braces.

(file #37615)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 28 Jun 2016 06:06:56 PM UTC, comment #1:

Oof! That was a stupid one... :(

Fix attached.

(file #37614)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 28 Jun 2016 05:40:42 PM UTC, original submission:

looks like the fix for bug 47954 caused this. when i bisect, commit a878f5f1833aaafa12b0abe5e2deeb0871d150fa is the first to fail.

to reproduce:
$ nano -F -z -I foo bar
<hit ctrl+z to bg>
$ fg
<press "f" twice, but the first one is eaten (and the screen flashes)>

Mike Frysinger <vapier>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Updated the item)
  • -unavailable- added by vapier (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 30 Jul 2016 09:07:44 AM UTCbensOpen/ClosedOpen=>Closed
    Wed 29 Jun 2016 06:56:19 PM UTCbensStatusIn Progress=>Fixed
    Wed 29 Jun 2016 11:24:02 AM UTCbensAttached File-=>Added dont-simulate-a-sigwinch.patch, #37620
    Wed 29 Jun 2016 08:49:19 AM UTCbensAttached File-=>Added resume-without-flashing.patch, #37618
    Tue 28 Jun 2016 06:09:13 PM UTCbensAttached File-=>Added really--dont-drop-keystrokes.patch, #37615
    Tue 28 Jun 2016 06:06:56 PM UTCbensAttached File-=>Added dont-drop-keystrokes-on-the-floor.patch, #37614
      StatusNone=>In Progress
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1