Browse Source

Added -m switch to latexindent

merge-requests/413/head
eidheim 4 years ago
parent
commit
d3d54b48b6
  1. 9
      src/source.cpp

9
src/source.cpp

@ -1216,13 +1216,12 @@ void Source::View::setup_format_style(bool is_generic_view) {
static auto yapf = filesystem::find_executable("latexindent");
if(!yapf.empty()) {
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()) {
// Does not work with standard input...
// Gtk::TextIter start, end;
// get_buffer()->get_selection_bounds(start, end);
// command += " –-lines " + std::to_string(start.get_line() + 1) + '-' + std::to_string(end.get_line() + 1);
Gtk::TextIter 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);
}
auto search_path = file_path.parent_path();

Loading…
Cancel
Save