aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-09-09 08:59:48 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-09-12 13:25:28 -0300
commit2792a0e33c0845fdd5b1b752d99ee573f6534256 (patch)
tree6b7fd940dd8a93f2957ecc11c99f64db8662c398 /src/nvim/api/buffer.c
parent38dcfb60627cbdfa2eaf5d0d991c872c85868f22 (diff)
downloadrneovim-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.c9
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;
}