* command.c (enter): Don't change current_dlg to NULL. It
breaks repainting of the panels. Simplify logic.
Этот коммит содержится в:
родитель
8c10c20881
Коммит
6da33f9c8c
@ -1,5 +1,8 @@
|
||||
2003-10-25 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* command.c (enter): Don't change current_dlg to NULL. It
|
||||
breaks repainting of the panels. Simplify logic.
|
||||
|
||||
* key.c (init_key_x11): Warning fix for gcc 3.3.2.
|
||||
|
||||
2003-10-24 Pavel Roskin <proski@gnu.org>
|
||||
|
@ -171,20 +171,22 @@ void do_cd_command (char *cmd)
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns 1 if the we could handle the enter, 0 if not */
|
||||
static int
|
||||
/* Handle Enter on the command line */
|
||||
static cb_ret_t
|
||||
enter (WInput *cmdline)
|
||||
{
|
||||
Dlg_head *old_dlg;
|
||||
char *cmd = cmdline->buffer;
|
||||
|
||||
if (command_prompt && strlen (cmdline->buffer)) {
|
||||
char *cmd;
|
||||
if (!command_prompt)
|
||||
return MSG_HANDLED;
|
||||
|
||||
/* Any initial whitespace should be removed at this point */
|
||||
cmd = cmdline->buffer;
|
||||
while (*cmd == ' ' || *cmd == '\t' || *cmd == '\n')
|
||||
cmd++;
|
||||
|
||||
if (!*cmd)
|
||||
return MSG_HANDLED;
|
||||
|
||||
if (strncmp (cmd, "cd ", 3) == 0 || strcmp (cmd, "cd") == 0) {
|
||||
do_cd_command (cmd);
|
||||
new_input (cmdline);
|
||||
@ -216,8 +218,7 @@ enter (WInput *cmdline)
|
||||
if (cmd[i] == '%') {
|
||||
i++;
|
||||
s = expand_format (NULL, cmd[i], 1);
|
||||
command =
|
||||
g_realloc (command, strlen (command) + strlen (s)
|
||||
command = g_realloc (command, strlen (command) + strlen (s)
|
||||
+ strlen (cmd) - i + 1);
|
||||
strcat (command, s);
|
||||
g_free (s);
|
||||
@ -228,8 +229,6 @@ enter (WInput *cmdline)
|
||||
}
|
||||
command[j] = 0;
|
||||
}
|
||||
old_dlg = current_dlg;
|
||||
current_dlg = 0;
|
||||
new_input (cmdline);
|
||||
shell_execute (command, 0);
|
||||
g_free (command);
|
||||
@ -242,9 +241,6 @@ enter (WInput *cmdline)
|
||||
if (use_subshell)
|
||||
load_prompt (0, 0);
|
||||
#endif
|
||||
|
||||
current_dlg = old_dlg;
|
||||
}
|
||||
}
|
||||
return MSG_HANDLED;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user