bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cursor style


From: Frank Heckenbach
Subject: Re: Cursor style
Date: Wed, 3 Jan 2007 03:22:09 +0100
User-agent: semail 20060101

Ricardo Cantu wrote:

> Is there a way to change the cursor style from a blinking block to a blinking 
> vertical line. I would like to do this to indicate if I'm in insert mode or 
> overstrike..

Incidentally, I use it for the same purpose ...

:        int curs_set(int visibility);
:
:        The curs_set routine sets the cursor state is set to invisible, normal,
:        or very visible for visibility equal to 0, 1, or  2  respectively.   If
:        the  terminal  supports  the  visibility requested, the previous cursor
:        state is returned; otherwise, ERR is returned.

The big if is, if the terminal supports it. The respective terminfo
capabilities are:

:        cursor_invisible              civis      vi        make cursor invisi-
:                                                           ble
:        cursor_normal                 cnorm      ve        make cursor appear
:                                                           normal (undo
:                                                           civis/cvvis)
:        cursor_visible                cvvis      vs        make cursor very
:                                                           visible

One terminal that does is the Linux console (which I mostly use) --
hardware text mode since 2.4, frame buffer console since 2.6 --
where cnorm produces a vertical line and cvvis a block.

However, since the default is usually normal visibility, and your
default seems to be the block, I guess your terminal doesn't support
it. (Which means, either it doesn't support it at all, or it needs
additional terminfo entries. If you know escape sequences to change
it, it should be possible to add them in terminfo.)

Frank

-- 
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]