nano: update to version 6.0
Update nano editor to version 6.0
Version 6.0 enable toggling the display of the line numbers with
the shortcut key M-N (Alt-n). Also the cmdline option "-l" works.
Remove earlier patch regarding that.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 0571f5400d
)
This commit is contained in:
parent
e7e91ca071
commit
e818e3ed37
2 changed files with 10 additions and 53 deletions
|
@ -8,12 +8,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nano
|
||||
PKG_VERSION:=5.9
|
||||
PKG_VERSION:=6.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/nano
|
||||
PKG_HASH:=757db8cda4bb2873599e47783af463e3b547a627b0cabb30ea7bf71fb4c24937
|
||||
PKG_HASH:=93ac8cb68b4ad10e0aaeb80a2dd15c5bb89eb665a4844f7ad01c67efcb169ea2
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
@ -29,14 +29,19 @@ define Package/nano
|
|||
SUBMENU:=Editors
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=An enhanced clone of the Pico text editor
|
||||
TITLE:=GNU nano - enhanced clone of the Pico text editor
|
||||
URL:=https://www.nano-editor.org/
|
||||
DEPENDS:=+libncurses
|
||||
endef
|
||||
|
||||
define Package/nano/description
|
||||
Nano (Nano's ANOther editor, or Not ANOther editor) is an enhanced clone
|
||||
of the Pico text editor.
|
||||
Nano is a small and simple text editor for use on the terminal.
|
||||
|
||||
Nano started as an enhanced clone of the Pico text editor.
|
||||
Nowadays Nano wants to be a generally useful editor with sensible
|
||||
defaults (linewise scrolling, no automatic line breaking).
|
||||
|
||||
Nano is an official GNU package.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
From 3a94a0bb89363ef8768546973aab051cd5bf4622 Mon Sep 17 00:00:00 2001
|
||||
From: Benno Schulenberg <bensberg@telfort.nl>
|
||||
Date: Wed, 10 Nov 2021 09:20:56 +0100
|
||||
Subject: [PATCH] bindings: allow toggling line numbers (when enabled) also in
|
||||
tiny version
|
||||
|
||||
As a special case, and because it doesn't need any feedback on the
|
||||
status bar nor other calls, add a special function and key binding
|
||||
to allow the user to flip the LINE_NUMBERS flag also in a tiny nano.
|
||||
|
||||
This fixes https://savannah.gnu.org/bugs/?61441.
|
||||
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
|
||||
---
|
||||
src/global.c | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/src/global.c
|
||||
+++ b/src/global.c
|
||||
@@ -554,6 +554,14 @@ functionptrtype interpret(int *keycode)
|
||||
}
|
||||
#endif /* ENABLE_BROWSER || ENABLE_HELP */
|
||||
|
||||
+#if defined(NANO_TINY) && defined(ENABLE_LINENUMBERS)
|
||||
+/* Allow toggling line numbers (when enabled) also in the tiny version. */
|
||||
+void toggle_numbers(void)
|
||||
+{
|
||||
+ TOGGLE(LINE_NUMBERS);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* These two tags are used elsewhere too, so they are global. */
|
||||
/* TRANSLATORS: Try to keep the next two strings at most 10 characters. */
|
||||
const char *exit_tag = N_("Exit");
|
||||
@@ -1250,9 +1258,13 @@ void shortcut_init(void)
|
||||
add_to_sclist(MMAIN|MBROWSER|MHELP, "M-W", 0, do_findnext, 0);
|
||||
add_to_sclist(MMAIN|MBROWSER|MHELP, "M-Q", 0, do_findprevious, 0);
|
||||
#ifdef NANO_TINY
|
||||
+#ifdef ENABLE_LINENUMBERS
|
||||
+ add_to_sclist(MMAIN, "M-N", 0, toggle_numbers, 0);
|
||||
+#else
|
||||
add_to_sclist(MMAIN, "M-B", 0, to_prev_word, 0);
|
||||
- add_to_sclist(MMAIN, "M-D", 0, to_prev_word, 0);
|
||||
add_to_sclist(MMAIN, "M-N", 0, to_next_word, 0);
|
||||
+#endif
|
||||
+ add_to_sclist(MMAIN, "M-D", 0, to_prev_word, 0);
|
||||
add_to_sclist(MMAIN, "M-F", 0, to_next_word, 0);
|
||||
#else
|
||||
add_to_sclist(MMAIN, "M-]", 0, do_find_bracket, 0);
|
Loading…
Reference in a new issue