Browse Source

Return older help behaviour

git-svn-id: https://klish.googlecode.com/svn/trunk@565 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 12 years ago
parent
commit
8629564196
1 changed files with 4 additions and 7 deletions
  1. 4 7
      clish/view/view.c

+ 4 - 7
clish/view/view.c

@@ -269,9 +269,9 @@ const clish_command_t *clish_view_find_next_completion(clish_view_t * this,
 	const char *iter_cmd, const char *line,
 	clish_nspace_visibility_t field, bool_t inherit)
 {
-	const clish_command_t *result, *cmd, *ncmd = NULL;
+	const clish_command_t *result, *cmd;
 	clish_nspace_t *nspace;
-	unsigned int cnt = clish_view__get_nspace_count(this);
+	unsigned cnt = clish_view__get_nspace_count(this);
 	int i;
 
 	/* ask local view for next command */
@@ -280,13 +280,10 @@ const clish_command_t *clish_view_find_next_completion(clish_view_t * this,
 	if (!inherit)
 		return result;
 
-	if (cnt)
-		ncmd = clish_view_resolve_prefix(this, line, BOOL_FALSE);
-	/* Ask the imported namespaces for next command */
+	/* ask the imported namespaces for next command */
 	for (i = cnt - 1; i >= 0; i--) {
 		nspace = clish_view__get_nspace(this, i);
-		if (!clish_nspace__get_visibility(nspace, field) &&
-			(!*line || ncmd))
+		if (!clish_nspace__get_visibility(nspace, field))
 			continue;
 		cmd = clish_nspace_find_next_completion(nspace,
 			iter_cmd, line, field);