diff --git a/src/rrr/layers/gui/browser/navigation/navigation.cpp b/src/rrr/layers/gui/browser/navigation/navigation.cpp index 83457b1..a5d59a6 100755 --- a/src/rrr/layers/gui/browser/navigation/navigation.cpp +++ b/src/rrr/layers/gui/browser/navigation/navigation.cpp @@ -1,6 +1,7 @@ #include "navigation.hpp" #include +#include #include "try_engine/event/event_classificator.hpp" #include "utils/types.hpp" @@ -285,12 +286,18 @@ namespace rrr::layers::gui if (key.get_keycode() == try_engine::key::ENTER) { - if (!std::filesystem::is_directory(selected_file.path)) return; - cnt->navigation_right(); - data = cnt->get(TYPE_WIN::NAVIGATION); - selected_file = cnt->get_selected_file(TYPE_WIN::NAVIGATION); - em->execute(types::event_type::NAVIGATION_RIGHT, nullptr); - set_scroll(); + if (std::filesystem::is_directory(selected_file.path)) + { + cnt->navigation_right(); + data = cnt->get(TYPE_WIN::NAVIGATION); + selected_file = cnt->get_selected_file(TYPE_WIN::NAVIGATION); + 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)