From: Benno Schulenberg Date: Wed, 2 Dec 2015 19:03:34 +0000 (+0000) Subject: Accepting not just 'Uncut' but also 'Undo' for undoing a justification. X-Git-Tag: v2.5.0~15 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1fbcf0b23deed5081ca5e04166adbf459a673e6f;p=nano.git Accepting not just 'Uncut' but also 'Undo' for undoing a justification. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5468 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 36470002..e59f8719 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * doc/syntax/python.nanorc: Don't colour triple quotes by themselves. * doc/syntax/python.nanorc: Treat backslashed quotes properly, and don't colour triple-quoted strings in two manners. + * src/text.c (do_justify): Accept not just the Uncut keystroke but + also the Undo keystroke for undoing a justification. 2015-12-02 Arturo Borrero Gonzalez * doc/syntax/nftables.nanorc: New file; syntax colouring for nftables. diff --git a/src/text.c b/src/text.c index ba6bc645..96998532 100644 --- a/src/text.c +++ b/src/text.c @@ -2256,7 +2256,7 @@ void do_justify(bool full_justify) func = func_from_key(&kbinput); - if (func == do_uncut_text) { + if (func == do_uncut_text || func == do_undo) { /* Splice the justify buffer back into the file, but only if we * actually justified something. */ if (first_par_line != NULL) { @@ -2307,7 +2307,8 @@ void do_justify(bool full_justify) edit_refresh_needed = TRUE; } } else { - unget_kbinput(kbinput, meta_key, func_key); + if (func != do_undo) + unget_kbinput(kbinput, meta_key, func_key); /* Blow away the text in the justify buffer. */ free_filestruct(jusbuffer);