Jacob Niehus wrote:

> I noticed the cursor shape being wrong sometimes and decided to
> finally track it down. You can make the cursor stay in normal mode
> shape without leaving insert mode as follows:
> 
> vim -u NONE -i NONE -N -c 'let &t_SI="\<Esc>[5 q"' -c 'let &t_EI="\<Esc>[1 
> q"' -c 'autocmd CompleteDone * norm! ==' -c 'call feedkeys("i\<C-n> ", "t")'
> 
> That will put you in insert mode with a normal mode cursor shape (in
> terminal Vim but not in gVim). The cursor shape is changing in
> normal.c:590 which is in the normal_cmd() function. 
> 
> One way to fix it would be to update cursor shape again after State is
> restored at the end of ex_normal() as below. I'm not sure if it should
> be fixed that way or if the existing check should be corrected
> somehow.

I can reproduce the problem.  A bit more generic is to call setmouse().
I'll include it like that.


-- 
ARTHUR:  Be quiet!
DENNIS:  Well you can't expect to wield supreme executive power just 'cause
         some watery tart threw a sword at you!
ARTHUR:  Shut up!
DENNIS:  I mean, if I went around sayin' I was an empereror just because some
         moistened bint had lobbed a scimitar at me they'd put me away!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui