[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] who still uses --rebinddelete, or has ever used it?
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] who still uses --rebinddelete, or has ever used it? |
Date: |
Tue, 4 Sep 2018 14:04:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Hi all,
Looking a bit into nano's code history, I found something strange.
Ten years ago, Chris moved the handling of the shifted Delete key
(KEY_SDC) [1], but in doing so he (mistakenly) swapped around the
'then' and 'else' and turned KEY_DC into a backspace key. Probably
to correct this misbehavior, a week later he removed the KEY_DC case
label [2], so the Delete key would not mistakenly get translated to
a backspace, and all was fine again. Except... that now the whole
original reason why --rebinddelete was added was gone: apparently
on some terminals the <Backspace> key produced KEY_DC instead of
KEY_BACKSPACE. But since --rebinddelete no longer has the effect
of translating KEY_DC into KEY_BACKSPACE and nobody seems to have
complained about this... maybe the faulty terminfo entries that made
<Backspace> on some terminals produce KEY_DC have gone the way of
the dinosaurs? And all is fine? We could ditch --rebinddelete?
Maybe not. Because a few months later, Chris adds the suggestion
to rebind Del to backspace in the sample.nanorc file [3]. This
is effectively the same as translating KEY_DC to KEY_BACKSPACE,
just with a bind instead of an option, and without the other effect
of the --rebinddelete option: translating the DEL_CODE (0x7F) to a
Delete instead of to a Backspace. The latter behavior had been
added five years earlier [4].
Anyway, it seems to me that the issues that inspired the --rebinddelete
option were caused by faulty terminfo entries on the (old) machines that
people used or ssh'ed into. Probably all machines have been upgraded to
newer terminfo databases with the faults corrected and --rebinddelete is
never needed any more. I am tempted to just delete the option and see
whether we get any bug reports. Because most likely people who use nano
on strange and old boxes don't read nano-devel, so we will never know
by just asking here. Anyone in favor of making this bold move?
Anyway, apart from all that, the swapped then/else by Chris has had an
interesting effect: it has turned <Shift+Delete> into a <Backspace> key
-- something that I find kind of logical and mildly useful. It has
inspired the upcoming patch.
Benno
[1] http://git.savannah.gnu.org/cgit/nano.git/commit/?id=79a33bb3
and search for KEY_SDC
[2] http://git.savannah.gnu.org/cgit/nano.git/commit/?id=17436ce8
and search for KEY_SDC
[3] http://git.savannah.gnu.org/cgit/nano.git/commit/?id=fa406949
[4] http://git.savannah.gnu.org/cgit/nano.git/commit/?id=f4276944
and search for REBIND_DELETE
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nano-devel] who still uses --rebinddelete, or has ever used it?,
Benno Schulenberg <=