Ticket #3870 (new defect) — at Initial Version

Opened 7 years ago

Last modified 7 years ago

fix INPUT_COMPLETE_CD in quick widget

Reported by: dzabraev Owned by:
Priority: trivial Milestone: 4.8.20
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset:

Description

Seems to be I found bug in quick widget (lib/widget/quick.c:593).
After dlg_run return, it does check of input values,
in this code there is line

case quick_input:

if ((quick_widget->u.input.completion_flags & INPUT_COMPLETE_CD) != 0)

But quick_widget is iteration variable from previous cycle and this variable always initialized to QUICK_END.

I suggest following patch
diff --git a/lib/widget/quick.c b/lib/widget/quick.c
index 555d79c4c..3a3d014fb 100644
--- a/lib/widget/quick.c
+++ b/lib/widget/quick.c
@@ -590,7 +590,7 @@ quick_dialog_skip (quick_dialog_t * quick_dlg, int nskip)

break;


case quick_input:

  • if ((quick_widget->u.input.completion_flags & INPUT_COMPLETE_CD) != 0)

+ if ((*item->quick_widget->u.input.completion_flags & INPUT_COMPLETE_CD) != 0)

*item->quick_widget->u.input.result =

tilde_expand (INPUT (item->widget)->buffer);

else

Note: See TracTickets for help on using tickets.