Skip to content

Commit bbb729c

Browse files
authored
Move prediction functions to a new group (#2211)
1 parent 0de6368 commit bbb729c

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

PSReadLine/KeyBindings.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public enum KeyHandlerGroup
2626
History,
2727
/// <summary>Completion functions</summary>
2828
Completion,
29+
/// <summary>Prediction functions</summary>
30+
Prediction,
2931
/// <summary>Miscellaneous functions</summary>
3032
Miscellaneous,
3133
/// <summary>Selection functions</summary>
@@ -89,6 +91,8 @@ public static string GetGroupingDescription(KeyHandlerGroup grouping)
8991
return PSReadLineResources.HistoryGrouping;
9092
case KeyHandlerGroup.Completion:
9193
return PSReadLineResources.CompletionGrouping;
94+
case KeyHandlerGroup.Prediction:
95+
return PSReadLineResources.PredictionGrouping;
9296
case KeyHandlerGroup.Miscellaneous:
9397
return PSReadLineResources.MiscellaneousGrouping;
9498
case KeyHandlerGroup.Selection:
@@ -545,6 +549,13 @@ public static KeyHandlerGroup GetDisplayGrouping(string function)
545549
case nameof(ViTabCompletePrevious):
546550
return KeyHandlerGroup.Completion;
547551

552+
case nameof(AcceptSuggestion):
553+
case nameof(AcceptNextSuggestionWord):
554+
case nameof(NextSuggestion):
555+
case nameof(PreviousSuggestion):
556+
case nameof(SwitchPredictionView):
557+
return KeyHandlerGroup.Prediction;
558+
548559
case nameof(CaptureScreen):
549560
case nameof(ClearScreen):
550561
case nameof(DigitArgument):
@@ -563,11 +574,6 @@ public static KeyHandlerGroup GetDisplayGrouping(string function)
563574
case nameof(ViExit):
564575
case nameof(ViInsertMode):
565576
case nameof(WhatIsKey):
566-
case nameof(AcceptSuggestion):
567-
case nameof(AcceptNextSuggestionWord):
568-
case nameof(NextSuggestion):
569-
case nameof(PreviousSuggestion):
570-
case nameof(SwitchPredictionView):
571577
case nameof(ShowCommandHelp):
572578
case nameof(ShowParameterHelp):
573579
return KeyHandlerGroup.Miscellaneous;

PSReadLine/PSReadLineResources.Designer.cs

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PSReadLine/PSReadLineResources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,9 @@ Or not saving history with:
790790
<data name="CompletionGrouping" xml:space="preserve">
791791
<value>Completion functions</value>
792792
</data>
793+
<data name="PredictionGrouping" xml:space="preserve">
794+
<value>Prediction functions</value>
795+
</data>
793796
<data name="MiscellaneousGrouping" xml:space="preserve">
794797
<value>Miscellaneous functions</value>
795798
</data>

0 commit comments

Comments
 (0)