|
|
|
@ -1216,13 +1216,12 @@ void Source::View::setup_format_style(bool is_generic_view) { |
|
|
|
static auto yapf = filesystem::find_executable("latexindent"); |
|
|
|
static auto yapf = filesystem::find_executable("latexindent"); |
|
|
|
if(!yapf.empty()) { |
|
|
|
if(!yapf.empty()) { |
|
|
|
format_style = [this](bool continue_without_style_file, bool ignore_selection) { |
|
|
|
format_style = [this](bool continue_without_style_file, bool ignore_selection) { |
|
|
|
std::string command = "latexindent"; |
|
|
|
std::string command = "latexindent -m"; |
|
|
|
|
|
|
|
|
|
|
|
if(!ignore_selection && get_buffer()->get_has_selection()) { |
|
|
|
if(!ignore_selection && get_buffer()->get_has_selection()) { |
|
|
|
// Does not work with standard input...
|
|
|
|
Gtk::TextIter start, end; |
|
|
|
// Gtk::TextIter start, end;
|
|
|
|
get_buffer()->get_selection_bounds(start, end); |
|
|
|
// get_buffer()->get_selection_bounds(start, end);
|
|
|
|
command += " –n " + std::to_string(start.get_line() + 1) + '-' + std::to_string(end.get_line() + 1); |
|
|
|
// command += " –-lines " + std::to_string(start.get_line() + 1) + '-' + std::to_string(end.get_line() + 1);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
auto search_path = file_path.parent_path(); |
|
|
|
auto search_path = file_path.parent_path(); |
|
|
|
|