Technical article 114125

My cursor changes from block to an underline every time I execute the vi program.

OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

My cursor changes from block to an underline every time I execute the vi program.

Cause

This is caused by the "cnorm" capability in the "ansi" terminfo entry:

$ infocmp ansi | grep cnorm
civis=\E[=14;12C, clear=\E2J\E[H, cnorm=\E[10;12C

"cnorm" is supposed to be a sequence that sets the cursor to "normal." Unfortunately, we don't really have a "normal" setting for the cursor.

NOTE:     Users can control the setting with, for example,`setcolor -c`, which
          `will set the first and last scan lines of the cursor. The "normal"
          definition given in the terminfo entry is incorrect in a number of
          situations.
For instance, on an 80X43 console:
$ vidi e80X43 $ tput cnorm

The cursor is now invisible because scan lines 10-12 are outside the cell of the 43-line video mode. Similar problems occur in scoterm windows, which have different numbers of scan lines depending on the font.

Solution

This has been reported to engineering.
Possible workarounds:
1.  Change "cnorm" to produce a full cursor.
For example:
civis=\E[1;0C, cnorm=\E[=1;31C,

These sequences have been tested to verify that they will produce the desired result in OpenServer 5.0.5 console (80X25, 80X43 modes) and scotermi with various fonts, though not for 31 scan lines.

2.  Get rid of both "cnorm" and "civis" sequences.  This will cause
    cursors that hide to no longer do so.
This has been fixed for OpenServer 5.0.6.  You use 'scoansi' to
correct this.

From the Xinuos technical article database, record 114125. Reproduced with permission. The original is at www.sco.com/ta/114125, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.