-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Changes inspired by whitespace package #1546
Conversation
@@ -452,6 +453,14 @@ class Editor extends Model | |||
@insertNewline() | |||
@moveCursorUp() if onFirstLine | |||
|
|||
# {Delegates to: TextBuffer.append} | |||
appendText: (text, normalizeLineEndings) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this on Editor
feels weird to me, since insertText
uses selections and this does not. To me Editor
methods are all about operating on selections/cursors. And this method plus deleteBufferRow
deviate from that conceptual model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can go that route and remove all non-selection/cursor based methods from editor
. But
I think it is more of an internal implementation difference than practical difference for package authors.
It comes down to: Do we want package authors to think about whether they need to call a method on an Editor or an Editor's Buffer? Or do we just want to point them towards the Editor's API.
No description provided.