Re: [code] backspace insert "NUL" in ncurses

From: Mitchell <m.att.foicica.com>
Date: Tue, 4 Mar 2014 10:33:43 -0500 (Eastern Standard Time)

Hi,

On Sun, 2 Mar 2014, Daurnimator wrote:

>>
>> From: Mitchell <m.att.foicica.com>
>> Date: Mon, 9 Dec 2013 13:18:23 -0500 (Eastern Standard Time)
>> Hi Carlos,
>>
>> On Mon, 9 Dec 2013, Carlos Pita wrote:
>>
>>> Hi all,
>>>
>>> I'm a new user of textadept, looking for a replacement of my current
>>> geany+leafpad+nano combo, and more specifically for a replacement that
>>> is not vim[*]. textadept looks like the ideal replacement till now.
>>>
>>> One problem I found --and I don't think it has to do with my terminal
>>> emulator settings because other ncurses apps don't show similar
>>> behavior-- is that the backspace key insert the string "NUL" into the
>>> buffer when in textadept-ncurses.
>>
>> Textadept does not use ncurses's key input routines. It uses a library
>> called "libtermkey". What terminal emulator are you using? Does it map the
>> Backspace key to anything other than Ctrl+H? One thing that may help is to
>> uncomment line 250 in `core/keys.lua` and change it to read:
>>
>> if CURSES then ui.statusbar_text = code end
>>
>> Every time you type a key it should show that key's code in the statusbar.
>> This may help debug the problem.
>>
>> Cheers,
>> Mitchell
>
>
> My terminal sends Ctrl+? (=\127) on backspace (it's the PuTTY default)
>
> The statusbar just has a double quote in it on that keypress.

Try putting

   keys['\127'] = buffer.delete_back

in your `~/.textadept/init.lua`.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 04 Mar 2014 - 10:33:43 EST

This archive was generated by hypermail 2.2.0 : Wed 05 Mar 2014 - 06:54:17 EST