@@ -18,7 +18,7 @@ export function paddingTop(display) {return display.lineSpace.offsetTop}
1818export function paddingVert ( display ) { return display . mover . offsetHeight - display . lineSpace . offsetHeight }
1919export function paddingH ( display ) {
2020 if ( display . cachedPaddingH ) return display . cachedPaddingH
21- let e = removeChildrenAndAdd ( display . measure , elt ( "pre" , "x" , "CodeMirror-measure-elem " ) )
21+ let e = removeChildrenAndAdd ( display . measure , elt ( "pre" , "x" , "CodeMirror-line-like " ) )
2222 let style = window . getComputedStyle ? window . getComputedStyle ( e ) : e . currentStyle
2323 let data = { left : parseInt ( style . paddingLeft ) , right : parseInt ( style . paddingRight ) }
2424 if ( ! isNaN ( data . left ) && ! isNaN ( data . right ) ) display . cachedPaddingH = data
@@ -585,7 +585,7 @@ let measureText
585585export function textHeight ( display ) {
586586 if ( display . cachedTextHeight != null ) return display . cachedTextHeight
587587 if ( measureText == null ) {
588- measureText = elt ( "pre" , null , "CodeMirror-measure-elem " )
588+ measureText = elt ( "pre" , null , "CodeMirror-line-like " )
589589 // Measure a bunch of lines, for browsers that compute
590590 // fractional heights.
591591 for ( let i = 0 ; i < 49 ; ++ i ) {
@@ -605,7 +605,7 @@ export function textHeight(display) {
605605export function charWidth ( display ) {
606606 if ( display . cachedCharWidth != null ) return display . cachedCharWidth
607607 let anchor = elt ( "span" , "xxxxxxxxxx" )
608- let pre = elt ( "pre" , [ anchor ] , "CodeMirror-measure-elem " )
608+ let pre = elt ( "pre" , [ anchor ] , "CodeMirror-line-like " )
609609 removeChildrenAndAdd ( display . measure , pre )
610610 let rect = anchor . getBoundingClientRect ( ) , width = ( rect . right - rect . left ) / 10
611611 if ( width > 2 ) display . cachedCharWidth = width
0 commit comments