Replacing the old get_shortcut() wrapper with the new func_from_key().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
f729c6dae5
commit
97a5d1270a
|
@ -1,3 +1,7 @@
|
|||
2014-08-29 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/text.c (do_justify): Replace the old get_shortcut() wrapper
|
||||
with the new func_from_key().
|
||||
|
||||
2014-08-10 Benno Schulenberg <bensberg@justemail.net>
|
||||
* doc/texinfo/nano.texi: Improve some wordings and formatting.
|
||||
|
||||
|
|
11
src/text.c
11
src/text.c
|
@ -1883,6 +1883,10 @@ void do_justify(bool full_justify)
|
|||
bool filebot_inpar = FALSE;
|
||||
/* Whether the text at filebot is part of the current
|
||||
* paragraph. */
|
||||
int kbinput;
|
||||
/* The first keystroke after a justification. */
|
||||
functionptrtype func;
|
||||
/* The function associated with that keystroke. */
|
||||
|
||||
/* We save these variables to be restored if the user
|
||||
* unjustifies. */
|
||||
|
@ -1897,9 +1901,6 @@ void do_justify(bool full_justify)
|
|||
#endif
|
||||
bool modified_save = openfile->modified;
|
||||
|
||||
int kbinput;
|
||||
const sc *s;
|
||||
|
||||
/* Move to the beginning of the current line, so that justifying at
|
||||
* the end of the last line of the file, if that line isn't blank,
|
||||
* will work the first time through. */
|
||||
|
@ -2218,9 +2219,9 @@ void do_justify(bool full_justify)
|
|||
/* Now get a keystroke and see if it's unjustify. If not, put back
|
||||
* the keystroke and return. */
|
||||
kbinput = do_input(FALSE);
|
||||
s = get_shortcut(&kbinput);
|
||||
func = func_from_key(&kbinput);
|
||||
|
||||
if (s && s->scfunc == do_uncut_text) {
|
||||
if (func == do_uncut_text) {
|
||||
/* Splice the justify buffer back into the file, but only if we
|
||||
* actually justified something. */
|
||||
if (first_par_line != NULL) {
|
||||
|
|
Loading…
Reference in New Issue