Skip to content

Commit caeb488

Browse files
author
Lars Wendler
committed
app-editors/nano: Revbump to fix justify keystroke crash
Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Lars Wendler <[email protected]>
1 parent b2f8633 commit caeb488

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 2d05ce37c60a157760f386badc387e2d53b2fa75 Mon Sep 17 00:00:00 2001
2+
From: Benno Schulenberg <[email protected]>
3+
Date: Thu, 5 Mar 2020 16:57:16 +0100
4+
Subject: [PATCH] justify: do not crash when the user attempts to justify an
5+
empty region
6+
7+
This fixes https://savannah.gnu.org/bugs/?57959.
8+
9+
Bug existed since version 4.0, since the justifying
10+
of a marked region was introduced.
11+
---
12+
src/text.c | 6 ++++++
13+
1 file changed, 6 insertions(+)
14+
15+
diff --git a/src/text.c b/src/text.c
16+
index 957938f4..4fe7eb96 100644
17+
--- a/src/text.c
18+
+++ b/src/text.c
19+
@@ -1930,6 +1930,12 @@ void do_justify(bool full_justify)
20+
get_region((const linestruct **)&first_par_line, &top_x,
21+
(const linestruct **)&last_par_line, &bot_x, &right_side_up);
22+
23+
+ /* When the marked region is empty, do nothing. */
24+
+ if (first_par_line == last_par_line && top_x == bot_x) {
25+
+ statusline(NOTICE, _("Nothing changed"));
26+
+ return;
27+
+ }
28+
+
29+
/* Save the starting point of the marked region. */
30+
was_top_lineno = first_par_line->lineno;
31+
was_top_x = top_x;
32+
--
33+
2.25.2
34+

app-editors/nano/nano-4.6.ebuild app-editors/nano/nano-4.6-r1.ebuild

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ BDEPEND="
3232
nls? ( sys-devel/gettext )
3333
virtual/pkgconfig
3434
"
35+
PATCHES=( "${FILESDIR}/${PN}-4.8-justify_keystroke_crash_fix.patch" )
3536
src_prepare() {
3637
default
3738
if [[ ${PV} == "9999" ]] ; then

0 commit comments

Comments
 (0)