aboutsummaryrefslogtreecommitdiffhomepage
path: root/complete.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-23 03:47:16 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-23 03:47:16 +1000
commit68e0c94dbb6b7bbacc7c38234a4194817dd11d6a (patch)
treec8540518ecc29fd72932908558c24f2e67719a52 /complete.c
parentca04fc745d5212ec2d5bf70271fd5aa8dc2320e6 (diff)
Do not unescape strings from completion callouts. Why was this done before?
darcs-hash:20060222174716-ac50b-218c6896918e5cf8047ea6291a8cde44061d0b57.gz
Diffstat (limited to 'complete.c')
-rw-r--r--complete.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/complete.c b/complete.c
index d3de7dd0..da8924a2 100644
--- a/complete.c
+++ b/complete.c
@@ -1365,7 +1365,7 @@ static void complete_from_args( const wchar_t *str,
{
array_list_t possible_comp;
- int i;
+/* int i; */
al_init( &possible_comp );
@@ -1373,7 +1373,17 @@ static void complete_from_args( const wchar_t *str,
eval_args( args, &possible_comp );
proc_pop_interactive();
- /* We need to unescape these strings before matching them */
+ /*
+ Completion results where previously unescaped by the
+ code below. I have no idea why that was done, but I have
+ not removed this since I'm not sure if this might be
+ correct, though I can't think of any reason why it
+ should be.
+
+ If this code is readded - add an explanation of _why_ completion
+ strings should be escaped!
+ */
+ /*
for( i=0; i< al_get_count( &possible_comp ); i++ )
{
wchar_t *next = (wchar_t *)al_get( &possible_comp, i );
@@ -1387,6 +1397,7 @@ static void complete_from_args( const wchar_t *str,
}
else
{
+ al_set( &possible_comp , i, 0 );
debug( 2, L"Could not expand string %ls on line %d of file %s", next, __LINE__, __FILE__ );
}
free( next );
@@ -1396,7 +1407,8 @@ static void complete_from_args( const wchar_t *str,
debug( 2, L"Got null string on line %d of file %s", __LINE__, __FILE__ );
}
}
-
+ */
+
copy_strings_with_prefix( comp_out, str, desc, 0, &possible_comp );
al_foreach( &possible_comp, (void (*)(const void *))&free );