Skip to content

Commit

Permalink
Remove the push out contract
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthaTi committed Nov 11, 2024
1 parent 58c7c5b commit 1f294b4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/fluid/text_input.d
Original file line number Diff line number Diff line change
Expand Up @@ -1545,15 +1545,13 @@ class TextInput : InputNode!Node, FluidScrollable {
}

/// ditto
void push(scope const(char)[] ch, bool isMinor = true)
out (; _bufferNode, "_bufferNode must exist after pushing to buffer")
do {
void push(scope const(char)[] ch, bool isMinor = true) {

// TODO `push` should *not* have isMinor = true as default for API consistency
// it does for backwards compatibility

// Nothing to do
if (ch.length == 0) return;
if (ch == "") return;

// Move the buffer node into here; move it back when done
auto bufferNode = _bufferNode;
Expand Down

0 comments on commit 1f294b4

Please sign in to comment.