search: fix crash when searching the scrollback history

search_update_selection() was changed in 1.4.x to *first* update the
selection, *then* move the viewport.

This leads to a crash if the new match (selection) is outside the
current viewport; the selection code assumes the updated selection
endpoint is in the visible viewport.

Changing back to *first* move the viewport, *then* update the
selection solves this.
This commit is contained in:
Daniel Eklöf 2020-07-25 11:23:54 +02:00
parent 057ff3ba21
commit 9f82cbaa49
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 56 additions and 48 deletions

View file

@ -40,6 +40,10 @@
### Deprecated
### Removed
### Fixed
* Crash in scrollback search
### Security