History

Remove TODO by defining constant (#10556)

Release Notes: - N/A

Thorsten Ball committed 2 years ago

Commit d1928f01 parent ad22bdd1 file · +3 −2Browse files

Unified · Split

crates/editor/src/element.rs+3−2
@@ -1133,11 +1133,12 @@ impl EditorElement { · 1132 unmodified lines
11331133 content_origin.y + line_height * (row as f32 - scroll_pixel_position.y / line_height);
11341134
11351135 let start_x = {
1136+ const INLINE_BLAME_PADDING_EM_WIDTHS: f32 = 6.;
1137+
11361138 let line_layout = &line_layouts[(row - start_row) as usize];
11371139 let line_width = line_layout.line.width;
11381140
1139− // TODO: define the padding as a constant
1140− content_origin.x + line_width + (em_width * 6.)
1141+ content_origin.x + line_width + (em_width * INLINE_BLAME_PADDING_EM_WIDTHS)
11411142 };
11421143
11431144 let absolute_offset = point(start_x, start_y);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t