Browse Source

Improved extend selection by extending selection of partial tokens

pipelines/235045657
eidheim 5 years ago
parent
commit
3cb0b2decf
  1. 10
      src/source.cpp

10
src/source.cpp

@ -1159,6 +1159,16 @@ void Source::View::extend_selection() {
return;
}
}
else { // Complete token selection
Gtk::TextIter start, end;
get_buffer()->get_selection_bounds(start, end);
auto start_token = get_token_iters(start);
auto end_token = get_token_iters(end);
if(start_token.first < start || end_token.second > end) {
get_buffer()->select_range(start_token.first, end_token.second);
return;
}
}
// Select string or comment block
auto before_start = start;

Loading…
Cancel
Save