Skip to content

Commit

Permalink
Unsupported on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Slackadays committed Oct 20, 2024
1 parent ba95a44 commit 9974069
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/cb/src/actions/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ void script() {
void runClipboardScript() {
if (!fs::is_regular_file(path.metadata.script)) return;

#if defined(_WIN32) || defined(_WIN64)
fprintf(stderr, "%s", formatColors("[error][inverse] โœ˜ [noinverse] Sorry, but clipboard scripts aren't supported on Windows yet.[blank]\n").data());
#endif

#if defined(UNIX_OR_UNIX_LIKE)
static bool secondRun = false;

fs::path currentPath = fs::current_path();
Expand Down Expand Up @@ -104,4 +109,5 @@ void runClipboardScript() {
fs::current_path(currentPath);

secondRun = true;
#endif
}
2 changes: 1 addition & 1 deletion src/cb/src/clipboard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ std::string generatedEndbar();
std::string repeatString(const std::string_view& character, const size_t& length);
std::string makeControlCharactersVisible(const std::string_view& oldStr, size_t len = 0);
std::string removeExcessWhitespace(const std::string_view& str, size_t len = 0);
unsigned long levenshteinDistance(const std::string_view& one, const std::string_view& two);
size_t levenshteinDistance(const std::string_view& one, const std::string_view& two);
void setLanguagePT();
void setLanguageTR();
void setLanguageES_CO();
Expand Down
1 change: 0 additions & 1 deletion src/cb/src/utils/cowcopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
#include <linux/fs.h>
#include <sys/ioctl.h>
#endif

2 changes: 1 addition & 1 deletion src/cb/src/utils/distance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.*/
#include "../clipboard.hpp"

unsigned long levenshteinDistance(const std::string_view& one, const std::string_view& two) {
size_t levenshteinDistance(const std::string_view& one, const std::string_view& two) {
if (one == two) return 0;

if (one.empty()) return two.size();
Expand Down

0 comments on commit 9974069

Please sign in to comment.