mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-16 06:54:03 +00:00
reader: move function definition out-of-line
Happily, clangd provides a code action to do this. No functional change.
This commit is contained in:
parent
b3a8e85b0f
commit
0ffb0fb786
2 changed files with 8 additions and 6 deletions
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue