mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
reader: inline dangerous function
The idea for this function was that it stands as the one place that modifies the text without push_edit. In practice I don't think it helps. No functional change.
This commit is contained in:
parent
8b4b24428c
commit
be64c53888
2 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue