diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-04-21 19:09:50 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-04-21 19:09:50 +0200 |
commit | 10f119ab87442a9798bdd2d375b167fca5a0c62d (patch) | |
tree | 9db1c7094b4b998fa4090169d3d59b46ad24629a /src/nvim/ex_getln.c | |
parent | f50e03f2e35cf4bee8cedb2c95bf9619f3b57bc2 (diff) | |
parent | 48f0542ad6f923443ab4bba858aae2d9558f8d76 (diff) | |
download | rneovim-10f119ab87442a9798bdd2d375b167fca5a0c62d.tar.gz rneovim-10f119ab87442a9798bdd2d375b167fca5a0c62d.tar.bz2 rneovim-10f119ab87442a9798bdd2d375b167fca5a0c62d.zip |
Merge #6539 'More cursor shape modes'
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 1affdb2fe7..eed4bf6066 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -354,6 +354,7 @@ static int command_line_check(VimState *state) quit_more = false; // reset after CTRL-D which had a more-prompt cursorcmd(); // set the cursor on the right spot + ui_cursor_shape(); return 1; } @@ -2095,6 +2096,18 @@ redraw: return (char_u *)line_ga.ga_data; } +bool cmdline_overstrike(void) +{ + return ccline.overstrike; +} + + +/// Return true if the cursor is at the end of the cmdline. +bool cmdline_at_end(void) +{ + return (ccline.cmdpos >= ccline.cmdlen); +} + /* * Allocate a new command line buffer. * Assigns the new buffer to ccline.cmdbuff and ccline.cmdbufflen. @@ -2265,6 +2278,7 @@ void putcmdline(int c, int shift) draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos); msg_no_more = FALSE; cursorcmd(); + ui_cursor_shape(); } /* @@ -2284,6 +2298,7 @@ void unputcmdline(void) draw_cmdline(ccline.cmdpos, 1); msg_no_more = FALSE; cursorcmd(); + ui_cursor_shape(); } /* @@ -2601,6 +2616,7 @@ void redrawcmdline(void) compute_cmdrow(); redrawcmd(); cursorcmd(); + ui_cursor_shape(); } static void redrawcmdprompt(void) |