aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2021-07-06 23:10:30 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2021-07-06 23:10:30 (GMT)
commitee9c0a34baadbae98c510b1bf1b8c720a33c6f56 (patch)
tree2d65b0e1c7d86b49d000ce2ce7621f6511636d10 /util
parentdd238f9d95113831daec1f8750ca60abac0e4a01 (diff)
downloadfluxbox-ee9c0a34baadbae98c510b1bf1b8c720a33c6f56.zip
fluxbox-ee9c0a34baadbae98c510b1bf1b8c720a33c6f56.tar.bz2
Patch from Dmytro Bagrii
Fix fbrun completion search for last directory in PATH
Diffstat (limited to 'util')
-rw-r--r--util/fbrun/FbRun.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index 5404e69..0f8ff63 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -508,8 +508,8 @@ void FbRun::tabCompleteApps() {
508 first_run = false; 508 first_run = false;
509 std::string path = getenv("PATH"); 509 std::string path = getenv("PATH");
510 FbTk::Directory dir; 510 FbTk::Directory dir;
511 for (unsigned int l = 0, r = 0; r < path.size(); ++r) { 511 for (unsigned int l = 0, r = 0; r <= path.size(); ++r) {
512 if ((path.at(r) == ':' || r == path.size() - 1) && r - l > 1) { 512 if ((r == path.size() || path.at(r) == ':') && r - l > 1) {
513 dir.open(path.substr(l, r - l).c_str()); 513 dir.open(path.substr(l, r - l).c_str());
514 prefix = dir.name() + (*dir.name().rbegin() == '/' ? "" : "/"); 514 prefix = dir.name() + (*dir.name().rbegin() == '/' ? "" : "/");
515 int n = dir.entries(); 515 int n = dir.entries();