Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
d12fdda1
Commit
d12fdda1
authored
9 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: replace a three-case switch with an if and an else
parent
3930a697
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/winio.c
+2
-7
src/winio.c
with
2 additions
and
7 deletions
+2
-7
src/winio.c
View file @
d12fdda1
...
...
@@ -347,19 +347,14 @@ int parse_kbinput(WINDOW *win)
while
(
kbinput
==
NULL
)
kbinput
=
get_input
(
win
,
1
);
switch
(
*
kbinput
)
{
case
ERR
:
break
;
case
NANO_CONTROL_3
:
if
(
*
kbinput
==
NANO_CONTROL_3
)
{
/* Increment the escape counter. */
escapes
++
;
/* If there are four consecutive escapes, discard three of them. */
if
(
escapes
>
3
)
escapes
=
1
;
solitary
=
(
escapes
==
1
&&
get_key_buffer_len
()
==
0
);
/* Wait for more input. */
break
;
default:
}
else
if
(
*
kbinput
!=
ERR
)
{
switch
(
escapes
)
{
case
0
:
/* One non-escape: normal input mode. */
...
...
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
Menu
Projects
Groups
Snippets
Help