comparison runtime/doc/eval.txt @ 13280:fbda23eb0996 v8.0.1514

patch 8.0.1514: getting the list of changes is not easy commit https://github.com/vim/vim/commit/07ad816525da67cab3c0db21d1286d221dbc7477 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 13 13:59:59 2018 +0100 patch 8.0.1514: getting the list of changes is not easy Problem: Getting the list of changes is not easy. Solution: Add the getchangelist() function. (Yegappan Lakshmanan, closes #2634)
author Christian Brabandt <cb@256bit.org>
date Tue, 13 Feb 2018 14:15:05 +0100
parents abaebba89fd4
children a88c5e12b860
comparison
equal deleted inserted replaced
13279:fa46af018785 13280:fbda23eb0996
2150 getbufinfo([{expr}]) List information about buffers 2150 getbufinfo([{expr}]) List information about buffers
2151 getbufline({expr}, {lnum} [, {end}]) 2151 getbufline({expr}, {lnum} [, {end}])
2152 List lines {lnum} to {end} of buffer {expr} 2152 List lines {lnum} to {end} of buffer {expr}
2153 getbufvar({expr}, {varname} [, {def}]) 2153 getbufvar({expr}, {varname} [, {def}])
2154 any variable {varname} in buffer {expr} 2154 any variable {varname} in buffer {expr}
2155 getchangelist({expr}) List list of change list items
2155 getchar([expr]) Number get one character from the user 2156 getchar([expr]) Number get one character from the user
2156 getcharmod() Number modifiers for the last typed character 2157 getcharmod() Number modifiers for the last typed character
2157 getcharsearch() Dict last character search 2158 getcharsearch() Dict last character search
2158 getcmdline() String return the current command-line 2159 getcmdline() String return the current command-line
2159 getcmdpos() Number return cursor position in command-line 2160 getcmdpos() Number return cursor position in command-line
4276 string is returned, there is no error message. 4277 string is returned, there is no error message.
4277 Examples: > 4278 Examples: >
4278 :let bufmodified = getbufvar(1, "&mod") 4279 :let bufmodified = getbufvar(1, "&mod")
4279 :echo "todo myvar = " . getbufvar("todo", "myvar") 4280 :echo "todo myvar = " . getbufvar("todo", "myvar")
4280 < 4281 <
4282 getchangelist({expr}) *getchangelist()*
4283 Returns the |changelist| for the buffer {expr}. For the use
4284 of {expr}, see |bufname()| above. If buffer {expr} doesn't
4285 exist, an empty list is returned.
4286
4287 The returned list contains two entries: a list with the change
4288 locations and the current position in the list. Each
4289 entry in the change list is a dictionary with the following
4290 entries:
4291 col column number
4292 coladd column offset for 'virtualedit'
4293 lnum line number
4294 If buffer {expr} is the current buffer, then the current
4295 position refers to the position in the list. For other
4296 buffers, it is set to the length of the list.
4297
4281 getchar([expr]) *getchar()* 4298 getchar([expr]) *getchar()*
4282 Get a single character from the user or input stream. 4299 Get a single character from the user or input stream.
4283 If [expr] is omitted, wait until a character is available. 4300 If [expr] is omitted, wait until a character is available.
4284 If [expr] is 0, only get a character when one is available. 4301 If [expr] is 0, only get a character when one is available.
4285 Return zero otherwise. 4302 Return zero otherwise.