diff --git a/src/reader.cpp b/src/reader.cpp index 8d62dd57a..2f300be05 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -250,7 +250,7 @@ bool editable_line_t::undo() { void editable_line_t::clear() { undo_history_.clear(); if (empty()) return; - set_text_bypassing_undo_history(L""); + text_ = L""; set_position(0); } diff --git a/src/reader.h b/src/reader.h index 989fff6a2..79a8154f0 100644 --- a/src/reader.h +++ b/src/reader.h @@ -81,8 +81,6 @@ struct undo_history_t { class editable_line_t { public: const wcstring &text() const { return text_; } - /// Set the text directly without maintaining undo invariants. Use with caution. - void set_text_bypassing_undo_history(wcstring &&text) { text_ = text; } size_t position() const { return position_; } void set_position(size_t position) { position_ = position; }