Skip to content

Commit 486388c

Browse files
authored
Fix some typos in this repository (#3547)
1 parent 659c828 commit 486388c

19 files changed

+40
-40
lines changed

PSReadLine/Changes.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
### [2.2.5] - 2022-05-03
88

9-
- Re-package the `2.2.4-beta1` version to `2.2.5` as an offical servicing release.
9+
- Re-package the `2.2.4-beta1` version to `2.2.5` as an official servicing release.
1010

1111
[2.2.5]: https://github.com/PowerShell/PSReadLine/compare/v2.2.4-beta1...v2.2.5
1212

@@ -385,7 +385,7 @@ Bug fixes:
385385
* Fix InvokePrompt when the prompt is > 1 line.
386386
* Fix YankToPercent off by 1 error.
387387
* Fix error reported when running in container.
388-
* Catch and ignore execptions in InvokePrompt (#583)
388+
* Catch and ignore exceptions in InvokePrompt (#583)
389389
* Get new completions on 2nd tab if 1st had 1 result (#238)
390390
* Tab replaced with 4 spaces during paste (#144)
391391
* Fix rendering after buffer resize (#418)
@@ -670,7 +670,7 @@ New features:
670670
* Add ETW event source for demo mode, key logger, macro recorder etc.
671671
* Undo/redo
672672
* Get-PSReadLineOption cmdlet
673-
* Make specifying key handlers for builtins simpler
673+
* Make specifying key handlers for built-ins simpler
674674
* Current un-entered line is saved and recalled when cycling through history
675675
* Support syntax coloring of member names
676676

PSReadLine/Cmdlets.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ public class SetPSReadLineKeyHandlerCommand : ChangePSReadLineKeyHandlerCommandB
853853
public string BriefDescription { get; set; }
854854

855855
[Parameter(ParameterSetName = "ScriptBlock")]
856-
[Alias("LongDescription")] // Alias to stay comptible with previous releases
856+
[Alias("LongDescription")] // Alias to stay compatible with previous releases
857857
public string Description { get; set; }
858858

859859
private const string FunctionParameter = "Function";

PSReadLine/Completion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ private void MenuCompleteImpl(Menu menu, CommandCompletion completions)
10791079
processingKeys = false;
10801080
prependNextKey = true;
10811081

1082-
// without this branch experience doesnt look naturally
1082+
// without this branch experience doesn't look naturally
10831083
if (_dispatchTable.TryGetValue(nextKey, out var handler) &&
10841084
(
10851085
handler.Action == CopyOrCancelLine ||

PSReadLine/DisplayBlockBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected void MoveCursorToStartDrawingPosition(IConsole console)
4949
{
5050
// Calculate the coord to place the cursor at the end of current input.
5151
Point bufferEndPoint = Singleton.ConvertOffsetToPoint(Singleton._buffer.Length);
52-
// Top must be initialized before any possible adjustion by 'AdjustForPossibleScroll' or 'AdjustForActualScroll',
52+
// Top must be initialized before any possible adjustment by 'AdjustForPossibleScroll' or 'AdjustForActualScroll',
5353
// otherwise its value would be corrupted and cause rendering issue.
5454
Top = bufferEndPoint.Y + 1;
5555

PSReadLine/Keys.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ internal static void TryGetCharFromConsoleKey(ConsoleKeyInfo key, ref char resul
139139
// get corresponding scan code
140140
uint scanCode = MapVirtualKey(virtualKey, 0x0 /*MAPVK_VK_TO_VSC*/);
141141

142-
// get corresponding character - maybe be 0, 1 or 2 in length (diacriticals)
142+
// get corresponding character - may be 0, 1 or 2 in length (diacriticals)
143143
var chars = toUnicodeBuffer.Value;
144144
var flags = 0u; /* If bit 0 is set, a menu is active. */
145145
var osVersion = Environment.OSVersion.Version;
@@ -238,7 +238,7 @@ void AppendPart(string str)
238238
{
239239
// A heuristic to check for dead keys --
240240
// We got an 'OemXXX' ConsoleKey, '\0' key char, and no 'Ctrl' modifier. It's very likely generated by a dead key.
241-
// We check for 'Ctrl' modifier because it's easy to generate '\0' KeyChar and 'OemXXX' by combinding 'Ctrl' with
241+
// We check for 'Ctrl' modifier because it's easy to generate '\0' KeyChar and 'OemXXX' by combining 'Ctrl' with
242242
// another special key, such as 'Ctrl+?' and 'Ctrl+;'.
243243
isDeadKey = (c == '\0') && (consoleKey >= ConsoleKey.Oem1 && consoleKey <= ConsoleKey.Oem102) && !isCtrl;
244244

PSReadLine/Movement.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -527,16 +527,16 @@ private static char TryGetArgAsChar(object arg)
527527
}
528528

529529
/// <summary>
530-
/// Read a character and search forward for the next occurence of that character.
530+
/// Read a character and search forward for the next occurrence of that character.
531531
/// If an argument is specified, search forward (or backward if negative) for the
532-
/// nth occurence.
532+
/// nth occurrence.
533533
/// </summary>
534534
public static void CharacterSearch(ConsoleKeyInfo? key = null, object arg = null)
535535
{
536-
int occurence = arg as int? ?? 1;
537-
if (occurence < 0)
536+
int occurrence = arg as int? ?? 1;
537+
if (occurrence < 0)
538538
{
539-
CharacterSearchBackward(key, -occurence);
539+
CharacterSearchBackward(key, -occurrence);
540540
return;
541541
}
542542

@@ -550,31 +550,31 @@ public static void CharacterSearch(ConsoleKeyInfo? key = null, object arg = null
550550
{
551551
if (_singleton._buffer[i] == toFind)
552552
{
553-
occurence -= 1;
554-
if (occurence == 0)
553+
occurrence -= 1;
554+
if (occurrence == 0)
555555
{
556556
_singleton.MoveCursor(i);
557557
break;
558558
}
559559
}
560560
}
561-
if (occurence > 0)
561+
if (occurrence > 0)
562562
{
563563
Ding();
564564
}
565565
}
566566

567567
/// <summary>
568-
/// Read a character and search backward for the next occurence of that character.
568+
/// Read a character and search backward for the next occurrence of that character.
569569
/// If an argument is specified, search backward (or forward if negative) for the
570-
/// nth occurence.
570+
/// nth occurrence.
571571
/// </summary>
572572
public static void CharacterSearchBackward(ConsoleKeyInfo? key = null, object arg = null)
573573
{
574-
int occurence = arg as int? ?? 1;
575-
if (occurence < 0)
574+
int occurrence = arg as int? ?? 1;
575+
if (occurrence < 0)
576576
{
577-
CharacterSearch(key, -occurence);
577+
CharacterSearch(key, -occurrence);
578578
return;
579579
}
580580

@@ -588,8 +588,8 @@ public static void CharacterSearchBackward(ConsoleKeyInfo? key = null, object ar
588588
{
589589
if (_singleton._buffer[i] == toFind)
590590
{
591-
occurence -= 1;
592-
if (occurence == 0)
591+
occurrence -= 1;
592+
if (occurrence == 0)
593593
{
594594
_singleton.MoveCursor(i);
595595
return;

PSReadLine/PSReadLineResources.Designer.cs

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

PSReadLine/PSReadLineResources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,10 @@
292292
<value>Move the text from the cursor to the start of the current or previous whitespace delimited word to the kill ring</value>
293293
</data>
294294
<data name="CharacterSearchBackwardDescription" xml:space="preserve">
295-
<value>Read a character and move the cursor to the previous occurence of that character</value>
295+
<value>Read a character and move the cursor to the previous occurrence of that character</value>
296296
</data>
297297
<data name="CharacterSearchDescription" xml:space="preserve">
298-
<value>Read a character and move the cursor to the next occurence of that character</value>
298+
<value>Read a character and move the cursor to the next occurrence of that character</value>
299299
</data>
300300
<data name="DigitArgumentDescription" xml:space="preserve">
301301
<value>Start or accumulate a numeric argument to other functions</value>

PSReadLine/Prediction.Views.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ internal override void RenderSuggestion(List<StringBuilder> consoleBufferLines,
742742
// The whole suggestion text cannot fit in the console buffer without having part of it scrolled up off the buffer.
743743
// We truncate the end part and append ellipsis.
744744

745-
// We need to truncate 4 buffer cells ealier (just to be safe), so we have enough room to add the ellipsis.
745+
// We need to truncate 4 buffer cells earlier (just to be safe), so we have enough room to add the ellipsis.
746746
int lenFromEnd = SubstringLengthByCellsFromEnd(_suggestionText, length - 1, countOfCells: 4);
747747
totalLength = length - lenFromEnd;
748748
if (totalLength <= inputLength)

PSReadLine/ReadLine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ private void Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
777777
private void DelayedOneTimeInitialize()
778778
{
779779
// Delayed initialization is needed so that options can be set
780-
// after the constuctor but have an affect before the user starts
780+
// after the constructor but have an affect before the user starts
781781
// editing their first command line. For example, if the user
782782
// specifies a custom history save file, we don't want to try reading
783783
// from the default one.

0 commit comments

Comments
 (0)