Mercurial > vim
comparison src/testdir/test_buffer.vim @ 22707:9ff187b1652e v8.2.1902
patch 8.2.1902: default option values changed with :badd for existing buffer
Commit: https://github.com/vim/vim/commit/e974fa7b2b98e53a59d5ef16a6a1291f12a32e33
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 25 15:02:51 2020 +0100
patch 8.2.1902: default option values changed with :badd for existing buffer
Problem: Default option values are changed when using :badd for an existing
buffer.
Solution: When calling buflist_new() pass a zero line number. (closes #7195)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 25 Oct 2020 15:15:03 +0100 |
parents | 595ea7f099cd |
children | ecf0a8d6d4df |
comparison
equal
deleted
inserted
replaced
22706:9087acfe9333 | 22707:9ff187b1652e |
---|---|
360 call assert_equal(0, getbufinfo('Xfile2')[0].loaded) | 360 call assert_equal(0, getbufinfo('Xfile2')[0].loaded) |
361 call assert_equal(0, getbufinfo('Xfile3')[0].loaded) | 361 call assert_equal(0, getbufinfo('Xfile3')[0].loaded) |
362 %bw! | 362 %bw! |
363 endfunc | 363 endfunc |
364 | 364 |
365 func Test_badd_options() | |
366 new SomeNewBuffer | |
367 setlocal cole=3 | |
368 wincmd p | |
369 badd SomeNewBuffer | |
370 new SomeNewBuffer | |
371 call assert_equal(3, &cole) | |
372 close | |
373 close | |
374 bwipe! SomeNewBuffer | |
375 endfunc | |
376 | |
365 " vim: shiftwidth=2 sts=2 expandtab | 377 " vim: shiftwidth=2 sts=2 expandtab |