Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Changes inspired by whitespace package #1546

Closed

Conversation

kevinsawicki
Copy link
Contributor

No description provided.

@@ -452,6 +453,14 @@ class Editor extends Model
@insertNewline()
@moveCursorUp() if onFirstLine

# {Delegates to: TextBuffer.append}
appendText: (text, normalizeLineEndings) ->
Copy link
Contributor Author

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.

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.

@probablycorey probablycorey deleted the cj-changes-inspired-by-whitespace-package branch February 21, 2014 21:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants