rio: dont consider shell characters as part of the filename for auto completion

rio looks backwards in the line for the beginning of a filename
that needs to be completed with ^F. this change makes the
characters: =, ^, ( and { stoppers, so filename completion
will work in all these cases:

foobar=/foo/ba^F; for(i in (fo^F ba^F)){/bin/baz^F

this means completion will not work for prefixes having these
special characters in them.

thanks to burnzez for bringing it up.
This commit is contained in:
cinap_lenrek 2013-12-19 18:12:16 +01:00
parent 0866d65f8e
commit 56300f72e8

View file

@ -476,7 +476,7 @@ windfilewidth(Window *w, uint q0, int oneelement)
q = q0;
while(q > 0){
r = w->r[q-1];
if(r<=' ')
if(r<=' ' || r=='=' || r=='^' || r=='(' || r=='{')
break;
if(oneelement && r=='/')
break;