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

Re: May I please have a block cursor in nano?



* Bob Bernstein <bob@fanatick.org> [20-12/25=Fr 20:46 -0500]:
> OF COURSE the app looks to the terminal for its cursor
> policy, and OF COURSE my terminal (mintty running in
> cygwin -- LONG story) also lacked a block cursor.

That sounds as if the problem remains unsolved.  Three solutions:

The first is based on Googling escape sequences for
mintty, but is untested since I don't run mintty.

The second is most likely to work if you run the 'screen' application
inside mintty, then control the cursor from inside screen.
It's possible that the first solution, for raw mintty, will
not work in screen, whereas the second will in screen under
mintty; obviously, I can't test under mintty, but know that
the second solution does work in screen under most terminals.

The third solution works in terminals where the terminfo
database is properly set up, which is most Unix/Linux terminals.

First solution (for mintty):
  # Define these aliases:
  alias minttycnorm="echo \$'\\e[5q'"
  alias minttycvvis="echo \$'\\e[1q'"
  # Then use the 'minttycvvis' command to switch to a block cursor,
  # and the 'minttycnorm' command to switch back.

Second solution (for screen):
  # Define these aliases:
  alias screencnorm="echo \$'\\e[34h'"
  alias screencvvis="echo \$'\\e[34l'"
  # Then use the 'screencvvis' command to switch to a block cursor,
  # and the 'screencnorm' command to switch back.

Third solution (for orthodox terminals with correct terminfo):
  # Use the command 'tput cvvis' to switch terminal to a block cursor.
  # Use the command 'tput cnorm' to switch terminal back to normal.

I suggest trying all of these.


Reply to: