aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/php.vim
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-10-02 13:46:53 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2018-10-06 11:29:51 +0200
commitcc305213d78e282d9e8a43106491d033e990ccdc (patch)
treea34ecdb5a0b4f1510f5a81fa07f2754f422eba6d /runtime/syntax/php.vim
parent39ad99b594aa68b6c3024dd9bfa3f7e31c14dff9 (diff)
downloadrneovim-cc305213d78e282d9e8a43106491d033e990ccdc.tar.gz
rneovim-cc305213d78e282d9e8a43106491d033e990ccdc.tar.bz2
rneovim-cc305213d78e282d9e8a43106491d033e990ccdc.zip
TUI: always use safe cursor movement after resize
The old code could lead to a memory error in the following situation: 0. The previous cursor position was row 50 since before, on a grid larger than 50 rows. 1. grid_resize changes the grid height to 40, and invalidly assumes the resize moved the physical cursor to row 0 2. Some event used a operation that could move the cursor (such as clear), and then reset the cursor to the "true" position row 50 (pointless after #8221, but I forgot to remove it) 3. raw_line/cheap_to_print is invoked, and tries to inspect the grid at row 50 (memory error) 4. grid_cursor_goto would have been called at this point, and set a valid cursor position 0-39.
Diffstat (limited to 'runtime/syntax/php.vim')
0 files changed, 0 insertions, 0 deletions