[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-nano] Segfault on ctrl-C (curpos)
From: |
Benno Schulenberg |
Subject: |
Re: [Help-nano] Segfault on ctrl-C (curpos) |
Date: |
Tue, 20 Dec 2016 12:42:10 +0100 |
Hello Liam,
Thanks for reporting!
On Tue, Dec 20, 2016, at 09:21, Liam Gretton wrote:
> I build Nano for our SLES and CentOS systems. For quite a few versions
> including 2.7.2 my SLES builds segfault if ctrl-C (curpos) is used.
>
> I've finally got round to rebuilding with debugging enabled and the
> following is reported when ctrl-C is pressed (new Nano session, nothing
> in the buffer):
>
> get_key_buffer(): the sequence of hex codes: 163
> before parsing: keycode = 355, escapes = 0, byte_digits = 0
> whoops, returning null given func 4270736 in menu 1
> Segmentation fault
Please try the attached patch. It fixes it for me.
> The error therefore suggests Cancel is being called out of context
> instead of curpos.
>
> Any ideas what might be wrong?
Your keyboard/input-system produces an actual KEY_CANCEL
code when you press ^C, instead of simply 0x03, what most
other systems seem to do. Do you compile ncurses in a special
way on SLES to make it report ^C as KEY_CANCEL?
> Nanorc:
>
> set backup
> set const
> set cut
Wow. You actually use 'set cut'? Not being used to it,
I find that behavior quite confusing. (I've tried running
for a moment with your config. :) )
You may wish to update "const" to "constantshow" --
its new name.
Benno
--
http://www.fastmail.com - The professional email service
try-the-control-c-code-instead.patch
Description: Text Data