Fix a crash in :inspect when switching from page 2 to a different item
Switching to a different item cleared the data, but didn't clear the cache of where the page breaks are located. The subsequent call to `get_data_paged(int which_page)` has a bounds check for the page number, so it's sufficient to just clear the page breaks, which is already ok as it resets the object to the same state as a newly-created instance.
This commit is contained in:
parent
136e651d69
commit
7cb5f09bcf
2 changed files with 3 additions and 0 deletions
2
changelog_entries/crash_inspect_page.md
Normal file
2
changelog_entries/crash_inspect_page.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
### Miscellaneous and Bug Fixes
|
||||
* Fix a crash in the `:inspect` window when pagination is used (issue #7851).
|
|
@ -91,6 +91,7 @@ public:
|
|||
void clear_data()
|
||||
{
|
||||
data.clear();
|
||||
pages.clear();
|
||||
}
|
||||
|
||||
void set_data(const std::string& new_data)
|
||||
|
|
Loading…
Add table
Reference in a new issue