all repos — fluxbox @ ee9c0a34baadbae98c510b1bf1b8c720a33c6f56

custom fork of the fluxbox windowmanager

Patch from Dmytro Bagrii

Fix fbrun completion search for last directory in PATH
Mark Tiefenbruck mark@fluxbox.org
commit

ee9c0a34baadbae98c510b1bf1b8c720a33c6f56

parent

dd238f9d95113831daec1f8750ca60abac0e4a01

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M util/fbrun/FbRun.ccutil/fbrun/FbRun.cc

@@ -508,8 +508,8 @@ if (first_run && m_apps.empty()) {

first_run = false; std::string path = getenv("PATH"); FbTk::Directory dir; - for (unsigned int l = 0, r = 0; r < path.size(); ++r) { - if ((path.at(r) == ':' || r == path.size() - 1) && r - l > 1) { + for (unsigned int l = 0, r = 0; r <= path.size(); ++r) { + if ((r == path.size() || path.at(r) == ':') && r - l > 1) { dir.open(path.substr(l, r - l).c_str()); prefix = dir.name() + (*dir.name().rbegin() == '/' ? "" : "/"); int n = dir.entries();