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
1133 content_origin.y + line_height * (row as f32 - scroll_pixel_position.y / line_height);1133 content_origin.y + line_height * (row as f32 - scroll_pixel_position.y / line_height);
1134 1134
1135 let start_x = {1135 let start_x = {
1136 const INLINE_BLAME_PADDING_EM_WIDTHS: f32 = 6.;
1137
1136 let line_layout = &line_layouts[(row - start_row) as usize];1138 let line_layout = &line_layouts[(row - start_row) as usize];
1137 let line_width = line_layout.line.width;1139 let line_width = line_layout.line.width;
1138 1140
1139 // TODO: define the padding as a constant1141 content_origin.x + line_width + (em_width * INLINE_BLAME_PADDING_EM_WIDTHS)
1140 content_origin.x + line_width + (em_width * 6.)
1141 };1142 };
1142 1143
1143 let absolute_offset = point(start_x, start_y);1144 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