Why many logics in DisplayBuffer are duplicated in TextEditorPresenter?



I’m looking into atom source code recently.
I’m enjoying analyze the code everyday. :smile:

I have a question while I’m looking into

“pixelPositionForScreenPosition” logic exist in TextEditorPresenter.
but I found also DisplayBuffer has it.

Detail logic is a little bit different, but almost same.
I think it’s better to use DisplayBuffer’s the logic in TextEditorPresenter.
I want to know the reason…


++ There seem to be more duplicated logic…;;;


Some duplicated code exists in the system simply because people haven’t had the chance to test ripping it out yet :laughing:


Thanks for your kind reply. I hope to contiribute Atom someday :smile: