Segfault on ctrl-C (curpos)

Liam Gretton <[email protected]>
Newsgroups gmane.editors.nano.general
Organization IT Services, University Of Leicester
Message-ID <[email protected]>
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

If I explicitly bind ctrl-C to 'curpos' in nanorc Nano's debug output
handily gives me a list of numeric menu function IDs, and 4270736 is cancel:

Added func 4270736 (Cancel) for menus 7afe
Added func 4350032 (Cur Pos) for menus 1

The error therefore suggests Cancel is being called out of context
instead of curpos.

Any ideas what might be wrong?

My build options (identical on CentOS where there are no such problems):

./configure --prefix=/opt/nano \
  --sysconfdir=/etc \
  --enable-utf8

Nanorc:

set backup
set const
set cut
set noconvert
set nonewlines
set nowrap
set smarthome
set smooth
set speller "aspell -x -c"
set tabsize 4

## Enable ~/.nano_history for saving and reading search/replace strings.
set historylog

# UI colours
set functioncolor green
set keycolor brightgreen
set statuscolor brightyellow,blue
set titlecolor brightyellow,blue

# Syntax highlighting
include /opt/nano/share/nano/*.nanorc


-- 
Liam Gretton                                    [email protected]
Systems Specialist                           http://www.le.ac.uk/its/
IT Services                                   Tel: +44 (0)116 2522254
University Of Leicester, University Road
Leicestershire LE1 7RH, United Kingdom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.