mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
main.c: Fix blocking of panel cd-ing when there are only spaces on the
command line.
This commit is contained in:
parent
1f60f44145
commit
3be17f6657
@ -1,3 +1,8 @@
|
||||
2005-05-29 Jindrich Novy <jnovy@redhat.com>
|
||||
|
||||
* main.c (midnight_callback): Fix blocking of panel cd-ing when
|
||||
there are only spaces on the command line.
|
||||
|
||||
2005-05-26 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* view.c: Completely rewrote the cursor movement code. Now all
|
||||
|
13
src/main.c
13
src/main.c
@ -1487,9 +1487,14 @@ midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm)
|
||||
if (parm == '\t')
|
||||
free_completions (cmdline);
|
||||
|
||||
if (parm == '\n' && cmdline->buffer[0]) {
|
||||
send_message ((Widget *) cmdline, WIDGET_KEY, parm);
|
||||
return MSG_HANDLED;
|
||||
if (parm == '\n') {
|
||||
for (i = 0; cmdline->buffer[i] && cmdline->buffer[i] == ' '; i++);
|
||||
if (cmdline->buffer[i]) {
|
||||
send_message ((Widget *) cmdline, WIDGET_KEY, parm);
|
||||
return MSG_HANDLED;
|
||||
}
|
||||
stuff (cmdline, "", 0);
|
||||
cmdline->point = 0;
|
||||
}
|
||||
|
||||
/* Ctrl-Enter and Alt-Enter */
|
||||
@ -1524,7 +1529,7 @@ midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm)
|
||||
reverse_selection_cmd ();
|
||||
return MSG_HANDLED;
|
||||
}
|
||||
} else if (!command_prompt || !strlen (cmdline->buffer)) {
|
||||
} else if (!command_prompt || !cmdline->buffer[0]) {
|
||||
/* Special treatement '+', '-', '\', '*' only when this is
|
||||
* first char on input line
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user