Skip to content

Commit

Permalink
fix wrapping with CLIPrompt
Browse files Browse the repository at this point in the history
  • Loading branch information
lsproule committed Feb 11, 2024
1 parent f0e4b4e commit da3db6e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/Frate/Constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Frate::Constants {
const std::string BUILD_OS = "unknown";
#endif

const std::string NAME = "frate";
constexpr const std::string NAME = "frate";
const std::string DESCRIPTION =
"CLI utility for managing your project, a modern touch for C/C++";
const std::string PROJECT_URL = "https://github.com/frate-dev/frate";
Expand Down
1 change: 1 addition & 0 deletions src/Template/Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ namespace Frate::Project {
".gitattributes",
});


std::vector<std::filesystem::path> files_to_copy = filter.filterOut();

for (std::filesystem::path tmp_filtered_path : files_to_copy) {
Expand Down
6 changes: 3 additions & 3 deletions src/Utils/CLIPrompt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ namespace Frate::Utils::CLI {

char c;
std::string completion;
int completion_index = 0;
size_t completion_index = 0;
while (true) {
if (visible_options.size() > 0) {
if (!visible_options.empty()) {
visible_options.clear();
}
for (std::string &option : options) {
Expand Down Expand Up @@ -229,7 +229,7 @@ namespace Frate::Utils::CLI {
}
else {
completion_index++;
if (completion_index > visible_options.size()) {
if (completion_index >= visible_options.size()) {
completion_index = 0;
}
completion = visible_options[completion_index];
Expand Down

0 comments on commit da3db6e

Please sign in to comment.