diff options
author | wiedi <wiedi@pkgsrc.org> | 2018-09-13 19:34:33 +0000 |
---|---|---|
committer | wiedi <wiedi@pkgsrc.org> | 2018-09-13 19:34:33 +0000 |
commit | a7a323a33a19d2d718bda934df7a1f4a879eb458 (patch) | |
tree | f8aa7146cb1412b5f8a6a4fdb23cfc690bf1ae88 /editors/nano | |
parent | 71579b426572cabfe625a9d05db46a0510e3f707 (diff) | |
download | pkgsrc-a7a323a33a19d2d718bda934df7a1f4a879eb458.tar.gz |
nano: pull in keybinding fix from upstream
When curses gives no code for Ctrl+Shift+Delete, do not fall back
to KEY_BACKSPACE, because then ^H and/or <Backspace> get bound to
'cutwordleft'.
This fixes https://savannah.gnu.org/bugs/?54642
Diffstat (limited to 'editors/nano')
-rw-r--r-- | editors/nano/Makefile | 3 | ||||
-rw-r--r-- | editors/nano/distinfo | 4 | ||||
-rw-r--r-- | editors/nano/patches/patch-src_nano.c | 22 | ||||
-rw-r--r-- | editors/nano/patches/patch-src_nano.h | 21 |
4 files changed, 48 insertions, 2 deletions
diff --git a/editors/nano/Makefile b/editors/nano/Makefile index 87cd22922ed..b95b07f2b35 100644 --- a/editors/nano/Makefile +++ b/editors/nano/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.74 2018/09/09 17:47:18 wiedi Exp $ +# $NetBSD: Makefile,v 1.75 2018/09/13 19:34:33 wiedi Exp $ DISTNAME= nano-3.0 +PKGREVISION= 1 CATEGORIES= editors MASTER_SITES= https://www.nano-editor.org/dist/v${PKGVERSION_NOREV:R}/ EXTRACT_SUFX= .tar.xz diff --git a/editors/nano/distinfo b/editors/nano/distinfo index 3676ccaed78..f5acc31ad10 100644 --- a/editors/nano/distinfo +++ b/editors/nano/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.46 2018/09/09 17:47:18 wiedi Exp $ +$NetBSD: distinfo,v 1.47 2018/09/13 19:34:33 wiedi Exp $ SHA1 (nano-3.0.tar.xz) = 0396d85df64a7927ca2d3425a0263dacf8502220 RMD160 (nano-3.0.tar.xz) = 682546c3dec370918de7e9d1b8517612c43ae6f0 SHA512 (nano-3.0.tar.xz) = 120b606d65672a905e9ef9f3b55381cc62b7929abeaf409ea4af6be9f51b3d038e6e68f082755cbb7e198f0fb5203e0f4796c6c96ebd054d9a2241b313fcdda1 Size (nano-3.0.tar.xz) = 1508248 bytes SHA1 (patch-configure) = 4a618bf99332fcfce2413be14400b919d042cc30 +SHA1 (patch-src_nano.c) = f4be36781f7f4f72905a5e7c2821a3351002eb39 +SHA1 (patch-src_nano.h) = 6834c3bc38adc645a5ef4741a9263f7bfa81f93f diff --git a/editors/nano/patches/patch-src_nano.c b/editors/nano/patches/patch-src_nano.c new file mode 100644 index 00000000000..e77efd072ee --- /dev/null +++ b/editors/nano/patches/patch-src_nano.c @@ -0,0 +1,22 @@ +$NetBSD: patch-src_nano.c,v 1.1 2018/09/13 19:34:34 wiedi Exp $ + +When curses gives no code for Ctrl+Shift+Delete, do not fall back +to KEY_BACKSPACE, because then ^H and/or <Backspace> get bound to +'cutwordleft'. + +This fixes https://savannah.gnu.org/bugs/?54642. +Upstream commit: 09ab2e3d0eeb33bc4d0702623404ba01b1f8fa9a + +Version 3.1 will be released in one or two weeks and include this. + +--- src/nano.c.orig 2018-09-09 09:39:27.000000000 +0000 ++++ src/nano.c +@@ -2580,7 +2580,7 @@ int main(int argc, char **argv) + controlhome = get_keycode("kHOM5", CONTROL_HOME); + controlend = get_keycode("kEND5", CONTROL_END); + controldelete = get_keycode("kDC5", CONTROL_DELETE); +- controlshiftdelete = get_keycode("kDC6", KEY_BACKSPACE); ++ controlshiftdelete = get_keycode("kDC6", CONTROL_SHIFT_DELETE); + #ifndef NANO_TINY + /* Ask for the codes for Shift+Control+Left/Right/Up/Down. */ + shiftcontrolleft = get_keycode("kLFT6", SHIFT_CONTROL_LEFT); diff --git a/editors/nano/patches/patch-src_nano.h b/editors/nano/patches/patch-src_nano.h new file mode 100644 index 00000000000..7dbd5431168 --- /dev/null +++ b/editors/nano/patches/patch-src_nano.h @@ -0,0 +1,21 @@ +$NetBSD: patch-src_nano.h,v 1.1 2018/09/13 19:34:34 wiedi Exp $ + +When curses gives no code for Ctrl+Shift+Delete, do not fall back +to KEY_BACKSPACE, because then ^H and/or <Backspace> get bound to +'cutwordleft'. + +This fixes https://savannah.gnu.org/bugs/?54642. +Upstream commit: 09ab2e3d0eeb33bc4d0702623404ba01b1f8fa9a + +Version 3.1 will be released in one or two weeks and include this. + +--- src/nano.h.orig 2018-08-29 17:37:02.000000000 +0000 ++++ src/nano.h +@@ -588,6 +588,7 @@ enum + #define SHIFT_CONTROL_DOWN 0x414 + #define SHIFT_CONTROL_HOME 0x415 + #define SHIFT_CONTROL_END 0x416 ++#define CONTROL_SHIFT_DELETE 0x417 + #define ALT_LEFT 0x421 + #define ALT_RIGHT 0x422 + #define ALT_UP 0x423 |