X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FConsole%2FLineEditor.cc;h=00faa8b2369fc183758b2bdd15f0819ee8fe6c9c;hb=bd9f9d3fd6fbcff0112a7bf48ab9284da9576b11;hp=512ab6ff9afe51fe33562eaa266ef3cb844eb96a;hpb=b89e3166f7680755683dccee5e48cb3a820185c0;p=senf.git diff --git a/Utils/Console/LineEditor.cc b/Utils/Console/LineEditor.cc index 512ab6f..00faa8b 100644 --- a/Utils/Console/LineEditor.cc +++ b/Utils/Console/LineEditor.cc @@ -146,7 +146,7 @@ completePath(term::LineEditor & editor, unsigned & b, unsigned & e, std::string { std::string const & t (editor.text()); // Search backward from e finding the longest valid path. This does *not* accept all valid - // path's, only those without empedded white-space. However, this is only for completion so + // path's, only those without embedded white-space. However, this is only for completion so // it's ok. if (bparent().get()); if (parent) dir = parent; - basePath += "../"; + prefix += "../"; } else if (*i == WordToken(".")) - basePath += "./"; + prefix += "./"; else { if (dir->hasChild(i->value())) { try { @@ -205,7 +204,7 @@ completePath(term::LineEditor & editor, unsigned & b, unsigned & e, std::string catch (std::bad_cast &) { return; } - basePath += i->value() + "/"; + prefix += i->value() + "/"; } else { DirectoryNode::ChildrenRange cs (dir->completions(i->value())); @@ -214,7 +213,7 @@ completePath(term::LineEditor & editor, unsigned & b, unsigned & e, std::string if (!node.isDirectory()) return; dir = static_cast(&node); - basePath += cs.begin()->first + "/"; + prefix += cs.begin()->first + "/"; } else return; @@ -222,7 +221,6 @@ completePath(term::LineEditor & editor, unsigned & b, unsigned & e, std::string } DirectoryNode::ChildrenRange cs (dir->completions(i->value())); - prefix = basePath; for (DirectoryNode::ChildrenRange::iterator j (cs.begin()); j != cs.end(); ++j) completions.push_back(j->first + (j->second->followLink().isDirectory() ? "/" : " ")); }