Closed mdeaudelin closed 9 years ago
@mdeaudelin That's a subtle, nasty little bug. Thanks for reporting, and the video shows the problem. Can you point me to where the atom editor is declaring this class?
I'm not familiar enough with Atom source code to point out in which file the conflicting class resides. However, I can see it when using the developer tools. In the DOM, it is defined inline in a <style> block immediately under the <atom-text-editor> element:
.line-number {
white-space: nowrap;
padding-left: .5em;
opacity: 0.6;
}
Thanks! I'll release a patch.
One of the styles used for unified diffs uses the CSS class "line-number". However, this same class is used internally by the Atom editor, and the styles applied include horizontal padding. This causes Atom to display the cursor in the wrong location and therefore text typed appears at the shifted by one position.
The bug can be seen in this video: https://goo.gl/photos/aHVTnZw6PTJAfSLp6
There is an easy fix: replace class "line-number" with something else, like "coordinates".