Relocate buffer view when reloading file#3250
Conversation
After reloading a file that has been externally modified, the buffer view may become invalid: the displayed subset of lines of the file may no longer exist, since the file may have been truncated. So relocate the buffer view in this case. In particular, this fixes crashes caused by out of bounds accesses to the line array by displayBuffer() trying to display no longer existing lines.
|
The relocation now really takes place, which is a great improvement, but...
...in the moment a mouse click is performed into a second instance of |
|
Yes, I noticed this too. It is the first of 3 example issues I described in #3251. |
|
Great, then it's already tracked. 👍 |
After reloading a file that has been externally modified, the buffer view may become invalid: the displayed subset of lines of the file may no longer exist, since the file may have been truncated. So relocate the buffer view in this case.
In particular, this fixes crashes caused by out of bounds accesses to the line array by displayBuffer() trying to display no longer existing lines (reported in #742 (comment))
Fixes #742