Improve rendering of find matches touching each other
See original GitHub issueIssue Type: Bug
I need to remove some lines of text from about 80 files (every file has about 2000 rows) at the same time. I wanted to use search&replace tool in vs Code(ctrl+shift+f).
And my issue consists of two different problems:
Problem 1
Given following rows:
být=elektronický=zásilka
být=jiný=způsob
být=poskytování=pozáruční
být=poskytování=servisní
být=pozdě=třetí
být=pozáruční
být=pozáruční=servis
být=příslušný=krajský
být=příslušný=poškozený
být=schopný=dodaný
být=servis
být=servisní
být=servisní=služba
být=služba=zahrnující
být=zejména=uvedený
where I need to remove whole row with occurence. This works correctly and matches 3+grams:
^být=[^=]+=.*
This incorrectly matches also 2grams:
^být=[^=]+=.*\n
Then i thought - ok, I can make some workaround and split it to two regexps which lead to problem 2.
Problem 2
When I removed all occurences of this ^být=[^=]+=.*
from all files, then I needed to remove blank lines. I used the same tool for multi search and replace in all files from the same folder.
I used this regexp ^\n
and the button for replace all (it said about 2000 occurences) didn’t do almost anything (changed about 3 files from 80).
Ok I tried to click to replace all button in multisearch window file by file. Reached 3rd file where it stopped to work as well.
Ok if I click fast enough I might be done soon I thought and clicked on replace for each occurence in multisearch window.
And I was terrified when I later found that it instead of deleting blank lines also deleted lines with text. (e.g. cena=náhradní=díl
)
VS Code version: Code 1.44.1 (a9f8623ec050e5f0b44cc8ce8204a1455884749f, 2020-04-11T01:48:12.622Z) OS version: Windows_NT x64 10.0.18363
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-7700HQ CPU @ 2.80GHz (8 x 2808) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: enabled rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off_ok webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 31.87GB (20.32GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
Extensions (14)
Extension | Author (truncated) | Version |
---|---|---|
vscode-base64 | ada | 0.1.0 |
vscode-markdownlint | Dav | 0.34.0 |
jsonpath-extract | dav | 1.2.3 |
gc-excelviewer | Gra | 2.1.34 |
Angular2 | joh | 9.1.2 |
rainbow-csv | mec | 1.6.0 |
vscode-docker | ms- | 1.0.0 |
csharp | ms- | 1.21.17 |
vscode-kubernetes-tools | ms- | 1.1.1 |
python | ms- | 2020.3.71659 |
powershell | ms- | 2020.3.0 |
vscode-typescript-tslint-plugin | ms- | 1.2.3 |
vscode-yaml | red | 0.7.2 |
markdown-all-in-one | yzh | 2.8.0 |
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (8 by maintainers)
Top GitHub Comments
While user can find what
+1
+2
mean after couple of multiline searches, this problems still apparent in highlight from Find widget where we don’t have any indication. In this case it’s impossible to notice that in the middle of the list some of matches takes two lies without navigation one-by-one.Having borders would help to see start/end of matches in cases when the follow each other. Question is how often this case will occur, but failing to easily see that there are one or separate matches has big impact.
I’d suggest you to split it into 2 separate issues which have separate action items and resolved separately:
editor.findMatchBorder
to default themes)^\n
. This one doesn’t have any problems with single items replacement, or Replace from find widget, but Replace all in Find in files results in error:Error: Overlapping ranges are not allowed!