Commit 40e1fd37 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Fixing compilation with --enable-tiny --enable-justify.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5479 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 10 additions and 2 deletions
+10 -2
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> 2015-12-04 Benno Schulenberg <bensberg@justemail.net>
* src/proto.h: Avoid a compilation warning. * src/proto.h: Avoid a compilation warning.
* src/color.c (reset_multis_for_id, reset_multis_before/after): * src/color.c (reset_multis_for_id, reset_multis_before/after):
......
...@@ -2270,7 +2270,11 @@ void do_justify(bool full_justify) ...@@ -2270,7 +2270,11 @@ void do_justify(bool full_justify)
func = func_from_key(&kbinput); 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 /* Splice the justify buffer back into the file, but only if we
* actually justified something. */ * actually justified something. */
if (first_par_line != NULL) { if (first_par_line != NULL) {
...@@ -2324,11 +2328,12 @@ void do_justify(bool full_justify) ...@@ -2324,11 +2328,12 @@ void do_justify(bool full_justify)
/* Put the keystroke back into the queue. */ /* Put the keystroke back into the queue. */
unget_kbinput(kbinput, meta_key, func_key); unget_kbinput(kbinput, meta_key, func_key);
#ifndef NANO_TINY
/* Throw away the entire undo stack, to prevent a crash when /* Throw away the entire undo stack, to prevent a crash when
* the user tries to undo something in the justified text. */ * the user tries to undo something in the justified text. */
discard_until(NULL); discard_until(NULL);
openfile->current_undo = NULL; openfile->current_undo = NULL;
#endif
/* Blow away the text in the justify buffer. */ /* Blow away the text in the justify buffer. */
free_filestruct(jusbuffer); free_filestruct(jusbuffer);
jusbuffer = NULL; jusbuffer = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment