tweaks: combine two ifs into one
parent
71daa1ef6b
commit
0d0d011579
16
src/nano.c
16
src/nano.c
|
@ -1549,16 +1549,14 @@ void do_input(void)
|
||||||
|
|
||||||
/* If we have a command, or if there aren't any other key codes waiting,
|
/* If we have a command, or if there aren't any other key codes waiting,
|
||||||
* it's time to insert the gathered bytes into the current buffer. */
|
* it's time to insert the gathered bytes into the current buffer. */
|
||||||
if (shortcut || get_key_buffer_len() == 0) {
|
if ((shortcut || get_key_buffer_len() == 0) && puddle != NULL) {
|
||||||
if (puddle != NULL) {
|
puddle[depth] = '\0';
|
||||||
puddle[depth] = '\0';
|
|
||||||
inject(puddle, depth);
|
|
||||||
|
|
||||||
/* Empty the little input buffer. */
|
inject(puddle, depth);
|
||||||
free(puddle);
|
|
||||||
puddle = NULL;
|
free(puddle);
|
||||||
depth = 0;
|
puddle = NULL;
|
||||||
}
|
depth = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shortcut == NULL) {
|
if (shortcut == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue