|
|
|
@ -310,6 +310,8 @@ void Source::CommonView::copy_lines() { |
|
|
|
bool Source::CommonView::copy_with_first_line_indentation() { |
|
|
|
bool Source::CommonView::copy_with_first_line_indentation() { |
|
|
|
Gtk::TextIter start, end; |
|
|
|
Gtk::TextIter start, end; |
|
|
|
get_buffer()->get_selection_bounds(start, end); |
|
|
|
get_buffer()->get_selection_bounds(start, end); |
|
|
|
|
|
|
|
if(start.get_line() == end.get_line()) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
auto line_start = start; |
|
|
|
auto line_start = start; |
|
|
|
while(!line_start.starts_line() && line_start.backward_char() && (*line_start == ' ' || *line_start == '\t')) { |
|
|
|
while(!line_start.starts_line() && line_start.backward_char() && (*line_start == ' ' || *line_start == '\t')) { |
|
|
|
|