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

 
 

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

bug #48331: backgrounding+foregrounding eats a key stroke

Submitter:  Mike Frysinger <vapier>
Submitted:  Tue 28 Jun 2016 05:40:42 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

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>
Group administrator
Wed 29 Jun 2016 06:56:19 PM UTC, comment #7: 

Fixed in git, 2ae490c and 1d7c177.

Benno Schulenberg <bens>
Group administrator
Wed 29 Jun 2016 04:29:20 PM UTC, comment #6: 

seems OK now from a quick test

Mike Frysinger <vapier>
Group 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>
Group administrator
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>
Group administrator
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>
Group Member
Tue 28 Jun 2016 06:09:13 PM UTC, comment #2: 

Oops.  Pythonism.  C needs braces.

(file #37615)

Benno Schulenberg <bens>
Group administrator
Tue 28 Jun 2016 06:06:56 PM UTC, comment #1: 

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

Fix attached.

(file #37614)

Benno Schulenberg <bens>
Group administrator
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>
Group Member

 

(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 (Updated the item)
  • -email is unavailable- added by vapier (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-30 bens Open/ClosedOpen Closed
    2016-06-29 bens StatusIn Progress Fixed
    2016-06-29 bens Attached File- Added dont-simulate-a-sigwinch.patch, #37620
    2016-06-29 bens Attached File- Added resume-without-flashing.patch, #37618
    2016-06-28 bens Attached File- Added really--dont-drop-keystrokes.patch, #37615
    2016-06-28 bens Attached File- Added dont-drop-keystrokes-on-the-floor.patch, #37614
        StatusNone In Progress
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code