Skip to content

Commit 52780f3

Browse files
Daniel LangeDaniel Lange
authored andcommitted
Make Ctrl-U clear the current Filter or Search string while editing it
Closes #1694
1 parent 80e4532 commit 52780f3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

IncSet.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ bool IncSet_handleKey(IncSet* this, int ch, Panel* panel, IncMode_GetPanelValue
181181
}
182182
}
183183
}
184+
} else if (ch == KEY_CTRL('U')) {
185+
mode->index = 0;
186+
mode->buffer[mode->index] = 0;
187+
if (mode->isFilter) {
188+
filterChanged = true;
189+
this->filtering = false;
190+
}
184191
} else if (ch == KEY_BACKSPACE || ch == 127) {
185192
if (mode->index > 0) {
186193
mode->index--;

0 commit comments

Comments
 (0)