Skip to content

Commit

Permalink
Merge branch '55_filename_complete'
Browse files Browse the repository at this point in the history
* 55_filename_complete:
  lib/widget/input_complete.c: minor refactoring and optimization.
  Fix for input completions with spaces in names.
  lib/widget/input_complete.c: refactoring:
  Concretize the usage of autocompliting in different input fields.
  Extend QUICK_INPUT and QUICK_LABELED_INPUT macros for getting completion flags via parameters instead of using hardcoded value
  Ticket #55: savannah: tab completion vs. spaces and escaping
  • Loading branch information
slavaz committed Feb 4, 2013
2 parents 74d71e7 + 0608af2 commit 0501ac9
Show file tree
Hide file tree
Showing 28 changed files with 737 additions and 367 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ tests/lib/Makefile
tests/lib/mcconfig/Makefile
tests/lib/search/Makefile
tests/lib/vfs/Makefile
tests/lib/widget/Makefile
tests/src/Makefile
tests/src/filemanager/Makefile
])
Expand Down
3 changes: 2 additions & 1 deletion lib/vfs/utilvfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ vfs_die (const char *m)
char *
vfs_get_password (const char *msg)
{
return input_dialog (msg, _("Password:"), MC_HISTORY_VFS_PASSWORD, INPUT_PASSWORD);
return input_dialog (msg, _("Password:"), MC_HISTORY_VFS_PASSWORD, INPUT_PASSWORD,
INPUT_COMPLETE_NONE);
}

/* --------------------------------------------------------------------------------------------- */
4 changes: 1 addition & 3 deletions lib/widget/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ typedef enum
/* completion flags */
typedef enum
{
INPUT_COMPLETE_NONE = 0,
INPUT_COMPLETE_FILENAMES = 1 << 0,
INPUT_COMPLETE_HOSTNAMES = 1 << 1,
INPUT_COMPLETE_COMMANDS = 1 << 2,
INPUT_COMPLETE_VARIABLES = 1 << 3,
INPUT_COMPLETE_USERNAMES = 1 << 4,
INPUT_COMPLETE_CD = 1 << 5,
INPUT_COMPLETE_SHELL_ESC = 1 << 6,

INPUT_COMPLETE_DEFAULT = INPUT_COMPLETE_FILENAMES
| INPUT_COMPLETE_HOSTNAMES | INPUT_COMPLETE_VARIABLES | INPUT_COMPLETE_USERNAMES
} input_complete_t;

/*** structures declarations (and typedefs of structures)*****************************************/
Expand Down
Loading

0 comments on commit 0501ac9

Please sign in to comment.