Mercurial > vim
diff src/evalfunc.c @ 29024:9f25e0ed831d v8.2.5034
patch 8.2.5034: there is no way to get the byte index from a virtual column
Commit: https://github.com/vim/vim/commit/5a6ec10cc80ab02eeff644ab19b82312630ea855
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 27 21:58:00 2022 +0100
patch 8.2.5034: there is no way to get the byte index from a virtual column
Problem: There is no way to get the byte index from a virtual column.
Solution: Add virtcol2col(). (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/10477,
closes #10098)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 27 May 2022 23:00:03 +0200 |
parents | 644b0f0541de |
children | b90bca860b5a |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -2682,6 +2682,8 @@ static funcentry_T global_functions[] = ret_list_any, f_values}, {"virtcol", 1, 2, FEARG_1, arg2_string_or_list_bool, ret_virtcol, f_virtcol}, + {"virtcol2col", 3, 3, FEARG_1, arg3_number, + ret_number, f_virtcol2col}, {"visualmode", 0, 1, 0, arg1_bool, ret_string, f_visualmode}, {"wildmenumode", 0, 0, 0, NULL,