comparison src/testdir/test_functions.vim @ 28994:644b0f0541de v8.2.5019

patch 8.2.5019: cannot get the first screen column of a character Commit: https://github.com/vim/vim/commit/0f7a3e1de6f71e8e1423fe594890d6aa7f94e132 Author: LemonBoy <thatlemon@gmail.com> Date: Thu May 26 12:10:37 2022 +0100 patch 8.2.5019: cannot get the first screen column of a character Problem: Cannot get the first screen column of a character. Solution: Let virtcol() optionally return a list. (closes https://github.com/vim/vim/issues/10482, closes #7964)
author Bram Moolenaar <Bram@vim.org>
date Thu, 26 May 2022 13:15:04 +0200
parents 995bc7ba8d5b
children c7bd1040a1c4
comparison
equal deleted inserted replaced
28993:05930f3364a2 28994:644b0f0541de
2945 else 2945 else
2946 call assert_notequal(exepath('sh'), '') 2946 call assert_notequal(exepath('sh'), '')
2947 endif 2947 endif
2948 endfunc 2948 endfunc
2949 2949
2950 " Test for virtcol()
2951 func Test_virtcol()
2952 enew!
2953 call setline(1, "the\tquick\tbrown\tfox")
2954 norm! 4|
2955 call assert_equal(8, virtcol('.'))
2956 call assert_equal(8, virtcol('.', v:false))
2957 call assert_equal([4, 8], virtcol('.', v:true))
2958 bwipe!
2959 endfunc
2960
2950 " vim: shiftwidth=2 sts=2 expandtab 2961 " vim: shiftwidth=2 sts=2 expandtab