summaryrefslogtreecommitdiff
blob: 52112bab7235f85cc25f17d7251647ce4c93f94a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From a98f48b4e82db7d30aa04925fb28344f5bce8c7c Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 22 Jun 2020 14:00:23 +0200
Subject: [PATCH] build: fix compilation for --enable-tiny --enable-color
 --enable-nanorc

Backported to v4.9.3
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
---
 src/nano.c | 2 +-
 src/text.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/nano.c b/src/nano.c
index be80a073..3ac81ba4 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1079,7 +1079,7 @@ RETSIGTYPE do_continue(int signal)
 	ungetch(KEY_FLUSH);
 }
 
-#if !defined(NANO_TINY) || defined(ENABLE_SPELLER)
+#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
 /* Block or unblock the SIGWINCH signal, depending on the blockit parameter. */
 void block_sigwinch(bool blockit)
 {
diff --git a/src/text.c b/src/text.c
index c7690fd0..32727946 100644
--- a/src/text.c
+++ b/src/text.c
@@ -2032,10 +2032,10 @@ bool replace_buffer(const char *filename, undo_type action, const char *operatio
 
 	/* Cut either the marked region or the whole buffer. */
 	add_undo(action, NULL);
-#endif
 	do_snip(FALSE, openfile->mark, openfile->mark == NULL, FALSE);
-#ifndef NANO_TINY
 	update_undo(action);
+#else
+	do_snip(FALSE, TRUE, FALSE, FALSE);
 #endif
 
 	/* Discard what was cut. */
-- 
2.28.0