-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
Environment:
- Latest daily
PowerShell Core 7.4.0.preview-2
build - Latest
CompletionPredictor
module build (with git completion support) PSReadLine 2.3.0-beta0
- PowerShell profile:
Import-Module -Name 'CompletionPredictor'
Set-PSReadLineOption -HistoryNoDuplicates
Set-PSReadLineOption -PredictionSource 'HistoryAndPlugin'
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
$Parameters = @{
Key = 'RightArrow'
BriefDescription = 'ForwardCharAndAcceptNextSuggestionWord'
ScriptBlock = {
param($key, $arg)
$line = $null
$cursor = $null
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([Ref]$line, [Ref]$cursor)
if ($cursor -lt $line.Length) {
[Microsoft.PowerShell.PSConsoleReadLine]::ForwardChar($key, $arg)
} else {
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptNextSuggestionWord($key, $arg)
}
}
}
Set-PSReadlineKeyHandler @Parameters
Steps:
mkdir test
cd .\test\
git init
mkdir empty
git diff
Expected behavior
git diff should not crash PowerShell session
Actual behavior
PowerShell session crashes
Error details
N/A
Environment data
Name Value
---- -----
PSVersion 7.4.0-preview.2
PSEdition Core
GitCommitId 7.4.0-preview.2-35-g78f1406fd2fed68aa6348df565b6824f8c187ef9
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
0.1.0
Visuals
Metadata
Metadata
Assignees
Labels
No labels