microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.57k stars 29.02k forks source link

Search results unnecessarily clipped #95375

Open akbyrd opened 4 years ago

akbyrd commented 4 years ago

Issue Type: Bug

When searching it appears that results will have words clipped from the beginning, presumably to ensure the matched text is visible. However, text is unnecessarily clipped when there is still plenty of space remaining. This has the effect and making it seem random and broken. I'd expect the left clipping to be based on the view width, the same way that right clipping is.

image

Also, there's a ... indicator when text is clipped on the right, but there's no way to tell that text is being clipped on the left. This also makes it harder to understand why text is missing. I'd expect to see ... on the left also.

image

VS Code version: Code - Insiders 1.45.0-insider (92ff20ac39c7507fdf4164e2bedfdfb700805fe1, 2020-04-14T18:09:06.015Z) OS version: Windows_NT x64 10.0.17763

Extensions: none

vscodebot[bot] commented 4 years ago

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

roblourens commented 4 years ago

Old issue, I agree that the current state is still unsatisfactory, but it goes along with issues around syntax highlighting and monospace font in the search view, in that it is not a good place to read code, just to see that a match is there. Have you tried the Search Editor? https://code.visualstudio.com/updates/v1_43#_search-editors it does a much better job in that regard

roblourens commented 1 year ago

I've resisted changing this because the Search Editor is the real solution, but I think we should at least do the following

akbyrd commented 1 year ago

I don't find the Search Editor to be a suitable replacement for the search panel.

roblourens commented 1 year ago

The keybinding to open a result in the Search Editor is F12 (or whatever Go To Definition is bound to)