question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve rendering of find matches touching each other

See original GitHub issue

Issue 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:open
  • Created 3 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
IllusionMHcommented, Apr 17, 2020

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.

1reaction
IllusionMHcommented, Apr 16, 2020

I’d suggest you to split it into 2 separate issues which have separate action items and resolved separately:

  1. display of match ranges (basically request to add editor.findMatchBorder to default themes)
  2. second - attempt to replace with ^\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!
Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Tips to Make a More Realistic Rendering — WillGibbons.com
Making sure the perspective matches between the backplate and product is essential to tricking the eye into believing it's looking at a photo....
Read more >
Rendering Performance - web.dev
Users notice if sites and apps don't run well, so optimizing rendering performance is crucial!
Read more >
Slow rendering - Android Developers
If your app suffers from slow UI rendering, then the system is forced to skip frames and the user will perceive stuttering in...
Read more >
Render and replace media in Premiere Pro - Adobe Support
The Render and Replace feature in Premiere Pro lets you flatten video clips and After Effects compositions, speeding up the performance of ...
Read more >
Browser detection using the user agent - HTTP - MDN Web Docs
As seen earlier, in most cases, looking for the rendering engine is a better way to go. This will help to not exclude...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found