mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
💄 Use @constructor instead of EditorView
This commit is contained in:
committed by
Kevin Sawicki
parent
94e4fef108
commit
f4861b7919
@@ -1663,7 +1663,7 @@ class EditorView extends View
|
||||
# Private:
|
||||
getCharacterWidthCache: (scopes, char) ->
|
||||
scopes ?= NoScope
|
||||
obj = EditorView.characterWidthCache
|
||||
obj = @constsructor.characterWidthCache
|
||||
for scope in scopes
|
||||
obj = obj[scope]
|
||||
return null unless obj?
|
||||
@@ -1672,7 +1672,7 @@ class EditorView extends View
|
||||
# Private:
|
||||
setCharacterWidthCache: (scopes, char, val) ->
|
||||
scopes ?= NoScope
|
||||
obj = EditorView.characterWidthCache
|
||||
obj = @constructor.characterWidthCache
|
||||
for scope in scopes
|
||||
obj[scope] ?= {}
|
||||
obj = obj[scope]
|
||||
@@ -1680,7 +1680,7 @@ class EditorView extends View
|
||||
|
||||
# Private:
|
||||
clearCharacterWidthCache: ->
|
||||
EditorView.characterWidthCache = {}
|
||||
@constructor.characterWidthCache = {}
|
||||
|
||||
pixelOffsetForScreenPosition: (position) ->
|
||||
{top, left} = @pixelPositionForScreenPosition(position)
|
||||
|
||||
Reference in New Issue
Block a user