comparison src/testdir/test_options.vim @ 20148:fadb7f84beff v8.2.0629

patch 8.2.0629: setting a boolean option to v:false does not work Commit: https://github.com/vim/vim/commit/65d032c779a43b767497e15e6a32d04a6a8fa65d Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 24 20:57:01 2020 +0200 patch 8.2.0629: setting a boolean option to v:false does not work Problem: Setting a boolean option to v:false does not work. Solution: Do not use the string representation of the value. (Christian Brabandt, closes #5974)
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 Apr 2020 21:00:04 +0200
parents d13f8ae3b1de
children 244eb8d8d100
comparison
equal deleted inserted replaced
20147:fe776cc8b871 20148:fadb7f84beff
897 set sw^=2 897 set sw^=2
898 call assert_equal(8, &sw) 898 call assert_equal(8, &sw)
899 set shiftwidth& 899 set shiftwidth&
900 endfunc 900 endfunc
901 901
902 " Test for setting option values using v:false and v:true
903 func Test_opt_boolean()
904 set number&
905 set number
906 call assert_equal(1, &nu)
907 set nonu
908 call assert_equal(0, &nu)
909 let &nu = v:true
910 call assert_equal(1, &nu)
911 let &nu = v:false
912 call assert_equal(0, &nu)
913 set number&
914 endfunc
915
902 " vim: shiftwidth=2 sts=2 expandtab 916 " vim: shiftwidth=2 sts=2 expandtab