diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-05-14 20:56:27 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-05-14 20:56:49 +0100 |
| commit | 4e280977a2fcd7ca423b5909b435b896b256cdaf (patch) | |
| tree | caf34647ab26f749f5c63f5af71f34302bc5e261 /src/selectors.hh | |
| parent | c3f4ef9ba2e8ca58acc6cf56e552341a5af62f5d (diff) | |
Iterate in reversed order on selections when modifing buffer
This way, update only needs to be called once everything is done
as we always modify after the next selection to be used.
Diffstat (limited to 'src/selectors.hh')
| -rw-r--r-- | src/selectors.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/selectors.hh b/src/selectors.hh index d98b73bf..d5b0523d 100644 --- a/src/selectors.hh +++ b/src/selectors.hh @@ -13,8 +13,8 @@ inline void clear_selections(const Buffer& buffer, SelectionList& selections) { auto& sel = selections.main(); auto& pos = sel.cursor(); - avoid_eol(buffer, pos); sel.anchor() = pos; + selections.avoid_eol(); selections = SelectionList{ buffer, std::move(sel) }; } |
