Skip to content

Commit

Permalink
Move prediction functions to a new group (#2211)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxian-dbw committed Feb 12, 2021
1 parent 0de6368 commit bbb729c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
16 changes: 11 additions & 5 deletions PSReadLine/KeyBindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public enum KeyHandlerGroup
History,
/// <summary>Completion functions</summary>
Completion,
/// <summary>Prediction functions</summary>
Prediction,
/// <summary>Miscellaneous functions</summary>
Miscellaneous,
/// <summary>Selection functions</summary>
Expand Down Expand Up @@ -89,6 +91,8 @@ public static string GetGroupingDescription(KeyHandlerGroup grouping)
return PSReadLineResources.HistoryGrouping;
case KeyHandlerGroup.Completion:
return PSReadLineResources.CompletionGrouping;
case KeyHandlerGroup.Prediction:
return PSReadLineResources.PredictionGrouping;
case KeyHandlerGroup.Miscellaneous:
return PSReadLineResources.MiscellaneousGrouping;
case KeyHandlerGroup.Selection:
Expand Down Expand Up @@ -545,6 +549,13 @@ public static KeyHandlerGroup GetDisplayGrouping(string function)
case nameof(ViTabCompletePrevious):
return KeyHandlerGroup.Completion;

case nameof(AcceptSuggestion):
case nameof(AcceptNextSuggestionWord):
case nameof(NextSuggestion):
case nameof(PreviousSuggestion):
case nameof(SwitchPredictionView):
return KeyHandlerGroup.Prediction;

case nameof(CaptureScreen):
case nameof(ClearScreen):
case nameof(DigitArgument):
Expand All @@ -563,11 +574,6 @@ public static KeyHandlerGroup GetDisplayGrouping(string function)
case nameof(ViExit):
case nameof(ViInsertMode):
case nameof(WhatIsKey):
case nameof(AcceptSuggestion):
case nameof(AcceptNextSuggestionWord):
case nameof(NextSuggestion):
case nameof(PreviousSuggestion):
case nameof(SwitchPredictionView):
case nameof(ShowCommandHelp):
case nameof(ShowParameterHelp):
return KeyHandlerGroup.Miscellaneous;
Expand Down
13 changes: 12 additions & 1 deletion PSReadLine/PSReadLineResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions PSReadLine/PSReadLineResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,9 @@ Or not saving history with:
<data name="CompletionGrouping" xml:space="preserve">
<value>Completion functions</value>
</data>
<data name="PredictionGrouping" xml:space="preserve">
<value>Prediction functions</value>
</data>
<data name="MiscellaneousGrouping" xml:space="preserve">
<value>Miscellaneous functions</value>
</data>
Expand Down

0 comments on commit bbb729c

Please sign in to comment.