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
6dd308d0
Commit
6dd308d0
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
prompt: recognize Yes/No/All in English when the locale gives no match
parent
4872f42c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/prompt.c
+9
-0
src/prompt.c
with
9 additions
and
0 deletions
+9
-0
src/prompt.c
View file @
6dd308d0
...
...
@@ -716,12 +716,21 @@ int do_yesno_prompt(bool all, const char *msg)
kbinput
=
get_kbinput
(
bottomwin
,
!
all
);
/* See if the pressed key is in the Yes, No, or All strings. */
#ifdef ENABLE_NLS
if
(
strchr
(
yesstr
,
kbinput
)
!=
NULL
)
response
=
1
;
else
if
(
strchr
(
nostr
,
kbinput
)
!=
NULL
)
response
=
0
;
else
if
(
all
&&
strchr
(
allstr
,
kbinput
)
!=
NULL
)
response
=
2
;
else
#endif
if
(
strchr
(
"Yy"
,
kbinput
)
!=
NULL
)
response
=
1
;
else
if
(
strchr
(
"Nn"
,
kbinput
)
!=
NULL
)
response
=
0
;
else
if
(
all
&&
strchr
(
"Aa"
,
kbinput
)
!=
NULL
)
response
=
2
;
else
if
(
func_from_key
(
&
kbinput
)
==
do_cancel
)
response
=
-
1
;
#ifdef ENABLE_MOUSE
...
...
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