Long completion tooltips freezes the console for a while
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 50/100
Línea de trabajo
Reproduce the issue with Register-ArgumentCompleter and menu completion via Ctrl+Space, using the long-tooltip example in the report. Trace the completion tooltip handling and verify that long tooltips are truncated, the console remains responsive, and the second completion can be selected without another freeze.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
N/A
Screenshot
N/A
Environment data
PS Version: 7.5.0-preview.2
PS HostName: ConsoleHost
PSReadLine Version: 2.3.4
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 282
BufferHeight: 9001
Steps to reproduce
- Register an argument completer where at least one of the completions has a really long tooltip
- Trigger it with menu completion (Ctrl+Space)
- Watch the console freeze and CPU usage rise as the long string is processed
Here's an example of this:
Register-ArgumentCompleter -CommandName Get-ChildItem -ParameterName Filter -ScriptBlock {
[System.Management.Automation.CompletionResult]::new("CompletionText", "ListItem", [System.Management.Automation.CompletionResultType]::ParameterValue, "T$("o" * 1mb)ltip")
[System.Management.Automation.CompletionResult]::new("OtherRes1", "OtherRes2", [System.Management.Automation.CompletionResultType]::ParameterValue, "OtherRes3")
}
Get-ChildItem -Filter <Ctrl+Space>
If you wait for it to fully load and move the cursor over to the second result and then back it will freeze again.
Obviously this is a silly example but PowerShell can generate really long tooltips in more realistic scenarios. For example if you parse a long script and hover over the scriptblock Ast the tooltip will contain the entire script, so if you've parsed a really big script you will see this freeze.
Expected behavior
No freezes and a truncated tooltip is visible.
Actual behavior
Freeze for several seconds and no tooltip.
- Lenguaje dominante
- C#
- Estrellas
- 4.4k
- Forks
- 341
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PowerShell/PSReadLine
-
Needs-Triage :mag:
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
PowerShell/PSReadLine#3470 · 3 reacciones ·
Todos los issues de PowerShell/PSReadLine
Issues similares
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
azurenoops/spin_agent#975 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
SubtitleEdit/subtitleedit#15108 · 1 comentario ·