ListView does not render the first selection after reuse in Vi insert mode
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
Hướng nghiên cứu
Reproduce with pwsh -noprofile, Vi edit mode, and ListView prediction settings, then compare the first DownArrow after reopening ListView with the initial use. Trace the ListView navigation path and Vi insert-mode handling. Done means the first press visibly highlights the internally selected item on every reuse, with Enter and subsequent navigation remaining consistent.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
Long-time Vi mode user. For a couple of years, I've been dealing w/ an obscure behavior and finally taking time to report it.
Issue: In Vi insert mode with PredictionViewStyle set to ListView, the first DownArrow press after reusing the list selects a history item internally but fails to render its highlight until another navigation key is pressed.
More Detail:
When using these PSReadLine options:
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Vi
the first DownArrow press in the prediction selects a history entry internally without visually rendering the selection highlight.
Pressing Enter at that point executes/accepts the first history item, which indicates that the item was selected despite no visible highlight. Pressing DownArrow a second time causes the selection highlight to appear. After that, UpArrow and DownArrow behave and render normally.
Note: The issue does not occur the first time ListView is used in a new PowerShell session; it only begins after ListView has already been used once.
Entering Vi normal mode and then returning to insert mode resets the behavior, e.g. Esc + i. After that, the first DownArrow press renders correctly again, until the issue recurs.
Environment data
PS Version: 7.6.3
PS HostName: ConsoleHost
PSReadLine Version: 2.4.5
PSReadLine EditMode: Vi
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 180
BufferHeight: 50
Steps to reproduce
- Run
pwsh -noprofile - Run
Set-PSReadLineOption -EditMode Vi - Run
Set-PSReadlineOption -PredictionViewStyle ListView - In Vi insert mode, type text that produces history predictions
- Use the ListView and navigate it with DownArrow (on the first use in a new session, the highlight appears as expected)
- Complete or dismiss the ListView (e.g. ESC to dismiss and
ccto clear the line/command) - Trigger ListView again and press DownArrow once
On the second and later uses of ListView:
- The first DownArrow press appears to do nothing visually.
- No entry is highlighted.
- Pressing Enter accepts or runs the first list item, indicating that the selection changed internally.
- Pressing DownArrow a second time causes the visual highlight to appear.
- Subsequent UpArrow and DownArrow presses render correctly.
Expected behavior
- Each
DownArrowpress in ListView should visibly move the selection to the next prediction. - On the first press, the first matching history entry should be highlighted immediately.
- The visible highlight and the internally selected item should always remain in sync.
- This should behave consistently every time ListView is opened while in Vi insert mode.
Actual behavior
- After ListView has been used once, reopening it in Vi insert mode produces no visible highlight on the first
DownArrowpress. - The first item appears unselected, but it is selected internally.
- Pressing
Enteraccepts/runs that first item despite the missing highlight. - A second
DownArrowpress makes the highlight appear, after which navigation renders normally. - Pressing
Escand thenitemporarily resets the behavior.
- Ngôn ngữ chính
- C#
- Star
- 4.4k
- Fork
- 341
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PowerShell/PSReadLine
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
PowerShell/PSReadLine#3470 · 3 reaction ·
Tất cả issue của PowerShell/PSReadLine
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nightscout/nocturne#1425 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cake-build/cake#5024 ·
-
Gå gjennom ESLint-suppressions Đang mởFrontend status/draft TechnicalDebt
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 75/100
Altinn/altinn-auth#4143 ·