Mercurial > vim
comparison src/testdir/test_cmdwin.vim @ 30525:6fa498af368d v9.0.0598
patch 9.0.0598: using negative array index with negative width window
Commit: https://github.com/vim/vim/commit/8279af514ca7e5fd3c31cf13b0864163d1a0bfeb
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 26 23:08:22 2022 +0100
patch 9.0.0598: using negative array index with negative width window
Problem: Using negative array index with negative width window.
Solution: Make sure the window width does not become negative.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 27 Sep 2022 00:15:06 +0200 |
parents | 8496a2c45962 |
children | ac908e454519 |
comparison
equal
deleted
inserted
replaced
30524:7dc3d8cec8db | 30525:6fa498af368d |
---|---|
402 | 402 |
403 au! BufEnter | 403 au! BufEnter |
404 bwipe! | 404 bwipe! |
405 endfunc | 405 endfunc |
406 | 406 |
407 " This was resulting in a window with negative width. | |
408 " The test doesn't reproduce the illegal memory access though... | |
409 func Test_cmdwin_split_often() | |
410 let lines = &lines | |
411 let columns = &columns | |
412 set t_WS= | |
413 | |
414 try | |
415 set encoding=iso8859 | |
416 set ruler | |
417 winsize 0 0 | |
418 noremap 0 H | |
419 sil norm 0000000q: | |
420 catch /E36:/ | |
421 endtry | |
422 | |
423 bwipe! | |
424 set encoding=utf8 | |
425 let &lines = lines | |
426 let &columns = columns | |
427 endfunc | |
428 | |
407 | 429 |
408 " vim: shiftwidth=2 sts=2 expandtab | 430 " vim: shiftwidth=2 sts=2 expandtab |