Currently average character width is used in EditView::DrawEOL():
// Draw the eol-is-selected rectangle
rcSegment.left = xEol + xStart + virtualSpace + blobsWidth;
rcSegment.right = rcSegment.left + vsDraw.aveCharWidth;
when vsDraw.selEOLFilled is disabled, some people feel there is an extra space on selected lines.
There are other editors (Windows Notepad) don't draw the rectangle at all, and others (Kate based LiteIDE, ICSharpCode.AvalonEdit) draw with half average character width or like.

I think this can be implemented by set width in pixel or set percentage to aveCharWidth like tab width.
There is ongoing work for EOL annotations that may conflict with this so wait until that is finished.
A draft implementation.
The patch relies on drawing an average character width then overdrawing part to remove some of that. It won't handle some reasonable future changes like setting the width to 150%.
To properly emulate Visual Studio's appearance, the 'EOL-selection rectangle' should move after any fold text and the area between the text end and the fold text be treated as a spacer or left padding for the fold text.
Which looks for me is a complex change to draw 'EOL-selection rectangle' after fold display text like Visual Studio.
Changes that would make this area of the code simpler to evolve include:
Last edit: Neil Hodgson 2021-05-16
fold text and eol annotation are rarely used (even used only a few lines will have them), adding widths for them will complicate LineLayout validating.