diff --git a/src/ctags.cc b/src/ctags.cc index 827b166..8e76fa5 100644 --- a/src/ctags.cc +++ b/src/ctags.cc @@ -3,7 +3,6 @@ #include "terminal.h" #include "project_build.h" #include "filesystem.h" -#include "directories.h" #include #include #include @@ -22,12 +21,8 @@ std::pair > Ctags::g if(!relative_debug_path.empty()) exclude+=" --exclude="+relative_debug_path.string(); } - else { - if(!Directories::get().path.empty()) - run_path=Directories::get().path; - else - run_path=path; - } + else + run_path=path; std::stringstream stdin_stream; //TODO: when debian stable gets newer g++ version that supports move on streams, remove unique_ptr below diff --git a/src/window.cc b/src/window.cc index 259203c..e9d699c 100644 --- a/src/window.cc +++ b/src/window.cc @@ -596,20 +596,20 @@ void Window::set_menu_actions() { menu.add_action("source_find_symbol_ctags", [this]() { auto view=Notebook::get().get_current_view(); - boost::filesystem::path ctags_path; + boost::filesystem::path search_path; if(view) - ctags_path=view->file_path.parent_path(); + search_path=view->file_path.parent_path(); else if(!Directories::get().path.empty()) - ctags_path=Directories::get().path; + search_path=Directories::get().path; else { boost::system::error_code ec; - ctags_path=boost::filesystem::current_path(ec); + search_path=boost::filesystem::current_path(ec); if(ec) { Terminal::get().print("Error: could not find current path\n", true); return; } } - auto pair=Ctags::get_result(ctags_path); + auto pair=Ctags::get_result(search_path); auto path=std::move(pair.first); auto stream=std::move(pair.second); @@ -680,8 +680,6 @@ void Window::set_menu_actions() { default_path = build->get_default_path(); debug_path = build->get_debug_path(); } - else if (!Directories::get().path.empty()) - search_path=Directories::get().path; if(view) { auto dialog_iter=view->get_iter_for_dialog();