From 92b43abeb68d32bc40087842ded574415369b281 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Nov 27 2019 12:34:37 +0000 Subject: refresh the edit window when exiting from the help viewer Backport of an upstream fix suggested by Benno Schulenberg at https://lists.gnu.org/archive/html/nano-devel/2019-11/msg00021.html --- diff --git a/nano-4.3-display-refersh.patch b/nano-4.3-display-refersh.patch new file mode 100644 index 0000000..42bded7 --- /dev/null +++ b/nano-4.3-display-refersh.patch @@ -0,0 +1,46 @@ +From 0f5e94bd80c1cf703b789747262c787b72c4e504 Mon Sep 17 00:00:00 2001 +From: Benno Schulenberg +Date: Sat, 23 Nov 2019 20:22:31 +0100 +Subject: [PATCH] display: do refresh the edit window when exiting from the + help viewer + +There are several cases (searching, replacing, spell checking, ...) +where exiting from the help viewer does NOT return the user to the +editing of the buffer. + +This fixes https://savannah.gnu.org/bugs/?57295. + +Bug existed since version 4.3, commit 5817e83e. + +Upstream-commit: ec9a11c76136f8968040e9d63f81f773826f46d6 +Signed-off-by: Kamil Dudka +--- + src/help.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/help.c b/src/help.c +index 9591008..db3275e 100644 +--- a/src/help.c ++++ b/src/help.c +@@ -247,7 +247,6 @@ void do_help(void) + inhelp = FALSE; + + curs_set(0); +- refresh_needed = TRUE; + + if (ISSET(NO_HELP)) { + currmenu = oldmenu; +@@ -262,7 +261,10 @@ void do_help(void) + browser_refresh(); + else + #endif ++ { + titlebar(NULL); ++ edit_refresh(); ++ } + } + + /* Allocate space for the help text for the current menu, and concatenate +-- +2.20.1 + diff --git a/nano.spec b/nano.spec index 1674197..c1c5af7 100644 --- a/nano.spec +++ b/nano.spec @@ -1,7 +1,7 @@ Summary: A small text editor Name: nano Version: 4.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ URL: https://www.nano-editor.org Source: https://www.nano-editor.org/dist/latest/%{name}-%{version}.tar.xz @@ -17,6 +17,9 @@ BuildRequires: sed BuildRequires: texinfo Conflicts: filesystem < 3 +# refresh the edit window when exiting from the help viewer +Patch1: nano-4.3-display-refersh.patch + %description GNU nano is a small and friendly text editor. @@ -64,6 +67,9 @@ install -m 0644 ./nanorc %{buildroot}%{_sysconfdir}/nanorc %{_datadir}/nano %changelog +* Wed Nov 27 2019 Kamil Dudka - 4.3-3 +- refresh the edit window when exiting from the help viewer + * Thu Jul 25 2019 Fedora Release Engineering - 4.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild