diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-09-09 08:59:48 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-09-12 13:25:28 -0300 |
commit | 2792a0e33c0845fdd5b1b752d99ee573f6534256 (patch) | |
tree | 6b7fd940dd8a93f2957ecc11c99f64db8662c398 /src/nvim/api/buffer.c | |
parent | 38dcfb60627cbdfa2eaf5d0d991c872c85868f22 (diff) | |
download | rneovim-2792a0e33c0845fdd5b1b752d99ee573f6534256.tar.gz rneovim-2792a0e33c0845fdd5b1b752d99ee573f6534256.tar.bz2 rneovim-2792a0e33c0845fdd5b1b752d99ee573f6534256.zip |
api/msgpack-rpc: Remove Position type, using arrays instead.
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r-- | src/nvim/api/buffer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index 380de12c89..383e13fd92 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -447,9 +447,9 @@ void buffer_insert(Buffer buffer, Integer lnum, Array lines, Error *err) /// @param name The mark's name /// @param[out] err Details of an error that may have occurred /// @return The (row, col) tuple -Position buffer_get_mark(Buffer buffer, String name, Error *err) +Array buffer_get_mark(Buffer buffer, String name, Error *err) { - Position rv = POSITION_INIT; + Array rv = ARRAY_DICT_INIT; buf_T *buf = find_buffer_by_handle(buffer, err); if (!buf) { @@ -479,8 +479,9 @@ Position buffer_get_mark(Buffer buffer, String name, Error *err) return rv; } - rv.row = posp->lnum; - rv.col = posp->col; + ADD(rv, INTEGER_OBJ(posp->lnum)); + ADD(rv, INTEGER_OBJ(posp->col)); + return rv; } |