mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
* screen.c (do_search): Ignore the backspace key on empty
quick-search. From Egmont Koblinger <egmont * uhulinux hu>
This commit is contained in:
parent
48690761d6
commit
1eab2f63b7
@ -1,3 +1,10 @@
|
|||||||
|
2004-11-17 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
|
* screen.c (do_search): Ignore the backspace key on empty
|
||||||
|
quick-search.
|
||||||
|
|
||||||
|
From Egmont Koblinger <egmont * uhulinux hu>
|
||||||
|
|
||||||
2004-11-15 Leonard den Ottolander <leonard * den ottolander nl>
|
2004-11-15 Leonard den Ottolander <leonard * den ottolander nl>
|
||||||
|
|
||||||
* file.c: Code cleanup (mostly indentation).
|
* file.c: Code cleanup (mostly indentation).
|
||||||
|
@ -1867,9 +1867,10 @@ do_search (WPanel *panel, int c_code)
|
|||||||
int found;
|
int found;
|
||||||
|
|
||||||
l = strlen (panel->search_buffer);
|
l = strlen (panel->search_buffer);
|
||||||
if (l && (c_code == KEY_BACKSPACE))
|
if (c_code == KEY_BACKSPACE) {
|
||||||
panel->search_buffer[--l] = 0;
|
if (l)
|
||||||
else {
|
panel->search_buffer[--l] = '\0';
|
||||||
|
} else {
|
||||||
if (c_code && l < sizeof (panel->search_buffer)) {
|
if (c_code && l < sizeof (panel->search_buffer)) {
|
||||||
panel->search_buffer[l] = c_code;
|
panel->search_buffer[l] = c_code;
|
||||||
panel->search_buffer[l + 1] = 0;
|
panel->search_buffer[l + 1] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user