From e76ec27418c4bf7599ce9ecc93ea1227fbc2db57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 21 Apr 2016 22:20:39 +0200 Subject: vis-lua: also accept a range as argument for file:delete and file:content --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 1abd8b2..de79e8c 100644 --- a/README.md +++ b/README.md @@ -597,9 +597,9 @@ At this time there exists no API stability guarantees. - `command_register(name, function(argv, force, win, cursor, range))` hook up a Lua function to `:name` command - `map(mode, key, function)` map a Lua function to `key` in `mode` - `file` - - `content(pos, len)` + - `content(pos, len)` or `content({start, finish})` - `insert(pos, data)` - - `delete(pos, len)` + - `delete(pos, len)` or `delete({start, finish})` - `lines_iterator()` - `name` - `lines[0..#lines+1]` array giving read/write access to lines @@ -612,11 +612,15 @@ At this time there exists no API stability guarantees. - `cursor` primary cursor - `syntax` lexer name used for syntax highlighting or `nil` - `cursor` - - `line` (1 based), `col` (1 based) - - `to(line, col)` - - `pos` bytes from start of file (0 based) - - `number` zero based index of cursor - - `selection` either `nil` or a table `{start, finish}` + - `line` (1 based), `col` (1 based) + - `to(line, col)` + - `pos` bytes from start of file (0 based) + - `number` one based index of cursor + - `selection` a `range` + - `range` denoted by absolute postions in bytes from the start of the file, + an invalid range is represented as `nil` + - `start` + - `finish` Most of the exposed objects are managed by the C core. Allthough there is a simple object life time management mechanism in place, it is still -- cgit v1.2.3