This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: About mode-dependent cursor


hayate:
> When I use cygwin shell or mintty wrapper I want it like real term
> emulator in Linux.

There isn't a Cygwin shell as such. What happens is that bash (or
another shell) runs in a Windows console, whereby the Cygwin DLL
provides Unix terminal functionality for the console.

And mintty isn't a wrapper (for the console?). It's a terminal
emulator much like xterm, konsole, gnome-terminal or whatever, with
the difference that it uses the Windows API instead of X11 to draw its
user interface.


> That means: If I set shell to vi editing mode, the
> cursor would be a vertical line in inserting mode, and a block in a
> command mode.

Examples please. In particular, what shell were you using?

As I already pointed out on the mintty mailing list, mintty does
implement control sequences for switching cursor type, so you need to
find a way for your shell to emit those sequences when switching
editing mode. As far as I know, though, this can't be done in bash,
but it can in zsh, although I don't know how. The bash and zsh mailing
lists would be more likely to be able to help you with this.


> ps: I know there is a way to attend this in console Vim.

This can be done in mintty and xterm (with the appropriate bit of
magic in .vimrc), but afaik not in the Cygwin console, at least not
with the Cygwin version of vim. That's because the Cygwin console does
not implement the DECSCUSR control sequence for the purpose. (An
approximate implementation of DECSCUSR could be done using
SetConsoleCursorInfo).

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]