commit 40e1fd37d7794ae1737b76d969b8498926e4ad62
parent f2da4663889930556a93745699b27405d5e15cf8
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 5 Dec 2015 10:16:26 +0000
Fixing compilation with --enable-tiny --enable-justify.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5479 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,6 @@
+2015-12-05 Benno Schulenberg <bensberg@justemail.net>
+ * src/text.c: Fix compilation with --enable-tiny --enable-justify.
+
2015-12-04 Benno Schulenberg <bensberg@justemail.net>
* src/proto.h: Avoid a compilation warning.
* src/color.c (reset_multis_for_id, reset_multis_before/after):
diff --git a/src/text.c b/src/text.c
@@ -2270,7 +2270,11 @@ void do_justify(bool full_justify)
func = func_from_key(&kbinput);
- if (func == do_uncut_text || func == do_undo) {
+ if (func == do_uncut_text
+#ifndef NANO_TINY
+ || func == do_undo
+#endif
+ ) {
/* Splice the justify buffer back into the file, but only if we
* actually justified something. */
if (first_par_line != NULL) {
@@ -2324,11 +2328,12 @@ void do_justify(bool full_justify)
/* Put the keystroke back into the queue. */
unget_kbinput(kbinput, meta_key, func_key);
+#ifndef NANO_TINY
/* Throw away the entire undo stack, to prevent a crash when
* the user tries to undo something in the justified text. */
discard_until(NULL);
openfile->current_undo = NULL;
-
+#endif
/* Blow away the text in the justify buffer. */
free_filestruct(jusbuffer);
jusbuffer = NULL;