Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Caret?

May
15,047
271
I posted in the Beta forum by mistake. There I said.
I'll never get used to calling it a "caret". It's blinking again bit I can't keep my 15% underscore caret in WT. The setting takes but TCC's next prompt puts the kibosh on it. That said, I can't see a caret related control sequence near the prompt when I watch with WT's "debug tap".

I see. The caret goes bad a couple seconds after the prompt is issued. Are you emitting ^e[3 q? What's the test for doing that or not?
 
If your cursor sizes (overstrike and/or insert) are set to -1, TCC won't attempt to change the cursor size at all.

Otherwise, TCC sets the cursor shape (including sending the ANSI sequence if you're in a ConPTY session & ANSI is enabled):
  • After reading TCMD.INI
  • In the break handler after a ^C or ^Break
  • After a SETDOS /S
  • At the beginning of a command line input
  • At the end of a command line edit (i.e., Enter)
  • When you press the Insert key
Everything except the Insert key resets the shape to the default. Insert toggles it between the insert & overstrike shapes.

So TCC can send a "'^e[3 q" immediately after the prompt is displayed, but not a couple of seconds after the prompt.
 
So TCC can send a "'^e[3 q" immediately after the prompt is displayed, but not a couple of seconds after the prompt.
Why can't I overcome it by sending ^e[0 q in PRE_INPUT?

Does TCC know when it's in WT? Perhaps when it is in WT it could not send any such sequence.
 
Why can't I overcome it by sending ^e[0 q in PRE_INPUT?

PRE_INPUT happens immediately before TCC enters the command line input. (And a ^e[0 q simply resets the cursor to a blinking block.)

Does TCC know when it's in WT? Perhaps when it is in WT it could not send any such sequence.

TCC does know when it's in WT. if you set your caret shape to -1,-1, TCC won't send anything. Then you'll get the WT caret you had before -- a bar, which won't change when you toggle between insert & overstrike.

But I thought the whole point of this exercise is you wanted the caret to change in WT.
 
I only want my WT-configured caret.

PRE_INPUT would not be ideal. It shows the old caret for one blink.

In TCSTART, IF ISPLUGIN _WTVER SETDOS /s-1:-1 is apparently too late. With it, the caret is off in WT.

In TCSTART, IF ISPLUGIN _WTVER (SETDOS /s-1:-1 & EMIT ^e[0 q^e[?25h) works. Is there an easier way?

You're right, I don't get the overstrike caret. That doesn't bother me (I don't use overstrike mode) but I'm confident it will bother some.
 
So - this previous message from you was not what you really want:

I don't mind the default underscore (not 15%) but it's gotta blink (as before build 19).

The TCC 36.0.21 caret is an underline and it blinks in WT (and changes shape when toggling between insert & overstrike), but you've changed your mind and don't want that anymore?

It's (very) unclear to me exactly what you do want to see. This is what TCC sends to the host (TCMD or WT), depending on the insert / overstrike %'s you set in OPTION:

// map dwSize percentage to DECSCUSR caret style:
// <= 25 -> underline (blink) ESC[3 q
// <= 50 -> bar/line (blink) ESC[5 q
// > 50 -> block (blink) ESC[1 q

So if you want a bar that never changes its shape regardless of insert / overstrike mode, set both to 50.
 
My preference would be to toggle between ^e[0 q and ^e[1 q when in WT but that wouldn't suit everyone. If users could the insert shape/blink and the overstrike shape/blink you might accommodate everyone. Could that be done easily with a second parameter for CursorIns and CursorOver?

I got what I want with TCSTART's IF PLUGIN 4WT (SETDOS /s-1:-1 & EMIT ^e[0 q^e[?25h) and a nearly trivial keyhandler for "Ins".

Am I not seeing the big picture?
 
My preference would be to toggle between ^e[0 q and ^e[1 q when in WT but that wouldn't suit everyone. If users could the insert shape/blink and the overstrike shape/blink you might accommodate everyone. Could that be done easily with a second parameter for CursorIns and CursorOver?

Since ^e[0 q and ^e[1 q do the same thing (blinking block) I don't kinow that it would satisfy anybody.

I don't understand your second sentence - I think you may have left out some words.

I got what I want with TCSTART's IF PLUGIN 4WT (SETDOS /s-1:-1 & EMIT ^e[0 q^e[?25h) and a nearly trivial keyhandler for "Ins".

Am I not seeing the big picture?

If you just want a blinking block cursor (which seems to be what you're trying to do here), just set your cursor size to 100% for insert & overwrite. You don't need plugins or key handlers.
 
Can I get my WT-configured cursor for insert mode and a blinking block for overstrike mode. AFAIK TCC would have to emit ^e[0 q to get the first of those.
 
I showed this before. In the settings for my "TCC36" WT profile ... Appearance ...

1775702617382.webp
 
I did try SETDOS /s15:100 and immediately, I saw the block cursor but I was still in insert mode. After that the mode and cursor continued to disagree. The help says insert mode comes first with SETDOS /S.
 
In WT I have these cursor options. I think ^e[0 d will give whatever I have specified.

1775706218445.webp
 
I did try SETDOS /s15:100 and immediately, I saw the block cursor but I was still in insert mode. After that the mode and cursor continued to disagree. The help says insert mode comes first with SETDOS /S.

How have you defined Edit Mode in OPTION?

The help says SETDOS /S10:100 gives you an underline overstrike cursor and a block insert cursor, which is apparently what you asked for and got. (I haven't been using SETDOS, I've been setting the values in OPTION.)
 
How have you defined Edit Mode in OPTION?

The help says SETDOS /S10:100 gives you an underline overstrike cursor and a block insert cursor, which is apparently what you asked for and got. (I haven't been using SETDOS, I've been setting the values in OPTION.)
Yeah, OK. I misread it.
 
Back
Top