bugGNU nano - Bugs: bug #48388, when the user starts typing during...

 
 

bug #48388: when the user starts typing during loading, a byte is dropped

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Sun 03 Jul 2016 11:35:04 AM 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.

 

Mon 04 Jul 2016 09:43:38 AM UTC, comment #2:

The dropping is fixed in git, 29986e9.

For the misrecognizing of "M-G 11", see bug #48395.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sun 03 Jul 2016 12:40:58 PM UTC, comment #1:

The offending commit is 31f0456. That'll teach me: not to do a move and a change at the same time. But still: it's a mystery to me how the old version does not lose a byte. Hmmm... Maybe because it looks at the keyboard only after (on average) a second and a half have passed, and precalculation doesn't take that long even on a hundred thousand lines, and thus it never gets anything from the keyboard buffer at all? My version looks at the keyboard immediately -- which is kind of proper, because for the syntaxes that we have, loading a large file takes longer than precalculating the multiline data for it. So when the precalculation starts, already a "long" time has passed, and if the user is impatient, the precalculation should be skipped entirely.

(But when we put back the byte, we get the problem that David mentioned: the keyboard buffer then holds "^[ g 1 1" and the keyboard code tries to interpret that as a single sequence instead of as three. Which is strange, because the only known escape sequences start with either "Esc O", "Esc o", "Esc [" or "Esc Esc". So when it sees "Esc g", it shouldn't even consider anything after it as part of the sequence. Sure, that will enter unwanted characters into the text when nano is used on a terminal that produces real unknown sequences, but that is good, that will get us bug reports, instead of just beeping at the user with "Unknown sequence" and we never hear anything.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sun 03 Jul 2016 11:35:04 AM UTC, original submission:

To reproduce, open a huge file with nano: 'src/nano hundredthousand.c', and while it loads, immediately type M-G 11.
When the file has been loaded and is displayed, the string "g11" has been added to the buffer. The Alt modifier (^[) apparently has been dropped.

Bug is present since nano-2.5.1. In nano-2.5.0 and before, typing M-G 11 during loading will (when the file gets displayed) result in a beep plus the message "Unknown Command". Not very nice either, but better than adding something unexpected and unwanted to the file.

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:
   

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 (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
    Sat 30 Jul 2016 09:08:30 AM UTCbensOpen/ClosedOpen=>Closed
    Mon 04 Jul 2016 09:43:38 AM UTCbensStatusIn Progress=>Fixed
    Sun 03 Jul 2016 12:40:58 PM UTCbensStatusNone=>In Progress

    Back to the top


    Powered by Savane 3.1-cleanup1