mirror of
https://github.com/PowerShell/PSReadLine
synced 2026-06-08 12:12:13 +00:00
Fix some typos in this repository (#3547)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
### [2.2.5] - 2022-05-03
|
||||
|
||||
- Re-package the `2.2.4-beta1` version to `2.2.5` as an offical servicing release.
|
||||
- Re-package the `2.2.4-beta1` version to `2.2.5` as an official servicing release.
|
||||
|
||||
[2.2.5]: https://github.com/PowerShell/PSReadLine/compare/v2.2.4-beta1...v2.2.5
|
||||
|
||||
@@ -385,7 +385,7 @@ Bug fixes:
|
||||
* Fix InvokePrompt when the prompt is > 1 line.
|
||||
* Fix YankToPercent off by 1 error.
|
||||
* Fix error reported when running in container.
|
||||
* Catch and ignore execptions in InvokePrompt (#583)
|
||||
* Catch and ignore exceptions in InvokePrompt (#583)
|
||||
* Get new completions on 2nd tab if 1st had 1 result (#238)
|
||||
* Tab replaced with 4 spaces during paste (#144)
|
||||
* Fix rendering after buffer resize (#418)
|
||||
@@ -670,7 +670,7 @@ New features:
|
||||
* Add ETW event source for demo mode, key logger, macro recorder etc.
|
||||
* Undo/redo
|
||||
* Get-PSReadLineOption cmdlet
|
||||
* Make specifying key handlers for builtins simpler
|
||||
* Make specifying key handlers for built-ins simpler
|
||||
* Current un-entered line is saved and recalled when cycling through history
|
||||
* Support syntax coloring of member names
|
||||
|
||||
|
||||
@@ -853,7 +853,7 @@ namespace Microsoft.PowerShell
|
||||
public string BriefDescription { get; set; }
|
||||
|
||||
[Parameter(ParameterSetName = "ScriptBlock")]
|
||||
[Alias("LongDescription")] // Alias to stay comptible with previous releases
|
||||
[Alias("LongDescription")] // Alias to stay compatible with previous releases
|
||||
public string Description { get; set; }
|
||||
|
||||
private const string FunctionParameter = "Function";
|
||||
|
||||
@@ -1079,7 +1079,7 @@ namespace Microsoft.PowerShell
|
||||
processingKeys = false;
|
||||
prependNextKey = true;
|
||||
|
||||
// without this branch experience doesnt look naturally
|
||||
// without this branch experience doesn't look naturally
|
||||
if (_dispatchTable.TryGetValue(nextKey, out var handler) &&
|
||||
(
|
||||
handler.Action == CopyOrCancelLine ||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
// Calculate the coord to place the cursor at the end of current input.
|
||||
Point bufferEndPoint = Singleton.ConvertOffsetToPoint(Singleton._buffer.Length);
|
||||
// Top must be initialized before any possible adjustion by 'AdjustForPossibleScroll' or 'AdjustForActualScroll',
|
||||
// Top must be initialized before any possible adjustment by 'AdjustForPossibleScroll' or 'AdjustForActualScroll',
|
||||
// otherwise its value would be corrupted and cause rendering issue.
|
||||
Top = bufferEndPoint.Y + 1;
|
||||
|
||||
|
||||
+2
-2
@@ -139,7 +139,7 @@ namespace Microsoft.PowerShell
|
||||
// get corresponding scan code
|
||||
uint scanCode = MapVirtualKey(virtualKey, 0x0 /*MAPVK_VK_TO_VSC*/);
|
||||
|
||||
// get corresponding character - maybe be 0, 1 or 2 in length (diacriticals)
|
||||
// get corresponding character - may be 0, 1 or 2 in length (diacriticals)
|
||||
var chars = toUnicodeBuffer.Value;
|
||||
var flags = 0u; /* If bit 0 is set, a menu is active. */
|
||||
var osVersion = Environment.OSVersion.Version;
|
||||
@@ -238,7 +238,7 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
// A heuristic to check for dead keys --
|
||||
// We got an 'OemXXX' ConsoleKey, '\0' key char, and no 'Ctrl' modifier. It's very likely generated by a dead key.
|
||||
// We check for 'Ctrl' modifier because it's easy to generate '\0' KeyChar and 'OemXXX' by combinding 'Ctrl' with
|
||||
// We check for 'Ctrl' modifier because it's easy to generate '\0' KeyChar and 'OemXXX' by combining 'Ctrl' with
|
||||
// another special key, such as 'Ctrl+?' and 'Ctrl+;'.
|
||||
isDeadKey = (c == '\0') && (consoleKey >= ConsoleKey.Oem1 && consoleKey <= ConsoleKey.Oem102) && !isCtrl;
|
||||
|
||||
|
||||
+15
-15
@@ -527,16 +527,16 @@ namespace Microsoft.PowerShell
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read a character and search forward for the next occurence of that character.
|
||||
/// Read a character and search forward for the next occurrence of that character.
|
||||
/// If an argument is specified, search forward (or backward if negative) for the
|
||||
/// nth occurence.
|
||||
/// nth occurrence.
|
||||
/// </summary>
|
||||
public static void CharacterSearch(ConsoleKeyInfo? key = null, object arg = null)
|
||||
{
|
||||
int occurence = arg as int? ?? 1;
|
||||
if (occurence < 0)
|
||||
int occurrence = arg as int? ?? 1;
|
||||
if (occurrence < 0)
|
||||
{
|
||||
CharacterSearchBackward(key, -occurence);
|
||||
CharacterSearchBackward(key, -occurrence);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -550,31 +550,31 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
if (_singleton._buffer[i] == toFind)
|
||||
{
|
||||
occurence -= 1;
|
||||
if (occurence == 0)
|
||||
occurrence -= 1;
|
||||
if (occurrence == 0)
|
||||
{
|
||||
_singleton.MoveCursor(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (occurence > 0)
|
||||
if (occurrence > 0)
|
||||
{
|
||||
Ding();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read a character and search backward for the next occurence of that character.
|
||||
/// Read a character and search backward for the next occurrence of that character.
|
||||
/// If an argument is specified, search backward (or forward if negative) for the
|
||||
/// nth occurence.
|
||||
/// nth occurrence.
|
||||
/// </summary>
|
||||
public static void CharacterSearchBackward(ConsoleKeyInfo? key = null, object arg = null)
|
||||
{
|
||||
int occurence = arg as int? ?? 1;
|
||||
if (occurence < 0)
|
||||
int occurrence = arg as int? ?? 1;
|
||||
if (occurrence < 0)
|
||||
{
|
||||
CharacterSearch(key, -occurence);
|
||||
CharacterSearch(key, -occurrence);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -588,8 +588,8 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
if (_singleton._buffer[i] == toFind)
|
||||
{
|
||||
occurence -= 1;
|
||||
if (occurence == 0)
|
||||
occurrence -= 1;
|
||||
if (occurrence == 0)
|
||||
{
|
||||
_singleton.MoveCursor(i);
|
||||
return;
|
||||
|
||||
+2
-2
@@ -241,7 +241,7 @@ namespace Microsoft.PowerShell.PSReadLine {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Read a character and move the cursor to the previous occurence of that character.
|
||||
/// Looks up a localized string similar to Read a character and move the cursor to the previous occurrence of that character.
|
||||
/// </summary>
|
||||
internal static string CharacterSearchBackwardDescription {
|
||||
get {
|
||||
@@ -250,7 +250,7 @@ namespace Microsoft.PowerShell.PSReadLine {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Read a character and move the cursor to the next occurence of that character.
|
||||
/// Looks up a localized string similar to Read a character and move the cursor to the next occurrence of that character.
|
||||
/// </summary>
|
||||
internal static string CharacterSearchDescription {
|
||||
get {
|
||||
|
||||
@@ -292,10 +292,10 @@
|
||||
<value>Move the text from the cursor to the start of the current or previous whitespace delimited word to the kill ring</value>
|
||||
</data>
|
||||
<data name="CharacterSearchBackwardDescription" xml:space="preserve">
|
||||
<value>Read a character and move the cursor to the previous occurence of that character</value>
|
||||
<value>Read a character and move the cursor to the previous occurrence of that character</value>
|
||||
</data>
|
||||
<data name="CharacterSearchDescription" xml:space="preserve">
|
||||
<value>Read a character and move the cursor to the next occurence of that character</value>
|
||||
<value>Read a character and move the cursor to the next occurrence of that character</value>
|
||||
</data>
|
||||
<data name="DigitArgumentDescription" xml:space="preserve">
|
||||
<value>Start or accumulate a numeric argument to other functions</value>
|
||||
|
||||
@@ -742,7 +742,7 @@ namespace Microsoft.PowerShell
|
||||
// The whole suggestion text cannot fit in the console buffer without having part of it scrolled up off the buffer.
|
||||
// We truncate the end part and append ellipsis.
|
||||
|
||||
// We need to truncate 4 buffer cells ealier (just to be safe), so we have enough room to add the ellipsis.
|
||||
// We need to truncate 4 buffer cells earlier (just to be safe), so we have enough room to add the ellipsis.
|
||||
int lenFromEnd = SubstringLengthByCellsFromEnd(_suggestionText, length - 1, countOfCells: 4);
|
||||
totalLength = length - lenFromEnd;
|
||||
if (totalLength <= inputLength)
|
||||
|
||||
@@ -777,7 +777,7 @@ namespace Microsoft.PowerShell
|
||||
private void DelayedOneTimeInitialize()
|
||||
{
|
||||
// Delayed initialization is needed so that options can be set
|
||||
// after the constuctor but have an affect before the user starts
|
||||
// after the constructor but have an affect before the user starts
|
||||
// editing their first command line. For example, if the user
|
||||
// specifies a custom history save file, we don't want to try reading
|
||||
// from the default one.
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Microsoft.PowerShell
|
||||
(c >= 0xff00 && c <= 0xff60) || /* Fullwidth Forms */
|
||||
(c >= 0xffe0 && c <= 0xffe6));
|
||||
// We can ignore these ranges because .Net strings use surrogate pairs
|
||||
// for this range and we do not handle surrogage pairs.
|
||||
// for this range and we do not handle surrogate pairs.
|
||||
// (c >= 0x20000 && c <= 0x2fffd) ||
|
||||
// (c >= 0x30000 && c <= 0x3fffd)
|
||||
return 1 + (isWide ? 1 : 0);
|
||||
|
||||
@@ -1162,7 +1162,7 @@ namespace Microsoft.PowerShell
|
||||
_previousRender.initialY = _initialY;
|
||||
}
|
||||
|
||||
// While waiting to render, and a keybinding has occured that is moving the cursor,
|
||||
// While waiting to render, and a keybinding has occurred that is moving the cursor,
|
||||
// converting offset to point could potentially result in an invalid screen position,
|
||||
// but the insertion point should reflect the move.
|
||||
_current = newCursor;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Microsoft.PowerShell
|
||||
/// <param name="arg"></param>
|
||||
/// <param name="moveCursorToEndWhenUndoDelete">
|
||||
/// Use 'false' as the default value because this method is used a lot by VI operations,
|
||||
/// and for VI opeartions, we do NOT want to move the cursor to the end when undoing a
|
||||
/// and for VI operations, we do NOT want to move the cursor to the end when undoing a
|
||||
/// deletion.
|
||||
/// </param>
|
||||
private void RemoveTextToViRegister(
|
||||
|
||||
@@ -57,7 +57,7 @@ if ($Clean) {
|
||||
Import-Module "$PSScriptRoot/tools/helper.psm1"
|
||||
|
||||
if ($Bootstrap) {
|
||||
Write-Log "Validate and install missing prerequisits for building ..."
|
||||
Write-Log "Validate and install missing prerequisites for building ..."
|
||||
|
||||
Install-Dotnet
|
||||
if (-not (Get-Module -Name InvokeBuild -ListAvailable)) {
|
||||
|
||||
@@ -975,7 +975,7 @@ namespace Test
|
||||
using var disp = SetPrediction(PredictionSource.History, PredictionViewStyle.ListView);
|
||||
|
||||
_console.Clear();
|
||||
SetHistory("Get-Mocha -AddMilk -AddSugur -ExtraCup", "Get-MoreBook -Kind Fiction -FlatCover");
|
||||
SetHistory("Get-Mocha -AddMilk -AddSugar -ExtraCup", "Get-MoreBook -Kind Fiction -FlatCover");
|
||||
|
||||
Test("Get-Module", Keys(
|
||||
"Get-Mo",
|
||||
@@ -994,8 +994,8 @@ namespace Test
|
||||
TokenClassification.ListPrediction, '>',
|
||||
TokenClassification.None, ' ',
|
||||
emphasisColors, "Get-Mo",
|
||||
TokenClassification.None, "cha -AddMilk -AddSugur -ExtraCup",
|
||||
TokenClassification.None, new string(' ', listWidth - 49), // 49 is the length of '> Get-Mocha -AddMilk -AddSugur -ExtraCup' plus '[History]'.
|
||||
TokenClassification.None, "cha -AddMilk -AddSugar -ExtraCup",
|
||||
TokenClassification.None, new string(' ', listWidth - 49), // 49 is the length of '> Get-Mocha -AddMilk -AddSugar -ExtraCup' plus '[History]'.
|
||||
TokenClassification.None, '[',
|
||||
TokenClassification.ListPrediction, "History",
|
||||
TokenClassification.None, ']')),
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ namespace Test
|
||||
_bufferWidth = _windowWidth = width;
|
||||
_bufferHeight = _windowHeight = height;
|
||||
|
||||
// Use a big enough buffer when we are mimicing scrolling.
|
||||
// Use a big enough buffer when we are mimicking scrolling.
|
||||
int bufferSize = mimicScrolling ? BufferWidth * 1000 : BufferWidth * BufferHeight;
|
||||
buffer = new CHAR_INFO[bufferSize];
|
||||
ClearBuffer();
|
||||
|
||||
+1
-1
@@ -307,7 +307,7 @@ namespace Test
|
||||
Tuple.Create(_console.ForegroundColor, _console.BackgroundColor), "PSREADLINE> ",
|
||||
TokenClassification.Command, "dir"))));
|
||||
|
||||
// Tricky prompt - writes to console directly with colors, uses ^H trick to eliminate trailng space.
|
||||
// Tricky prompt - writes to console directly with colors, uses ^H trick to eliminate trailing space.
|
||||
using (var ps = PowerShell.Create(RunspaceMode.CurrentRunspace))
|
||||
{
|
||||
ps.AddCommand("New-Variable").AddParameter("Name", "__console").AddParameter("Value", _console).Invoke();
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ Import-Module $PSScriptRoot/helper.psm1
|
||||
$t ='Microsoft.PowerShell.PSConsoleReadLine' -as [type]
|
||||
if ($null -ne $t)
|
||||
{
|
||||
# Make sure we're runnning in a non-interactive session by relaunching
|
||||
# Make sure we're running in a non-interactive session by relaunching
|
||||
$psExePath = Get-PSExePath
|
||||
& $psExePath -NoProfile -NonInteractive -File $PSCommandPath $Configuration
|
||||
exit $LASTEXITCODE
|
||||
|
||||
@@ -168,7 +168,7 @@ function Get-ChangeLog
|
||||
## but not reachable from the last release tag. Instead, we need to exclude the commits that were cherry-picked,
|
||||
## and only include the commits that are not in the last release into the change log.
|
||||
|
||||
# Find the commits that were only in the orginal master, excluding those that were cherry-picked to release branch.
|
||||
# Find the commits that were only in the original master, excluding those that were cherry-picked to release branch.
|
||||
$new_commits_from_other_parent = git --no-pager log --first-parent --cherry-pick --right-only "$tag_hash...$other_parent_hash" --format=$format | New-CommitNode
|
||||
# Find the commits that were only in the release branch, excluding those that were cherry-picked from master branch.
|
||||
$new_commits_from_last_release = git --no-pager log --first-parent --cherry-pick --left-only "$tag_hash...$other_parent_hash" --format=$format | New-CommitNode
|
||||
|
||||
Reference in New Issue
Block a user