Search result with long line changes displayed as horizontal scrolling

Summary

When doing a global search, if one changed line is very long, that one line becomes scrollable

demo

Steps to reproduce

See https://gitlab.com/search?search=gitlab-logo-white-preview.png&nav_source=navbar&project_id=16683102&group_id=2452873&search_code=true&repository_ref=master

What is the current bug behavior?

Scrolling happens on long changed lines

What is the expected correct behavior?

long lines are displayed as multiple lines (similar to commit display page)

Relevant logs and/or screenshots

See above

Output of checks

This bug happens on GitLab.com

Proposal

This should work as it does for diffs, where if a line doesn't fit within the blob container it wraps to a new line (with blank line number). This should also function responsively, if the page width decreases/increases lines are adjusted as needed (see screenshot and gif below)

Screen_Shot_2022-04-25_at_9.54.37_AM

Responsive line-scrolling

This can be done by setting some bounds in the display details for the Blob result view.

Edited by John McGuire