diff options
| author | 2026-06-16 12:36:53 +0100 | |
|---|---|---|
| committer | 2026-06-16 12:36:53 +0100 | |
| commit | c214ab8067e82ae97b78a99f104539e598860fc0 (patch) | |
| tree | 2f26ce03f7ef9290108f7829d013625a56c09b05 /modules/cap.cpp | |
| parent | Merge branch 'insp4' into master. (diff) | |
| parent | Fix missing caps in the list output when when the line overflows. (diff) | |
Merge branch 'insp4' into master.
Diffstat (limited to 'modules/cap.cpp')
| -rw-r--r-- | modules/cap.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/cap.cpp b/modules/cap.cpp index 0db0a6dc8..2cc75c35d 100644 --- a/modules/cap.cpp +++ b/modules/cap.cpp @@ -371,16 +371,14 @@ private: std::string line; for (const auto& cap : result) { - if (line.length() + cap.length() < maxline) - { - line.append(cap); - line.push_back(' '); - } - else + if (line.length() + cap.length() >= maxline) { DisplaySingleResult(user, subcmd, line, asterisk); line.clear(); } + if (!line.empty()) + line.push_back(' '); + line.append(cap); } DisplaySingleResult(user, subcmd, line, false); } |
