bugGNU nano - Bugs: bug #49058, "unbind M-Space all" in...

 
 

bug #49058: "unbind M-Space all" in nanorc file changes behaviour of Ctrl+Left

Submitted by:  Rishabh Dave <prongs>
Submitted on:  Sun 11 Sep 2016 12:40:10 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)

Sat 15 Oct 2016 03:22:40 PM UTC, comment #11:

Stupid mistake with double carets. Fixed now in git, c92982d.

Thanks for reporting the original bug and trying to fix it.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 15 Oct 2016 03:15:06 PM UTC, comment #10:

Fixed in git, fdee0df.

And the replacements with arrows in 7a274d6, including proper alignment. ... Oops! So I thought! But the latter commit breaks the Ctrl+Arrow keys -- I just looked whether the help text was okay, and never tested the keys themselves. :|

What went wrong there? I don't get it, yet.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 13 Oct 2016 02:20:39 PM UTC, comment #9:

Ignoring the alignment, I am fine with representation.

Rishabh Dave <prongs>
Wed 12 Oct 2016 03:25:19 PM UTC, comment #8:

Oops. Forgot to attach the patch, 0002, preceded by the modified first one, 0001.

(file #38711, file #38712)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 12 Oct 2016 10:29:08 AM UTC, comment #7:

Well, I was thinking of using ^← ^→ ^↑ ^↓ to represent the Ctrl+Arrow keys. See the attached patch. However, it breaks the alignment of the help text -- the help stuff counts bytes instead of characters. But ignoring that for a moment, what do you think of this?

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 12 Oct 2016 08:41:47 AM UTC, comment #6:

It works fine but the old issue still persists: "^Left" and "^Right" are added to help text.[1] I was considering to skip these two specific string in src/help.c after you alluded me towards this solution. I have attached a patch[2] doing so on the top of your patch, if required. I have forgot to sign, I will send one if required.

1. http://lists.gnu.org/archive/html/nano-devel/2016-09/msg00082.html
2. https://savannah.gnu.org/bugs/download.php?file_id=38708

Rishabh Dave <prongs>
Tue 11 Oct 2016 05:57:51 PM UTC, comment #5:

I'm suggesting the attached patch. What do you think?

(file #38704)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 20 Sep 2016 11:19:34 AM UTC, comment #4:

Partially fixed in git, 8ba57cf -- when completely unbinding a function, also the corresponding modified Arrow key is unbound. This is not entirely what we would like, but at least it prevents unexpected movements.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 12 Sep 2016 05:17:06 PM UTC, comment #3:

Thanks for the help!

Somehow, I had figured the first step. For second step, I will think of few possible alternatives and post/mail again.

Rishabh Dave <prongs>
Sun 11 Sep 2016 04:08:14 PM UTC, comment #2:

Bug exists since nano-2.3.5 -- since the introduction of the Ctrl+Left/Right combos.

The fix will have to consist of multiple steps: first, let the sc_seq_or() calls not return zero when a lookup fails, but the current keycode. That will prevent Ctrl+Left from doing the /wrong/ thing when M-Space is unbound. As a second step, find a way to hard-bind Ctrl+Left/Right to their functions.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sun 11 Sep 2016 12:56:43 PM UTC, comment #1:

I will try and fix this bug.

Rishabh Dave <prongs>
Sun 11 Sep 2016 12:40:10 PM UTC, original submission:

To repoduce, put "unbind M-Space all" in your ~/.nanorc and do src/nano src/browser.c. Press Ctrl-Left and Ctrl-Right one after the another, both makes cursor jump to the next word.

Expected behaviour is: Ctrl-Left should lead to jump to the previous word (as it does normally and ) as rcfile doesn't mention change its in behaviour.

Rishabh Dave <prongs>

 

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

Attach File(s):
   
   
Comment:
   

 

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 prongs (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 31 Oct 2016 09:59:51 AM UTCbensOpen/ClosedOpen=>Closed
    Sat 15 Oct 2016 03:22:40 PM UTCbensStatusReady For Test=>Fixed
      Assigned toNone=>bens
    Sat 15 Oct 2016 03:15:06 PM UTCbensStatusIn Progress=>Ready For Test
    Wed 12 Oct 2016 03:25:19 PM UTCbensAttached File-=>Added 0002-binding-use-arrows-instead-of-words-to-designate-the.patch, #38712
    Wed 12 Oct 2016 03:25:18 PM UTCbensAttached File-=>Added 0001-input-keep-the-Ctrl-Arrow-keys-working-when-their-sy.patch, #38711
    Wed 12 Oct 2016 08:36:49 AM UTCprongsAttached File-=>Added 0002-help-don-t-display-Left-and-Right-in-help.patch, #38708
    Tue 11 Oct 2016 05:57:51 PM UTCbensAttached File-=>Added 0001-input-keep-the-Ctrl-Arrow-keys-working-when-their-sy.patch, #38704
    Tue 20 Sep 2016 11:19:34 AM UTCbensStatusNone=>In Progress
    Fri 16 Sep 2016 07:29:37 PM UTCbensSummary"unbind M-Space all" in rcfile changes behaviour of Ctrl-Left=>"unbind M-Space all" in nanorc file changes behaviour of Ctrl+Left

    Back to the top


    Powered by Savane 3.1-cleanup1