Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
e666f8c5
Commit
e666f8c5
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
input: write a few ifs more compactly
parent
05238f31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/winio.c
+5
-10
src/winio.c
with
5 additions
and
10 deletions
+5
-10
src/winio.c
View file @
e666f8c5
...
...
@@ -250,21 +250,16 @@ void unget_kbinput(int kbinput, bool metakey, bool funckey)
/* Try to read input_len characters from the keystroke buffer. If the
* keystroke buffer is empty and win isn't NULL, try to read in more
* characters from win and add them to the keystroke buffer before doing
* anything else. If the keystroke buffer is empty and win is NULL,
* return NULL. */
* anything else. If the keystroke buffer is (still) empty, return NULL. */
int
*
get_input
(
WINDOW
*
win
,
size_t
input_len
)
{
int
*
input
;
if
(
key_buffer_len
==
0
)
{
if
(
win
!=
NULL
)
{
get_key_buffer
(
win
);
if
(
key_buffer_len
==
0
&&
win
!=
NULL
)
get_key_buffer
(
win
);
if
(
key_buffer_len
==
0
)
return
NULL
;
}
else
return
NULL
;
}
if
(
key_buffer_len
==
0
)
return
NULL
;
/* If input_len is greater than the length of the keystroke buffer,
* only read the number of characters in the keystroke buffer. */
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment