diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-11-01 21:24:58 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-11-01 21:24:58 -0400 |
commit | 48847fbafc41d93bbc42d7bf5711a47c4982e08c (patch) | |
tree | 4f6c374b801ac8744b2a8c31451df4f88079c1e3 /src/nvim/api/window.c | |
parent | 92173edbc0d35420056034d5139a71575e370538 (diff) | |
parent | d6da42475888bae48104d1de98fcc9640b619de3 (diff) | |
download | rneovim-48847fbafc41d93bbc42d7bf5711a47c4982e08c.tar.gz rneovim-48847fbafc41d93bbc42d7bf5711a47c4982e08c.tar.bz2 rneovim-48847fbafc41d93bbc42d7bf5711a47c4982e08c.zip |
Merge pull request #951 from bfredl/curfix
api: window_set_cursor doesn't always update position.
Diffstat (limited to 'src/nvim/api/window.c')
-rw-r--r-- | src/nvim/api/window.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c index fde1ebfa4c..597c857ad5 100644 --- a/src/nvim/api/window.c +++ b/src/nvim/api/window.c @@ -9,6 +9,7 @@ #include "nvim/cursor.h" #include "nvim/window.h" #include "nvim/screen.h" +#include "nvim/move.h" #include "nvim/misc2.h" @@ -86,6 +87,10 @@ void window_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err) win->w_cursor.coladd = 0; // When column is out of range silently correct it. check_cursor_col_win(win); + + // make sure cursor is in visible range even if win != curwin + update_topline_win(win); + update_screen(VALID); } |