diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-21 19:57:04 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-21 19:57:04 +0000 |
commit | ce30ccc06af7f2c03762e5b18dde37b26ea6ec42 (patch) | |
tree | 2933f7b9a71269829df045bf8b59178e698c937a /src/evalfunc.c | |
parent | 29967732761d1ffb5592db5f5aa7036f5b52abf1 (diff) |
patch 9.0.0916: getbufline() is inefficient for getting a single linev9.0.0916
Problem: getbufline() is inefficient for getting a single line.
Solution: Add getbufoneline().
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 310fa784e0..e4f28edb75 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -1923,6 +1923,8 @@ static funcentry_T global_functions[] = ret_list_dict_any, f_getbufinfo}, {"getbufline", 2, 3, FEARG_1, arg3_buffer_lnum_lnum, ret_list_string, f_getbufline}, + {"getbufoneline", 2, 2, FEARG_1, arg2_buffer_lnum, + ret_string, f_getbufoneline}, {"getbufvar", 2, 3, FEARG_1, arg3_buffer_string_any, ret_any, f_getbufvar}, {"getchangelist", 0, 1, FEARG_1, arg1_buffer, |