# editor: Do not reserve inline blame scroll width when blame is in the status bar \(\#61422\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/1817b43c80707a3e49c3946a72bd39ee3134c654)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 1817b43c80707a3e49c3946a72bd39ee3134c654

Requested commit: 1817b43c80707a3e49c3946a72bd39ee3134c654

Commit: 1817b43c80707a3e49c3946a72bd39ee3134c654

Tree: 2f2212c1f3ef0834c8e8098e08bcf12e5652d0a1

Author: Vlad Gaevsky

Committer: GitHub

## Message

```
editor: Do not reserve inline blame scroll width when blame is in the status bar (#61422)

## Problem

When `git.inline_blame.location` is `status_bar` (anything other than
`inline`), nothing is painted inline at the end of the line — yet the
horizontal scroll range still reserves the longest row's inline blame
width (introduced in #23374), letting the editor scroll into blank space
when a line is long enough to scroll. Reported in #24752 (e.g.
@Nemesis19's comment: still reproduces with `location: status_bar`).

## Fix

Skip the blame width reservation in the scroll range when the blame
location isn't `Inline` — one guard in the `longest_line_blame_width`
closure in `element.rs`. This is independent of the soft-wrap fix for
#24752 (#61319) and can land on its own.

## Test

`test_status_bar_blame_location_reserves_no_scroll_width` asserts that,
with a long line and no soft wrap, moving blame from inline to the
status bar shrinks the horizontal scroll range (the reservation is
dropped). It uses a fixed-width test `BlameRenderer`, since the default
test renderer returns `None` and never exercised the reservation.

Release Notes:

- Fixed inline git blame reserving horizontal scroll space even when
blame is displayed in the status bar
```

## Parents

- [3f7f0565de5bdf357e43554f2639302449747db7](https://git.cafe/gitcafe/zed/commit/3f7f0565de5bdf357e43554f2639302449747db7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/1817b43c80707a3e49c3946a72bd39ee3134c654?format=markdown)
