summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-21 19:57:04 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-21 19:57:04 +0000
commitce30ccc06af7f2c03762e5b18dde37b26ea6ec42 (patch)
tree2933f7b9a71269829df045bf8b59178e698c937a /src/evalfunc.c
parent29967732761d1ffb5592db5f5aa7036f5b52abf1 (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.c2
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,