[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1000355: marked as done (bullseye-pu: package nano/5.4-2+deb11u1)



Your message dated Sat, 09 Jul 2022 11:47:43 +0100
with message-id <2280fe8c78e64b02a6c1d04c6dde5a32e342ba81.camel@adam-barratt.org.uk>
and subject line Closing requests for updates included in 11.4
has caused the Debian Bug report #1000355,
regarding bullseye-pu: package nano/5.4-2+deb11u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1000355: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000355
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian.org@packages.debian.org
Usertags: pu

[ Reason ]

As we did early during the freeze, nano's upstream Benno Schulenberg has
been maintaining a series of patches against nano 5.4, which backport
crashes fixes and other big impact fixes for Debian's version of nano.

[ Impact ]

We will miss several crash (and general bugs) fixes in different
situations and scenarios.

[ Tests ]

Patches have been tested individually against 5.4, and have had a wider
testing in the newer nano versions in which the fixes were introduced.

[ Risks ]

There is a big amount of patches, but most of them are one or
two-liners. Of course, the risk of any of them introducing new bugs is
real, but given Benno's knowledge of the codebase, it is unlikely.

[ Checklist ]
  [X] *all* changes are documented in the d/changelog
      - I've only mentioned the addition of a bundle of patches, not
        each one of them in detail. I can add a list of patches like in
	the changes section below, if that's preferred.
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in (old)stable
  [X] the issue is verified as fixed in unstable

[ Changes ]
The summary for each of the included patches is as follows:

Subject: [PATCH 12/34] linter: block the resizing signal while reading output
 from the linter

Subject: [PATCH 13/34] editing: prevent the pointer for the top row from
 becoming dangling

Subject: [PATCH 14/34] memory: move the correct number of bytes, and not one
 too many

Subject: [PATCH 15/34] feedback: when not in curses mode, just skip displaying
 any message

Subject: [PATCH 16/34] input: give up on the input stream only after millions
 of errors

Subject: [PATCH 17/34] general: prevent die() from getting recursed into

Subject: [PATCH 18/34] files: check the result of fdopen(), to avoid a
 possible crash

Subject: [PATCH 19/34] files: write a lock file also for a freshly saved
 buffer

Subject: [PATCH 20/34] feedback: retain the correct help lines during Verbatim
 Input with Slang

Subject: [PATCH 21/34] help: show ^- when using Slang instead of ^_ as the
 latter does nothing

Subject: [PATCH 22/34] display: work around a disappearing cursor when a line
 scrolled sideways

Subject: [PATCH 23/34] display: with Slang, make a hidden cursor return upon
 the next keystroke

Subject: [PATCH 24/34] docs: correct the descriptions of how to invoke the
 spell checker

Subject: [PATCH 25/34] docs: correct the default value of the errorcolor
 option

Subject: [PATCH 26/34] startup: if TERM is unset, try falling back to VT220
 instead of failing

Subject: [PATCH 27/34] files: do not call fsync() on a fifo, to avoid a
 spurious error message

Subject: [PATCH 28/34] files: making a backup of a fifo makes no sense, so do
 not try that

Subject: [PATCH 29/34] shutdown: when dying, do not install/restore a handler
 for Ctrl+C

Subject: [PATCH 30/34] browser: make the keystrokes ^W^Y and ^W^V work again

Subject: [PATCH 31/34] help: make the keystrokes ^W^Y and ^W^V work again

Subject: [PATCH 32/34] prompt: keep a clear answer clear also after an
 excursion into history

Subject: [PATCH 33/34] help: do not show ^S when --preserve is in effect

Subject: [PATCH 34/34] syntax: email: use a character class, as \s does not
 work inside brackets

Subject: [PATCH 35/35] justify: correctly determine whether top-of-buffer has
 been reached
diff -Nru nano-5.4/debian/changelog nano-5.4/debian/changelog
--- nano-5.4/debian/changelog	2021-02-08 00:21:28.000000000 +0100
+++ nano-5.4/debian/changelog	2021-11-22 01:07:23.000000000 +0100
@@ -1,3 +1,12 @@
+nano (5.4-2+deb11u1) bullseye; urgency=medium
+
+  * The "Bueno, de verdad, hasta luego, paso" release.
+  * Add additional patches from Benno Schulenberg with post 5.4
+    crash, docs and general fixes.
+  * Change debian-branch to bullseye.
+
+ -- Jordi Mallach <jordi@debian.org>  Mon, 22 Nov 2021 01:07:23 +0100
+
 nano (5.4-2) unstable; urgency=medium
 
   * The "M." release.
diff -Nru nano-5.4/debian/gbp.conf nano-5.4/debian/gbp.conf
--- nano-5.4/debian/gbp.conf	2020-01-30 08:53:56.000000000 +0100
+++ nano-5.4/debian/gbp.conf	2021-11-22 01:06:58.000000000 +0100
@@ -1,5 +1,5 @@
 [DEFAULT] 
 pristine-tar = true 
-debian-branch = master 
+debian-branch = bullseye
 upstream-branch = upstream
 upstream-vcs-tag = v%(version)s
diff -Nru nano-5.4/debian/patches/0012-linter-block-the-resizing-signal-while-reading-outpu.patch nano-5.4/debian/patches/0012-linter-block-the-resizing-signal-while-reading-outpu.patch
--- nano-5.4/debian/patches/0012-linter-block-the-resizing-signal-while-reading-outpu.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0012-linter-block-the-resizing-signal-while-reading-outpu.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,45 @@
+From 83ae0b25acdaf3e54bf5e78b5b37aa62014914d5 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Thu, 6 May 2021 13:06:22 +0200
+Subject: [PATCH 12/34] linter: block the resizing signal while reading output
+ from the linter
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This prevents read() from returning unexpectedly and causing a crash.
+
+This fixes https://savannah.gnu.org/bugs/?60537.
+Reported-by: Filips Romāns <frfilips@gmail.com>
+
+Bug existed since version 2.4.2, since the handling of SIGWINCH changed.
+---
+ src/text.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/text.c b/src/text.c
+index e0e29468..2ac52dec 100644
+--- a/src/text.c
++++ b/src/text.c
+@@ -2647,6 +2647,9 @@ void do_linter(void)
+ 		return;
+ 	}
+ 
++	/* Block resizing signals while reading from the pipe. */
++	block_sigwinch(TRUE);
++
+ 	/* Read in the returned syntax errors. */
+ 	totalread = 0;
+ 	buffersize = pipesize + 1;
+@@ -2663,6 +2666,8 @@ void do_linter(void)
+ 	*pointer = '\0';
+ 	close(lint_fd[0]);
+ 
++	block_sigwinch(FALSE);
++
+ 	/* Process the linter output. */
+ 	pointer = lintings;
+ 	onelint = lintings;
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0013-editing-prevent-the-pointer-for-the-top-row-from-bec.patch nano-5.4/debian/patches/0013-editing-prevent-the-pointer-for-the-top-row-from-bec.patch
--- nano-5.4/debian/patches/0013-editing-prevent-the-pointer-for-the-top-row-from-bec.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0013-editing-prevent-the-pointer-for-the-top-row-from-bec.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,44 @@
+From 3b2949940efbe8c05263fce7ebcc390a9f178c01 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Thu, 22 Apr 2021 19:28:34 +0200
+Subject: [PATCH 13/34] editing: prevent the pointer for the top row from
+ becoming dangling
+
+When undoing several actions, it is possible for the line at the top
+of the screen to be removed, leaving 'edittop' pointing to a structure
+that has been freed.  Soon after, 'edittop' is referenced to determine
+whether the cursor is offscreen...  Prevent this invalid reference by
+stepping 'edittop' one line back in that special case.  This changes
+the normal centering behavior of Undo when the cursor goes offscreen,
+but... so be it.
+
+When a single node is deleted, it is always possible to step one line
+back, because a buffer contains always at least one line (even though
+maybe empty), so if the current line could be deleted, there must be
+one before it (when at the top of the screen).
+
+This fixes https://savannah.gnu.org/bugs/?60436.
+
+Bug existed since version 2.3.3, commit 60815461,
+since undoing does not always center the cursor.
+---
+ src/nano.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/nano.c b/src/nano.c
+index 913329a5..2b6c416f 100644
+--- a/src/nano.c
++++ b/src/nano.c
+@@ -104,6 +104,9 @@ void splice_node(linestruct *afterthis, linestruct *newnode)
+ /* Free the data structures in the given node. */
+ void delete_node(linestruct *line)
+ {
++	/* If the first line on the screen gets deleted, step one back. */
++	if (line == openfile->edittop)
++		openfile->edittop = line->prev;
+ #ifdef ENABLE_WRAPPING
+ 	/* If the spill-over line for hard-wrapping is deleted... */
+ 	if (line == openfile->spillage_line)
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0014-memory-move-the-correct-number-of-bytes-and-not-one-.patch nano-5.4/debian/patches/0014-memory-move-the-correct-number-of-bytes-and-not-one-.patch
--- nano-5.4/debian/patches/0014-memory-move-the-correct-number-of-bytes-and-not-one-.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0014-memory-move-the-correct-number-of-bytes-and-not-one-.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,33 @@
+From f35daa7d3b448692966244a6d7931118ee0e8263 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Thu, 10 Jun 2021 11:34:04 +0200
+Subject: [PATCH 14/34] memory: move the correct number of bytes, and not one
+ too many
+
+We want to reduce the size of the answer by one byte,
+not keep the full answer (plus terminating NUL).
+
+This fixes https://savannah.gnu.org/bugs/?60764.
+
+Bug existed since version 2.9.8, commit f304b9ae,
+since piping text to an external command was introduced.
+---
+ src/prompt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/prompt.c b/src/prompt.c
+index d092c707..180da860 100644
+--- a/src/prompt.c
++++ b/src/prompt.c
+@@ -424,7 +424,7 @@ void draw_the_promptbar(void)
+ void add_or_remove_pipe_symbol_from_answer(void)
+ {
+ 	if (answer[0] == '|') {
+-		memmove(answer, answer + 1, strlen(answer) + 1);
++		memmove(answer, answer + 1, strlen(answer));
+ 		if (typing_x > 0)
+ 			typing_x--;
+ 	} else {
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0015-feedback-when-not-in-curses-mode-just-skip-displayin.patch nano-5.4/debian/patches/0015-feedback-when-not-in-curses-mode-just-skip-displayin.patch
--- nano-5.4/debian/patches/0015-feedback-when-not-in-curses-mode-just-skip-displayin.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0015-feedback-when-not-in-curses-mode-just-skip-displayin.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,38 @@
+From 0007385a4733b1b2e7d73bb93d77c114f1a43dd8 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Tue, 29 Jun 2021 12:51:44 +0200
+Subject: [PATCH 15/34] feedback: when not in curses mode, just skip displaying
+ any message
+
+Calling die() could trigger another call of emergency_save(), which
+could fail and cause another call to statusline(), which would call
+die() again...  Spiralling until stack space runs out.
+
+This fixes https://savannah.gnu.org/bugs/?60853.
+
+Bug existed since version 5.1, commit 7942dab0.
+
+Original report was in https://bugzilla.redhat.com/1976410.
+Reported-by: Souptik Dutta Roy <duttaroy.souptik@gmail.com>
+---
+ src/winio.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/winio.c b/src/winio.c
+index 906ea5b4..17ac9dad 100644
+--- a/src/winio.c
++++ b/src/winio.c
+@@ -2076,8 +2076,9 @@ void statusline(message_type importance, const char *msg, ...)
+ 
+ 	UNSET(WHITESPACE_DISPLAY);
+ 
++	/* When not in curses mode, there is no status bar to display anything on. */
+ 	if (isendwin())
+-		die("Out of curses -- please report a bug\n");
++		return;
+ #endif
+ 
+ 	/* Ignore a message with an importance that is lower than the last one. */
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0016-input-give-up-on-the-input-stream-only-after-million.patch nano-5.4/debian/patches/0016-input-give-up-on-the-input-stream-only-after-million.patch
--- nano-5.4/debian/patches/0016-input-give-up-on-the-input-stream-only-after-million.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0016-input-give-up-on-the-input-stream-only-after-million.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,37 @@
+From 9b430e0e8deaf5a2dd70c8d426f6b18d05cd6c15 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Tue, 29 Jun 2021 13:20:16 +0200
+Subject: [PATCH 16/34] input: give up on the input stream only after millions
+ of errors
+
+This mitigates a problem seen sometimes among the Red Hat crash reports:
+somehow wgetch() keeps returning ERR, as if it were in nodelay mode.
+(I've seen this happen once after nano came out of suspension.)
+
+Using a much larger error-count value gives the user a few seconds
+to type something and hopefully get out of the error condition.
+---
+ src/winio.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/winio.c b/src/winio.c
+index 17ac9dad..d841bee0 100644
+--- a/src/winio.c
++++ b/src/winio.c
+@@ -197,11 +197,11 @@ void read_keys_from(WINDOW *win)
+ 			input = KEY_WINCH;
+ 		}
+ #endif
+-		/* When we've failed to get a keycode over a hundred times in a row,
++		/* When we've failed to get a keycode millions of times in a row,
+ 		 * assume our input source is gone and die gracefully.  We could
+ 		 * check if errno is set to EIO ("Input/output error") and die in
+ 		 * that case, but it's not always set properly.  Argh. */
+-		if (input == ERR && ++errcount == 123)
++		if (input == ERR && ++errcount == 12345678)
+ 			die(_("Too many errors from stdin\n"));
+ 	}
+ 
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0017-general-prevent-die-from-getting-recursed-into.patch nano-5.4/debian/patches/0017-general-prevent-die-from-getting-recursed-into.patch
--- nano-5.4/debian/patches/0017-general-prevent-die-from-getting-recursed-into.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0017-general-prevent-die-from-getting-recursed-into.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,33 @@
+From 1ad1b9ea40de35a6435a75ac900fa1654494fce1 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Wed, 30 Jun 2021 15:01:45 +0200
+Subject: [PATCH 17/34] general: prevent die() from getting recursed into
+
+When something that is called from die() calls die() again,
+there is nothing we can do any more but give up.
+
+This would have prevented the spiralling as
+seen in https://savannah.gnu.org/bugs/?60853.
+---
+ src/nano.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/nano.c b/src/nano.c
+index 2b6c416f..32aa9964 100644
+--- a/src/nano.c
++++ b/src/nano.c
+@@ -357,6 +357,11 @@ void die(const char *msg, ...)
+ {
+ 	va_list ap;
+ 	openfilestruct *firstone = openfile;
++	static int stabs = 0;
++
++	/* When dying for a second time, just give up. */
++	if (++stabs > 1)
++		exit(11);
+ 
+ 	restore_terminal();
+ 
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0018-files-check-the-result-of-fdopen-to-avoid-a-possible.patch nano-5.4/debian/patches/0018-files-check-the-result-of-fdopen-to-avoid-a-possible.patch
--- nano-5.4/debian/patches/0018-files-check-the-result-of-fdopen-to-avoid-a-possible.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0018-files-check-the-result-of-fdopen-to-avoid-a-possible.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,42 @@
+From e84a8d53231add66f99d70da0237408218a20e08 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Fri, 20 Aug 2021 10:28:42 +0200
+Subject: [PATCH 18/34] files: check the result of fdopen(), to avoid a
+ possible crash
+
+When safe_tempfile() returns a valid filename, it should also
+return a valid open stream.
+
+This fixes https://savannah.gnu.org/bugs/?61064.
+
+Bug existed since version 1.3.8, commit 5e068c60.
+---
+ src/files.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/files.c b/src/files.c
+index 2c4af674..582965c6 100644
+--- a/src/files.c
++++ b/src/files.c
+@@ -1447,13 +1447,15 @@ char *safe_tempfile(FILE **stream)
+ 
+ 	fd = mkstemp(tempfile_name);
+ 
+-	if (fd == -1) {
++	*stream = (fd > 0) ? fdopen(fd, "r+b") : NULL;
++
++	if (*stream == NULL) {
++		if (fd > 0)
++			close(fd);
+ 		free(tempfile_name);
+ 		return NULL;
+ 	}
+ 
+-	*stream = fdopen(fd, "r+b");
+-
+ 	return tempfile_name;
+ }
+ 
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0019-files-write-a-lock-file-also-for-a-freshly-saved-buf.patch nano-5.4/debian/patches/0019-files-write-a-lock-file-also-for-a-freshly-saved-buf.patch
--- nano-5.4/debian/patches/0019-files-write-a-lock-file-also-for-a-freshly-saved-buf.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0019-files-write-a-lock-file-also-for-a-freshly-saved-buf.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,34 @@
+From 6d8ca962dccb44ee3cb0caa2ad487c94add307c9 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Sun, 12 Sep 2021 09:54:31 +0200
+Subject: [PATCH 19/34] files: write a lock file also for a freshly saved
+ buffer
+
+This fixes https://savannah.gnu.org/bugs/?61146
+
+Bug existed since version 2.3.2, since --locking was introduced,
+and continued to exist since version 4.8 despite commit 497f126b
+claiming to have fixed it.
+---
+ src/files.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/files.c b/src/files.c
+index 582965c6..8156dd85 100644
+--- a/src/files.c
++++ b/src/files.c
+@@ -1947,8 +1947,10 @@ bool write_file(const char *name, FILE *thefile, bool tmp,
+ 			if (openfile->lock_filename != NULL) {
+ 				delete_lockfile(openfile->lock_filename);
+ 				free(openfile->lock_filename);
+-				openfile->lock_filename = do_lockfile(realname, FALSE);
+ 			}
++
++			if (ISSET(LOCKING))
++				openfile->lock_filename = do_lockfile(realname, FALSE);
+ #endif
+ 			openfile->filename = mallocstrcpy(openfile->filename, realname);
+ #ifdef ENABLE_COLOR
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0020-feedback-retain-the-correct-help-lines-during-Verbat.patch nano-5.4/debian/patches/0020-feedback-retain-the-correct-help-lines-during-Verbat.patch
--- nano-5.4/debian/patches/0020-feedback-retain-the-correct-help-lines-during-Verbat.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0020-feedback-retain-the-correct-help-lines-during-Verbat.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,39 @@
+From 8842035ecd8560787a83b8b54ccf769aacf1f031 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Sun, 19 Sep 2021 09:51:58 +0200
+Subject: [PATCH 20/34] feedback: retain the correct help lines during Verbatim
+ Input with Slang
+
+This fixes https://savannah.gnu.org/bugs/?61184.
+
+Bug existed since version 5.3, commit b9a1a586.
+---
+ src/winio.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/winio.c b/src/winio.c
+index d841bee0..71474a65 100644
+--- a/src/winio.c
++++ b/src/winio.c
+@@ -1341,6 +1341,9 @@ long assemble_unicode(int symbol)
+ 		/* TRANSLATORS: This is shown while a six-digit hexadecimal
+ 		 * Unicode character code (%s) is being typed in. */
+ 		statusline(HUSH, _("Unicode Input: %s"), partial);
++#ifdef USE_SLANG
++		bottombars(MMAIN);
++#endif
+ 	}
+ 
+ 	/* If we have an end result, reset the Unicode digit counter. */
+@@ -1449,6 +1452,8 @@ char *get_verbatim_kbinput(WINDOW *win, size_t *count)
+ #ifndef USE_SLANG
+ 	if (!ISSET(RAW_SEQUENCES))
+ 		keypad(win, FALSE);
++#else
++	bottombars(MMAIN);
+ #endif
+ #ifndef NANO_TINY
+ 	/* Turn bracketed-paste mode off. */
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0021-help-show-when-using-Slang-instead-of-_-as-the-latte.patch nano-5.4/debian/patches/0021-help-show-when-using-Slang-instead-of-_-as-the-latte.patch
--- nano-5.4/debian/patches/0021-help-show-when-using-Slang-instead-of-_-as-the-latte.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0021-help-show-when-using-Slang-instead-of-_-as-the-latte.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,32 @@
+From 1e7e76a7cadf8d7f210a4881616e7e7c9d50b2bf Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Sun, 19 Sep 2021 10:01:35 +0200
+Subject: [PATCH 21/34] help: show ^- when using Slang instead of ^_ as the
+ latter does nothing
+
+This fixes https://savannah.gnu.org/bugs/?61185.
+
+Bug existed since probably forever.
+---
+ src/global.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/global.c b/src/global.c
+index 8b2bb7ac..550c855c 100644
+--- a/src/global.c
++++ b/src/global.c
+@@ -1230,7 +1230,11 @@ void shortcut_init(void)
+ 	add_to_sclist(MEXECUTE, "^O", 0, do_formatter, 0);
+ #endif
+ 	add_to_sclist(MMAIN, "^C", 0, report_cursor_position, 0);
++#ifdef USE_SLANG
++	add_to_sclist(MMAIN, "^-", 0x1F, do_gotolinecolumn_void, 0);
++#else
+ 	add_to_sclist(MMAIN, "^_", 0, do_gotolinecolumn_void, 0);
++#endif
+ 	add_to_sclist(MMAIN, "M-G", 0, do_gotolinecolumn_void, 0);
+ 	add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "^Y", 0, do_page_up, 0);
+ 	add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "PgUp", KEY_PPAGE, do_page_up, 0);
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0022-display-work-around-a-disappearing-cursor-when-a-lin.patch nano-5.4/debian/patches/0022-display-work-around-a-disappearing-cursor-when-a-lin.patch
--- nano-5.4/debian/patches/0022-display-work-around-a-disappearing-cursor-when-a-lin.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0022-display-work-around-a-disappearing-cursor-when-a-lin.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,36 @@
+From 43ba408ee4a6a9efb54685b68df80b45c93c7d51 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Sun, 19 Sep 2021 13:58:51 +0200
+Subject: [PATCH 22/34] display: work around a disappearing cursor when a line
+ scrolled sideways
+
+This fixes https://savannah.gnu.org/bugs/?61186.
+
+Problem existed since probably forever.
+---
+ src/winio.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/winio.c b/src/winio.c
+index 71474a65..e3a8e859 100644
+--- a/src/winio.c
++++ b/src/winio.c
+@@ -3213,6 +3213,15 @@ void edit_redraw(linestruct *old_current, update_type manner)
+ 						(old_current != openfile->current &&
+ 						get_page_start(openfile->placewewant) > 0))
+ 		update_line(openfile->current, openfile->current_x);
++
++#ifdef USE_SLANG
++	/* Work around a gaffe of Slang -- https://sv.gnu.org/bugs/?61186. */
++	if (get_page_start(was_pww) > 0 || get_page_start(openfile->placewewant) > 0) {
++		wrefresh(edit);
++		full_refresh();
++	}
++#endif
++
+ }
+ 
+ /* Refresh the screen without changing the position of lines.  Use this
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0023-display-with-Slang-make-a-hidden-cursor-return-upon-.patch nano-5.4/debian/patches/0023-display-with-Slang-make-a-hidden-cursor-return-upon-.patch
--- nano-5.4/debian/patches/0023-display-with-Slang-make-a-hidden-cursor-return-upon-.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0023-display-with-Slang-make-a-hidden-cursor-return-upon-.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,31 @@
+From 59e12635db90e501c65546f00cce44b5dbb2a9c9 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Sun, 19 Sep 2021 15:05:47 +0200
+Subject: [PATCH 23/34] display: with Slang, make a hidden cursor return upon
+ the next keystroke
+
+This mitigates https://savannah.gnu.org/bugs/?61189.
+
+Problem existed since probably forever.
+---
+ src/winio.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/winio.c b/src/winio.c
+index e3a8e859..1116c172 100644
+--- a/src/winio.c
++++ b/src/winio.c
+@@ -2163,6 +2163,10 @@ void statusline(message_type importance, const char *msg, ...)
+ #ifdef USE_SLANG
+ 	/* Work around a shy cursor -- https://sv.gnu.org/bugs/?59091. */
+ 	bottombars(MGOTODIR);
++
++	/* Mitigate a hiding cursor -- https://sv.gnu.org/bugs/?61189. */
++	if (ISSET(NO_HELP))
++		statusblank = 1;
+ #endif
+ }
+ 
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0024-docs-correct-the-descriptions-of-how-to-invoke-the-s.patch nano-5.4/debian/patches/0024-docs-correct-the-descriptions-of-how-to-invoke-the-s.patch
--- nano-5.4/debian/patches/0024-docs-correct-the-descriptions-of-how-to-invoke-the-s.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0024-docs-correct-the-descriptions-of-how-to-invoke-the-s.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,41 @@
+From a27b75631da17036e4814ee3ed8c06606c526298 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Sat, 28 Aug 2021 10:20:31 +0200
+Subject: [PATCH 24/34] docs: correct the descriptions of how to invoke the
+ spell checker
+
+The keystrokes to invoke it changed in version 5.0.
+---
+ doc/nano.1    | 2 +-
+ doc/nano.texi | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/doc/nano.1 b/doc/nano.1
+index a759f359..3f979b90 100644
+--- a/doc/nano.1
++++ b/doc/nano.1
+@@ -81,7 +81,7 @@ When a more precise piece of text needs to be cut or copied, one can mark
+ its start with \fB^6\fR, move the cursor to its end (the marked text will be
+ highlighted), and then use \fB^K\fR to cut it, or \fBM\-6\fR to copy it to the
+ cutbuffer.  One can also save the marked text to a file with \fB^O\fR, or
+-spell check it with \fB^T\fR.
++spell check it with \fB^T^T\fR.
+ .sp
+ On some terminals, text can be selected also by holding down Shift while
+ using the arrow keys.  Holding down the Ctrl or Alt key too will increase
+diff --git a/doc/nano.texi b/doc/nano.texi
+index d3b61d1f..d0849759 100644
+--- a/doc/nano.texi
++++ b/doc/nano.texi
+@@ -570,7 +570,7 @@ or @kbd{M-A} and then moving the cursor to the other end of the portion
+ to be selected.  The selected portion of text will be highlighted.
+ This selection can now be cut or copied in its entirety with a single
+ @kbd{^K} or @kbd{M-6}.  Or the selection can be used to limit the scope of
+-a search-and-replace (@kbd{^\}) or spell-checking session (@kbd{^T}).
++a search-and-replace (@kbd{^\}) or spell-checking session (@kbd{^T^T}).
+ 
+ On some terminals, text can be selected also by holding down @kbd{Shift}
+ while using the cursor keys.  Holding down the @kbd{Ctrl} or @kbd{Alt}
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0025-docs-correct-the-default-value-of-the-errorcolor-opt.patch nano-5.4/debian/patches/0025-docs-correct-the-default-value-of-the-errorcolor-opt.patch
--- nano-5.4/debian/patches/0025-docs-correct-the-default-value-of-the-errorcolor-opt.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0025-docs-correct-the-default-value-of-the-errorcolor-opt.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,45 @@
+From fec1f699ce5037654b3d329115dcd5b753f970c6 Mon Sep 17 00:00:00 2001
+From: Hussam al-Homsi <sawuare@gmail.com>
+Date: Sun, 12 Sep 2021 13:55:17 -0400
+Subject: [PATCH 25/34] docs: correct the default value of the errorcolor
+ option
+
+It should be "bold,white,red" instead of "brightwhite,red"
+because "bright" is deprecated and not documented.
+
+Signed-off-by: Hussam al-Homsi <sawuare@gmail.com>
+Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
+---
+ doc/nano.texi | 2 +-
+ doc/nanorc.5  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/doc/nano.texi b/doc/nano.texi
+index d0849759..b0df52e9 100644
+--- a/doc/nano.texi
++++ b/doc/nano.texi
+@@ -838,7 +838,7 @@ Do not use the line below the title bar, leaving it entirely blank.
+ 
+ @item set errorcolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
+ Use this color combination for the status bar when an error message is displayed.
+-The default value is @t{brightwhite,red}.
++The default value is @t{bold,white,red}.
+ @xref{@code{set functioncolor}} for valid color names.
+ 
+ @item set fill @var{number}
+diff --git a/doc/nanorc.5 b/doc/nanorc.5
+index 610fb284..81b2a9f3 100644
+--- a/doc/nanorc.5
++++ b/doc/nanorc.5
+@@ -127,7 +127,7 @@ Do not use the line below the title bar, leaving it entirely blank.
+ .TP
+ .B set errorcolor \fR[\fBbold,\fR][\fBitalic,\fR]\fIfgcolor\fB,\fIbgcolor\fR
+ Use this color combination for the status bar when an error message is displayed.
+-The default value is \fBbrightwhite,red\fR.
++The default value is \fBbold,white,red\fR.
+ See \fBset titlecolor\fR for valid color names.
+ .TP
+ .B set fill \fInumber\fR
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0026-startup-if-TERM-is-unset-try-falling-back-to-VT220-i.patch nano-5.4/debian/patches/0026-startup-if-TERM-is-unset-try-falling-back-to-VT220-i.patch
--- nano-5.4/debian/patches/0026-startup-if-TERM-is-unset-try-falling-back-to-VT220-i.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0026-startup-if-TERM-is-unset-try-falling-back-to-VT220-i.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,36 @@
+From 2f2c1bb5af100f36402f4f1e7af5ac3e8039268c Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Thu, 9 Sep 2021 16:17:04 +0200
+Subject: [PATCH 26/34] startup: if TERM is unset, try falling back to VT220
+ instead of failing
+
+Curses cannot function if not informed via TERM which type of terminal
+is being used.  As many terminals are mostly compatible with a VT220,
+falling back to "vt220" when TERM is unset has a good chance of giving
+the user a usable nano, instead of simply failing.
+
+(Falling back to "vt100" is not good as it contains padding delays.)
+
+This partially addresses https://bugs.debian.org/991982.
+---
+ src/nano.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/nano.c b/src/nano.c
+index 32aa9964..521c4a03 100644
+--- a/src/nano.c
++++ b/src/nano.c
+@@ -2112,6 +2112,10 @@ int main(int argc, char **argv)
+ 		}
+ 	}
+ 
++	/* Curses needs TERM; if it is unset, try falling back to a VT220. */
++	if (getenv("TERM") == NULL)
++		setenv("TERM", "vt220", 0);
++
+ 	/* Enter into curses mode.  Abort if this fails. */
+ 	if (initscr() == NULL)
+ 		exit(1);
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0027-files-do-not-call-fsync-on-a-fifo-to-avoid-a-spuriou.patch nano-5.4/debian/patches/0027-files-do-not-call-fsync-on-a-fifo-to-avoid-a-spuriou.patch
--- nano-5.4/debian/patches/0027-files-do-not-call-fsync-on-a-fifo-to-avoid-a-spuriou.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0027-files-do-not-call-fsync-on-a-fifo-to-avoid-a-spuriou.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,44 @@
+From 1e5a34bdb327de9eabc32244c773c66911246f35 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Mon, 27 Sep 2021 17:15:57 +0200
+Subject: [PATCH 27/34] files: do not call fsync() on a fifo, to avoid a
+ spurious error message
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes https://savannah.gnu.org/bugs/?61234.
+
+The original report was in:
+  https://lists.gnu.org/archive/html/nano-devel/2021-09/msg00029.html
+Reported-by: André Kugland <kugland@gmail.com>
+
+Bug existed since version 5.0, commit a84cdaaa.
+---
+ src/files.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/files.c b/src/files.c
+index 8156dd85..17967fed 100644
+--- a/src/files.c
++++ b/src/files.c
+@@ -1924,14 +1924,15 @@ bool write_file(const char *name, FILE *thefile, bool tmp,
+ 
+ 		unlink(tempname);
+ 	}
+-#endif
+ 
++	if (!is_existing_file || !S_ISFIFO(st.st_mode))
+ 	/* Ensure the data has reached the disk before reporting it as written. */
+ 	if (fflush(thefile) != 0 || fsync(fileno(thefile)) != 0) {
+ 		statusline(ALERT, _("Error writing %s: %s"), realname, strerror(errno));
+ 		fclose(thefile);
+ 		goto cleanup_and_exit;
+ 	}
++#endif
+ 
+ 	if (fclose(thefile) != 0) {
+ 		statusline(ALERT, _("Error writing %s: %s"), realname, strerror(errno));
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0028-files-making-a-backup-of-a-fifo-makes-no-sense-so-do.patch nano-5.4/debian/patches/0028-files-making-a-backup-of-a-fifo-makes-no-sense-so-do.patch
--- nano-5.4/debian/patches/0028-files-making-a-backup-of-a-fifo-makes-no-sense-so-do.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0028-files-making-a-backup-of-a-fifo-makes-no-sense-so-do.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,29 @@
+From 09856d626d9464f7f828e4ba4017f59fdcfa1847 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Tue, 28 Sep 2021 09:40:03 +0200
+Subject: [PATCH 28/34] files: making a backup of a fifo makes no sense, so do
+ not try that
+
+This fixes https://savannah.gnu.org/bugs/?61235.
+
+Bug existed since version 4.3, commit 1b2018e9,
+since opening a fifo was made possible again.
+---
+ src/files.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/files.c b/src/files.c
+index 17967fed..271099d0 100644
+--- a/src/files.c
++++ b/src/files.c
+@@ -1763,6 +1763,7 @@ bool write_file(const char *name, FILE *thefile, bool tmp,
+ 	 * isn't temporary AND the file has not been modified by someone else since
+ 	 * we opened it (or we are appending/prepending or writing a selection). */
+ 	if (ISSET(MAKE_BACKUP) && is_existing_file && openfile->statinfo &&
++						!S_ISFIFO(st.st_mode) &&
+ 						(openfile->statinfo->st_mtime == st.st_mtime ||
+ 						method != OVERWRITE || openfile->mark)) {
+ 		if (!make_backup_of(realname))
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0029-shutdown-when-dying-do-not-install-restore-a-handler.patch nano-5.4/debian/patches/0029-shutdown-when-dying-do-not-install-restore-a-handler.patch
--- nano-5.4/debian/patches/0029-shutdown-when-dying-do-not-install-restore-a-handler.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0029-shutdown-when-dying-do-not-install-restore-a-handler.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,53 @@
+From 1164453a32238755613a454ef55ae853ff3f4c96 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Tue, 28 Sep 2021 18:05:15 +0200
+Subject: [PATCH 29/34] shutdown: when dying, do not install/restore a handler
+ for Ctrl+C
+
+First, we don't want the writing of an emergency file to be interrupted
+by the user.  But more important: the routine for restoring the handler
+also disables SIGINT, which would leave the terminal with a non-working
+Ctrl+C.
+
+Saving an emergency file calls write_file() in a unique manner: with
+thefile == NULL, fullbuffer == FALSE (even though the entire buffer
+will be saved, of course) and tmp == TRUE (even though it is not a
+temporary file, as it will persist after nano exits).  But in fact
+we want the handler for Ctrl+C installed only for normal files, not
+for temporary files and not for emergency files -- the user should
+not be able to interrupt the writing of those.
+
+This fixes https://savannah.gnu.org/bugs/?61237.
+
+Bug existed since version 4.3, commit 8550c6bd.
+---
+ src/files.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/files.c b/src/files.c
+index 271099d0..ab9957c9 100644
+--- a/src/files.c
++++ b/src/files.c
+@@ -1814,7 +1814,8 @@ bool write_file(const char *name, FILE *thefile, bool tmp,
+ 
+ #ifndef NANO_TINY
+ 		block_sigwinch(TRUE);
+-		install_handler_for_Ctrl_C();
++		if (!tmp)
++			install_handler_for_Ctrl_C();
+ #endif
+ 
+ 		/* Now open the file.  Use O_EXCL for an emergency file. */
+@@ -1822,7 +1823,8 @@ bool write_file(const char *name, FILE *thefile, bool tmp,
+ 					O_APPEND : (tmp ? O_EXCL : O_TRUNC)), permissions);
+ 
+ #ifndef NANO_TINY
+-		restore_handler_for_Ctrl_C();
++		if (!tmp)
++			restore_handler_for_Ctrl_C();
+ 		block_sigwinch(FALSE);
+ #endif
+ 
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0030-browser-make-the-keystrokes-W-Y-and-W-V-work-again.patch nano-5.4/debian/patches/0030-browser-make-the-keystrokes-W-Y-and-W-V-work-again.patch
--- nano-5.4/debian/patches/0030-browser-make-the-keystrokes-W-Y-and-W-V-work-again.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0030-browser-make-the-keystrokes-W-Y-and-W-V-work-again.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,93 @@
+From 75d751e4e3af4df404b17887336b3bfe6568b451 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Mon, 4 Oct 2021 11:31:22 +0200
+Subject: [PATCH 30/34] browser: make the keystrokes ^W^Y and ^W^V work again
+
+The functions to_first_file() and to_last_file() can get called from
+do_statusbar_input(), which is called indirectly from do_prompt(),
+and are expected to make the corresponding adjustment.
+
+This fixes https://savannah.gnu.org/bugs/?61273.
+
+Bug existed since version 5.0, commit 07c1ac90.
+---
+ src/browser.c    | 15 ++++++++++++++-
+ src/global.c     |  6 ------
+ src/prototypes.h |  4 ++--
+ 3 files changed, 16 insertions(+), 9 deletions(-)
+
+diff --git a/src/browser.c b/src/browser.c
+index ed469b84..73c10fe3 100644
+--- a/src/browser.c
++++ b/src/browser.c
+@@ -359,7 +359,8 @@ void search_filename(bool forwards)
+ #endif
+ 	}
+ 
+-	findfile(last_search, forwards);
++	if (response == 0 || response == -2)
++		findfile(last_search, forwards);
+ }
+ 
+ /* Search again without prompting for the last given search string,
+@@ -380,6 +381,18 @@ void research_filename(bool forwards)
+ 	}
+ }
+ 
++/* Select the first file in the list -- called by ^W^Y. */
++void to_first_file(void)
++{
++	selected = 0;
++}
++
++/* Select the last file in the list -- called by ^W^V. */
++void to_last_file(void)
++{
++	selected = list_length - 1;
++}
++
+ /* Strip one element from the end of path, and return the stripped path.
+  * The returned string is dynamically allocated, and should be freed. */
+ char *strip_last_component(const char *path)
+diff --git a/src/global.c b/src/global.c
+index 550c855c..62ce54dc 100644
+--- a/src/global.c
++++ b/src/global.c
+@@ -298,12 +298,6 @@ void flip_goto(void)
+ void to_files(void)
+ {
+ }
+-void to_first_file(void)
+-{
+-}
+-void to_last_file(void)
+-{
+-}
+ void goto_dir(void)
+ {
+ }
+diff --git a/src/prototypes.h b/src/prototypes.h
+index f9ac3a9c..efc6a110 100644
+--- a/src/prototypes.h
++++ b/src/prototypes.h
+@@ -190,6 +190,8 @@ typedef void (*functionptrtype)(void);
+ #ifdef ENABLE_BROWSER
+ void browser_refresh(void);
+ char *browse_in(const char *inpath);
++void to_first_file(void);
++void to_last_file(void);
+ #endif
+ 
+ /* Most functions in chars.c. */
+@@ -642,8 +644,6 @@ void flip_replace(void);
+ void flip_goto(void);
+ #ifdef ENABLE_BROWSER
+ void to_files(void);
+-void to_first_file(void);
+-void to_last_file(void);
+ void goto_dir(void);
+ #endif
+ #ifndef NANO_TINY
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0031-help-make-the-keystrokes-W-Y-and-W-V-work-again.patch nano-5.4/debian/patches/0031-help-make-the-keystrokes-W-Y-and-W-V-work-again.patch
--- nano-5.4/debian/patches/0031-help-make-the-keystrokes-W-Y-and-W-V-work-again.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0031-help-make-the-keystrokes-W-Y-and-W-V-work-again.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,33 @@
+From 4011c824cbec477a36cfddf2134da4d1537c2892 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Mon, 4 Oct 2021 11:54:02 +0200
+Subject: [PATCH 31/34] help: make the keystrokes ^W^Y and ^W^V work again
+
+The keystrokes are not listed, but should work like
+they do in a normal, editable buffer.
+
+This fixes https://savannah.gnu.org/bugs/?61274.
+
+Bug existed since version 4.0, commit bc98dbca.
+---
+ src/global.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/global.c b/src/global.c
+index 62ce54dc..69e1e718 100644
+--- a/src/global.c
++++ b/src/global.c
+@@ -1436,8 +1436,8 @@ void shortcut_init(void)
+ 	add_to_sclist(MGOTOLINE, "^W", 0, to_para_begin, 0);
+ 	add_to_sclist(MGOTOLINE, "^O", 0, to_para_end, 0);
+ #endif
+-	add_to_sclist(MGOTOLINE, "^Y", 0, to_first_line, 0);
+-	add_to_sclist(MGOTOLINE, "^V", 0, to_last_line, 0);
++	add_to_sclist(MGOTOLINE|MFINDINHELP, "^Y", 0, to_first_line, 0);
++	add_to_sclist(MGOTOLINE|MFINDINHELP, "^V", 0, to_last_line, 0);
+ 	/* Some people are used to having these keystrokes in the Search menu. */
+ 	add_to_sclist(MWHEREIS, "^Y", 0, to_first_line, 0);
+ 	add_to_sclist(MWHEREIS, "^V", 0, to_last_line, 0);
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0032-prompt-keep-a-clear-answer-clear-also-after-an-excur.patch nano-5.4/debian/patches/0032-prompt-keep-a-clear-answer-clear-also-after-an-excur.patch
--- nano-5.4/debian/patches/0032-prompt-keep-a-clear-answer-clear-also-after-an-excur.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0032-prompt-keep-a-clear-answer-clear-also-after-an-excur.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,33 @@
+From fc5f0cc8a2a5b35d731e35f4d149bf6dcff041c3 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Fri, 8 Oct 2021 12:36:32 +0200
+Subject: [PATCH 32/34] prompt: keep a clear answer clear also after an
+ excursion into history
+
+When the answer at the prompt was clear before the user went up into
+the history list, the answer should be cleared again when the user
+comes back down to the present.
+
+This fixes https://savannah.gnu.org/bugs/?61308.
+
+Bug existed since before version 2.2.0.
+---
+ src/prompt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/prompt.c b/src/prompt.c
+index 180da860..f8471e38 100644
+--- a/src/prompt.c
++++ b/src/prompt.c
+@@ -506,7 +506,7 @@ functionptrtype acquire_an_answer(int *actual, bool *listed,
+ 			if (history_list != NULL) {
+ 				/* If we're scrolling up at the bottom of the history list
+ 				 * and answer isn't blank, save answer in magichistory. */
+-				if ((*history_list)->next == NULL && *answer != '\0')
++				if ((*history_list)->next == NULL)
+ 					magichistory = mallocstrcpy(magichistory, answer);
+ 
+ 				/* Get the older search from the history list and save it in
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0033-help-do-not-show-S-when-preserve-is-in-effect.patch nano-5.4/debian/patches/0033-help-do-not-show-S-when-preserve-is-in-effect.patch
--- nano-5.4/debian/patches/0033-help-do-not-show-S-when-preserve-is-in-effect.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0033-help-do-not-show-S-when-preserve-is-in-effect.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,29 @@
+From 69a03d270792a64ebf97ed6a1c5d4731eae2b6af Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Sat, 9 Oct 2021 12:55:41 +0200
+Subject: [PATCH 33/34] help: do not show ^S when --preserve is in effect
+
+This fixes https://savannah.gnu.org/bugs/?61317.
+
+Bug existed since version 5.0, since the Execute menu was overhauled.
+---
+ src/global.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/global.c b/src/global.c
+index 69e1e718..3edfd382 100644
+--- a/src/global.c
++++ b/src/global.c
+@@ -1214,7 +1214,8 @@ void shortcut_init(void)
+ 	add_to_sclist(MMAIN, "^J", '\n', do_justify_void, 0);
+ #endif
+ #ifdef ENABLE_SPELLER
+-	add_to_sclist(MEXECUTE, "^S", 0, do_spell, 0);
++	if (!ISSET(PRESERVE))
++		add_to_sclist(MEXECUTE, "^S", 0, do_spell, 0);
+ 	add_to_sclist(MEXECUTE, "^T", 0, do_spell, 0);
+ #endif
+ #ifdef ENABLE_COLOR
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0034-syntax-email-use-a-character-class-as-s-does-not-wor.patch nano-5.4/debian/patches/0034-syntax-email-use-a-character-class-as-s-does-not-wor.patch
--- nano-5.4/debian/patches/0034-syntax-email-use-a-character-class-as-s-does-not-wor.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0034-syntax-email-use-a-character-class-as-s-does-not-wor.patch	2021-10-20 11:00:15.000000000 +0200
@@ -0,0 +1,29 @@
+From 88d5df9d692b4d6c6b72235d3dffd9efcc660b13 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Mon, 18 Oct 2021 11:49:52 +0200
+Subject: [PATCH 34/34] syntax: email: use a character class, as \s does not
+ work inside brackets
+
+This fixes https://savannah.gnu.org/bugs/?61347.
+
+Bug existed since version 4.9.3, commit 4f9bebdd.
+---
+ syntax/email.nanorc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/syntax/email.nanorc b/syntax/email.nanorc
+index 6818d2ff..d9eb4a72 100644
+--- a/syntax/email.nanorc
++++ b/syntax/email.nanorc
+@@ -11,7 +11,7 @@ color yellow "^> ?> ?>.*"
+ color brightmagenta "<[^@]+@[^@]+>"
+ 
+ # URLs.
+-color brightblue "(https?|ftp)://\S+\.\S+[^\s.)]"
++color brightblue "(https?|ftp)://\S+\.\S+[^[:space:].)]"
+ 
+ # Signatures, even quoted ones.
+ color yellow start="^>* ?-- $" end="^>* ?$"
+-- 
+2.29.3
+
diff -Nru nano-5.4/debian/patches/0035-justify-correctly-determine-whether-top-of-buffer-ha.patch nano-5.4/debian/patches/0035-justify-correctly-determine-whether-top-of-buffer-ha.patch
--- nano-5.4/debian/patches/0035-justify-correctly-determine-whether-top-of-buffer-ha.patch	1970-01-01 01:00:00.000000000 +0100
+++ nano-5.4/debian/patches/0035-justify-correctly-determine-whether-top-of-buffer-ha.patch	2021-11-22 00:18:14.000000000 +0100
@@ -0,0 +1,33 @@
+From 96b6556970fa201133f978a51cc9371901f0e9d2 Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Sun, 7 Nov 2021 15:15:35 +0100
+Subject: [PATCH 35/35] justify: correctly determine whether top-of-buffer has
+ been reached
+
+The text to be justified has been excised from the buffer and is now
+in the cutbuffer, so we cannot compare any of its lines to 'filetop'.
+
+This fixes https://savannah.gnu.org/bugs/?61438.
+
+Bug existed since version 4.0, commit 14c08589.
+---
+ src/text.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/text.c b/src/text.c
+index 2ac52dec..5ff5745d 100644
+--- a/src/text.c
++++ b/src/text.c
+@@ -1503,7 +1503,7 @@ bool begpar(const linestruct *const line, int depth)
+ 
+ 	/* If this is the very first line of the buffer, it counts as a BOP
+ 	 * even when it contains no text. */
+-	if (line == openfile->filetop)
++	if (line->prev == NULL)
+ 		return TRUE;
+ 
+ 	/* If recursion is going too deep, just say it's not a BOP. */
+-- 
+2.29.3
+
+
\ No hi ha cap caràcter de salt de línia al final del fitxer
diff -Nru nano-5.4/debian/patches/series nano-5.4/debian/patches/series
--- nano-5.4/debian/patches/series	2021-02-08 00:13:33.000000000 +0100
+++ nano-5.4/debian/patches/series	2021-11-22 00:52:49.000000000 +0100
@@ -9,3 +9,27 @@
 0009-tweaks-move-set-indicator-to-its-alphabetical-place-.patch
 0010-syntax-sh-recognize-shebangs-with-any-shell-after-en.patch
 0011-po-three-substantial-and-several-minor-updates-of-tr.patch
+0012-linter-block-the-resizing-signal-while-reading-outpu.patch
+0013-editing-prevent-the-pointer-for-the-top-row-from-bec.patch
+0014-memory-move-the-correct-number-of-bytes-and-not-one-.patch
+0015-feedback-when-not-in-curses-mode-just-skip-displayin.patch
+0016-input-give-up-on-the-input-stream-only-after-million.patch
+0017-general-prevent-die-from-getting-recursed-into.patch
+0018-files-check-the-result-of-fdopen-to-avoid-a-possible.patch
+0019-files-write-a-lock-file-also-for-a-freshly-saved-buf.patch
+0020-feedback-retain-the-correct-help-lines-during-Verbat.patch
+0021-help-show-when-using-Slang-instead-of-_-as-the-latte.patch
+0022-display-work-around-a-disappearing-cursor-when-a-lin.patch
+0023-display-with-Slang-make-a-hidden-cursor-return-upon-.patch
+0024-docs-correct-the-descriptions-of-how-to-invoke-the-s.patch
+0025-docs-correct-the-default-value-of-the-errorcolor-opt.patch
+0026-startup-if-TERM-is-unset-try-falling-back-to-VT220-i.patch
+0027-files-do-not-call-fsync-on-a-fifo-to-avoid-a-spuriou.patch
+0028-files-making-a-backup-of-a-fifo-makes-no-sense-so-do.patch
+0029-shutdown-when-dying-do-not-install-restore-a-handler.patch
+0030-browser-make-the-keystrokes-W-Y-and-W-V-work-again.patch
+0031-help-make-the-keystrokes-W-Y-and-W-V-work-again.patch
+0032-prompt-keep-a-clear-answer-clear-also-after-an-excur.patch
+0033-help-do-not-show-S-when-preserve-is-in-effect.patch
+0034-syntax-email-use-a-character-class-as-s-does-not-wor.patch
+0035-justify-correctly-determine-whether-top-of-buffer-ha.patch

--- End Message ---
--- Begin Message ---
Package: release.debian.org
Version: 11.4

(re-sending with fixed bug numbers)

Hi,

The updates discussed in these bugs were included in today's bullseye
point release.

Regards,

Adam

--- End Message ---

Reply to: