add run editor from rrr
This commit is contained in:
parent
1880278487
commit
a4c706d327
@ -1,6 +1,7 @@
|
|||||||
#include "navigation.hpp"
|
#include "navigation.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
#include "try_engine/event/event_classificator.hpp"
|
#include "try_engine/event/event_classificator.hpp"
|
||||||
#include "utils/types.hpp"
|
#include "utils/types.hpp"
|
||||||
@ -285,12 +286,18 @@ namespace rrr::layers::gui
|
|||||||
|
|
||||||
if (key.get_keycode() == try_engine::key::ENTER)
|
if (key.get_keycode() == try_engine::key::ENTER)
|
||||||
{
|
{
|
||||||
if (!std::filesystem::is_directory(selected_file.path)) return;
|
if (std::filesystem::is_directory(selected_file.path))
|
||||||
cnt->navigation_right();
|
{
|
||||||
data = cnt->get(TYPE_WIN::NAVIGATION);
|
cnt->navigation_right();
|
||||||
selected_file = cnt->get_selected_file(TYPE_WIN::NAVIGATION);
|
data = cnt->get(TYPE_WIN::NAVIGATION);
|
||||||
em->execute(types::event_type::NAVIGATION_RIGHT, nullptr);
|
selected_file = cnt->get_selected_file(TYPE_WIN::NAVIGATION);
|
||||||
set_scroll();
|
em->execute(types::event_type::NAVIGATION_RIGHT, nullptr);
|
||||||
|
set_scroll();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
system(("kitty --name \"project_rrr_editor\" --directory " + selected_file.path.parent_path().string() + " nv ").c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key.get_keycode() == try_engine::key::L)
|
if (key.get_keycode() == try_engine::key::L)
|
||||||
|
Loading…
Reference in New Issue
Block a user