reader: move function definition out-of-line

Happily, clangd provides a code action to do this.

No functional change.
This commit is contained in:
Johannes Altmanninger 2022-09-14 13:32:13 +02:00
parent b3a8e85b0f
commit 0ffb0fb786
2 changed files with 8 additions and 6 deletions

View file

@ -264,6 +264,13 @@ bool editable_line_t::undo() {
return did_undo;
}
void editable_line_t::clear() {
undo_history.clear();
if (empty()) return;
set_text_bypassing_undo_history(L"");
set_position(0);
}
void editable_line_t::push_edit(edit_t &&edit) {
// Assign a new group id or propagate the old one if we're in a logical grouping of edits
if (edit_group_level_ != -1) {

View file

@ -107,12 +107,7 @@ class editable_line_t {
wchar_t at(size_t idx) const { return text().at(idx); }
void clear() {
undo_history.clear();
if (empty()) return;
set_text_bypassing_undo_history(L"");
set_position(0);
}
void clear();
/// Modify the commandline according to @edit. Most modifications to the
/// text should pass through this function.