bugGNU nano - Bugs: bug #46812, Typing a capital "T"...

 
 

bug #46812: Typing a capital "T" inserts a tab.

Submitted by:  Cody A. Taylor <code_m>
Submitted on:  Mon 04 Jan 2016 06:08:55 PM UTC  
 
Severity: 5 - BlockerStatus: 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.

 

Thu 07 Jan 2016 06:16:27 PM UTC, comment #5:

I've replaced 8 with the existing constant NANO_CONTROL_I, and have added a comment.

Closing, as this is not in any release.

Thanks.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 05 Jan 2016 04:34:10 PM UTC, comment #4:

Thanks for suggesting that. However... the other symbolic KEY_ constants in that if chain come from ncurses. (See for example /usr/include/ncurses.h.) But ncurses doesn't have a symbolic KEY_ name for the Tab key -- it has KEY_STAB and KEY_CTAB and KEY_BTAB, but those are something else.

Anyway, the entries for "Tab" and "Enter" in that if chain turn out to be dummies: if you rebind ^I or ^M, also Tab or Enter will be rebound. "Tab" and "Enter" exist in that chain only so that they can appear in the ^G help text. (But if you do those suggested rebinds, Tab and Enter are falsely displayed as still inserting a Tab and an Enter. I don't think that is a problem -- no one in their right mind will rebind Tab or Enter. But for absolute novices, I think it is nice to have shown in the help text that ^I == Tab, and ^M == Enter.)

So... to come back to your suggestion... I think a KEY_DUMMY or KEY_NEVER should be defined and given some arbitrary value far beyond KEY_MAX, with a comment that these two entries exist only to have (Tab) and (Enter) listed in the help text.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 05 Jan 2016 02:41:01 PM UTC, comment #3:

Though, the patch hard-codes a literal constant while the rest of the if chain uses named constants. You probably should create a 'KEY_TAB' constant or comment why you are using a literal constant.

Cody A. Taylor <code_m>
Tue 05 Jan 2016 02:33:56 PM UTC, comment #2:

This bug is confirmed fixed in r5535.

Thanks!

Cody A. Taylor <code_m>
Mon 04 Jan 2016 07:44:47 PM UTC, comment #1:

Oof! Thanks for choosing a good time to update! :)

Fixed in SVN, r5535.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 04 Jan 2016 06:08:55 PM UTC, original submission:

Updated to revision 5534. Typing a capital "T" (shift+t) inserts a tab character.

Files that changed since last build:

```
svn up
Updating '.':
U src/global.c
U src/files.c
U src/search.c
U src/proto.h
U src/color.c
U src/prompt.c
U src/text.c
U src/winio.c
U src/nano.c
U ChangeLog
U configure.ac
U doc/syntax/objc.nanorc
U doc/syntax/autoconf.nanorc
U doc/syntax/asm.nanorc
U doc/syntax/c.nanorc
U doc/syntax/ocaml.nanorc
U doc/man/nanorc.5
U doc/texinfo/nano.texi
Updated to revision 5534.
```

Cody A. Taylor <code_m>

 

(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 code_m (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Jan 2016 06:16:41 PM UTCbensOpen/ClosedOpen=>Closed
    Mon 04 Jan 2016 07:44:47 PM UTCbensSeverity3 - Normal=>5 - Blocker
      StatusNone=>Fixed
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1