Skip to content

Commit

Permalink
minor updates (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonvw authored Nov 3, 2024
1 parent 7512bb7 commit 2323688
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
8 changes: 5 additions & 3 deletions src/stc/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@ void wex::stc::on_init()
{{_("Switches"), {{{_("stc.End of line"), _("stc.Line numbers"), def(_("stc.Expand tabs")), _("stc.Ex mode show hex"), def(_("stc.Caret line")), def(_("stc.Scroll bars")), _("stc.Auto beautify"), _("stc.Auto blame"), _("stc.Auto complete"), def(_("stc.Auto indent")), def(_("stc.Keep zoom")), def(_("stc.vi mode")), _("stc.vi tag fullpath")}}}},
{_("Comboboxes"),
{{_("<i>Beautifiers:</i>")},
{"stc.beautifier.sources", item::COMBOBOX, beautify().list()},
{"stc.beautifier.cmake", item::COMBOBOX, beautify().list()},
{"stc.beautifier.sources",
item::COMBOBOX_FILE,
beautify().list()},
{"stc.beautifier.cmake", item::COMBOBOX_FILE, beautify().list()},
{"stc.beautifier.robotframework",
item::COMBOBOX,
item::COMBOBOX_FILE,
beautify().list()},
{_("<i>Others:</i>")},
{_("stc.Search engine"),
Expand Down
2 changes: 1 addition & 1 deletion src/ui/listview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ bool wex::listview::load(const strings_t& l)
});
}

if (m_columns.size() == 0)
if (InReportView() && m_columns.size() == 0)
{
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/vcs/vcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int wex::vcs::config_dialog(const data::window& par) const
v.emplace_back(_("vcs.Find includes submodules"), item::CHECKBOX);

std::transform(
m_store->begin(),
m_store->begin() + 1,
m_store->end(),
std::back_inserter(v),
[](const auto& t)
Expand Down Expand Up @@ -290,7 +290,7 @@ bool wex::vcs::load_document()
{
return false;
}

m_store->insert(m_store->begin(), vcs_entry());

log::info("vcs entries") << size() << "from" << menus::path().string();
Expand Down
13 changes: 7 additions & 6 deletions test/factory/test-beautify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ TEST_CASE("wex::factory::beautify")
wex::factory::beautify(wex::factory::beautify::CMAKE).name().empty());
}

wex::config("stc.Beautifier").set(wex::config::strings_t{{"clang-format"}});
wex::config("stc.Beautifier cmake").set(wex::config::strings_t{{"gersemi"}});
wex::config("stc.Beautifier robotframework")
wex::config("stc.beautifier.sources")
.set(wex::config::strings_t{{"clang-format"}});
wex::config("stc.beautifier.cmake").set(wex::config::strings_t{{"gersemi"}});
wex::config("stc.beautifier.robotframework")
.set(wex::config::strings_t{{"robotidy"}});

SUBCASE("check")
Expand Down Expand Up @@ -76,8 +77,8 @@ TEST_CASE("wex::factory::beautify")
.file(wex::path("test.md")));
}

wex::config("stc.Beautifier").set(wex::config::strings_t{{""}});
wex::config("stc.Beautifier cmake").set(wex::config::strings_t{{""}});
wex::config("stc.Beautifier robotframework")
wex::config("stc.beautifier.sources").set(wex::config::strings_t{{""}});
wex::config("stc.beautifier.cmake").set(wex::config::strings_t{{""}});
wex::config("stc.beautifier.robotframework")
.set(wex::config::strings_t{{""}});
}
6 changes: 5 additions & 1 deletion test/factory/test-link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Name: test-link.cpp
// Purpose: Implementation for wex unit testing
// Author: Anton van Wezenbeek
// Copyright: (c) 2021-2023 Anton van Wezenbeek
// Copyright: (c) 2021-2024 Anton van Wezenbeek
////////////////////////////////////////////////////////////////////////////////

#include <wex/core/config.h>
Expand Down Expand Up @@ -127,6 +127,10 @@ TEST_CASE("wex::factory::link")
.set(wex::config::strings_t{{"/usr/bin"}});
lnk.config_get();

REQUIRE(
wex::config(_("stc.link.Include directory")).get_first_of() ==
"/usr/bin");

wex::line_data data;
data.line(wex::factory::link::LINE_OPEN_URL);
REQUIRE(
Expand Down

0 comments on commit 2323688

Please sign in to comment.