From 16756fe12e06fdaa45967334f84624c1d0756a85 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Mon, 21 Mar 2005 10:24:18 +0000 Subject: [PATCH] - fix refusal to chdir/start file action when spaces are typed in command prompt and Enter is pressed (#151637) --- mc-spaceprompt.patch | 29 +++++++++++++++++++++++++++++ mc.spec | 8 +++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 mc-spaceprompt.patch diff --git a/mc-spaceprompt.patch b/mc-spaceprompt.patch new file mode 100644 index 0000000..ccb7222 --- /dev/null +++ b/mc-spaceprompt.patch @@ -0,0 +1,29 @@ +--- mc-4.6.1-pre3/src/main.c.jn 2005-03-19 15:55:40.000000000 +0100 ++++ mc-4.6.1-pre3/src/main.c 2005-03-19 17:04:10.000000000 +0100 +@@ -1490,9 +1490,14 @@ midnight_callback (struct Dlg_head *h, d + 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 */ +@@ -1527,7 +1532,7 @@ midnight_callback (struct Dlg_head *h, d + 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 + */ diff --git a/mc.spec b/mc.spec index bba3155..4201930 100644 --- a/mc.spec +++ b/mc.spec @@ -1,7 +1,7 @@ Summary: User-friendly text console file manager and visual shell. Name: mc Version: 4.6.1a -Release: 0.5 +Release: 0.6 Epoch: 1 License: GPL Group: System Environment/Shells @@ -19,6 +19,7 @@ Patch1: mc-extensions.patch Patch2: mc-promptfix.patch Patch3: mc-uglydir.patch Patch4: mc-fish-upload.patch +Patch5: mc-spaceprompt.patch %description Midnight Commander is a visual shell much like a file manager, only @@ -35,6 +36,7 @@ poke into RPMs for specific files. %patch2 -p1 -b .promptfix %patch3 -p1 -b .uglydir %patch4 -p1 -b .fish-upload +%patch5 -p1 -b .spaceprompt # convert files in /lib to UTF-8 pushd lib @@ -172,6 +174,10 @@ rm -rf $RPM_BUILD_ROOT %dir %{_datadir}/mc %changelog +* Mon Mar 21 2005 Jindrich Novy 4.6.1a-0.6 +- fix refusal to chdir/start file action when spaces are typed in + command prompt and Enter is pressed (#151637) + * Thu Mar 3 2005 Jindrich Novy 4.6.1a-0.5 - update from CVS - sync the .utf8 patch with upstream