Skip to content

Commit

Permalink
(GH-853) Prompt for choice split
Browse files Browse the repository at this point in the history
Do not remove empty entries in the case of prompt for choice, which is
determining if a string contains `&` so it can build the labels
properly.

This is a partial reversion of what was introduced by 401335b.
  • Loading branch information
ferventcoder committed Aug 6, 2016
1 parent 224378d commit 282f276
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ public override void WriteWarningLine(string message)
private static string[] get_hotkey_and_label(string input)
{
var result = new[] { String.Empty, String.Empty };
string[] fragments = input.Split(new char[] {'&'}, StringSplitOptions.RemoveEmptyEntries);
//Do not use StringSplitOptions.RemoveEmptyEntries, it causes issues here
string[] fragments = input.Split('&');
if (fragments.Length == 2)
{
if (fragments[1].Length > 0) result[0] = fragments[1][0].to_string().ToUpper(CultureInfo.CurrentCulture);
Expand Down

0 comments on commit 282f276

Please sign in to comment.