terminal icon indicating copy to clipboard operation
terminal copied to clipboard

cursorWidth for vertical bar

Open egmontkob opened this issue 6 years ago • 7 comments

Description of the new feature/enhancement

My preferred cursor shape is "bar", and thus I'm happy to see that this is WT's default.

(My reason is that this is what every modern application does, carrying the semantics that the cursor is between two characters rather than over one. I found that in the terminal-based apps I'm using it becomes more obvious to know e.g. the boundaries of a piece of text as I'm selecting it, without potential off-by-ones – especially when the application uses inverse colors for the selected text, and so does the terminal for its solid rectangle cursor.)

There's one big disadvantage though: It's hard to locate if your eyes don't know where to look for it.

So I propose a config option to make the bar wider, analogously to the already existing "cursorHeight" for "vintage".

(On a side note, I'm wondering why "cursorHeight" doesn't apply to "underscore" too; in fact, why these are two different cursor shapes rather than one with a different height...)

Proposed technical implementation details

A new option "cursorWidth" for the "bar" shape, or perhaps "cursorHeight" and "cursorWidth" merged into a common option.

I don't have a firm opinion whether the width should grow only to the right, or evenly to both sides. I'd probably only increase it from 1px to 2px for myself, so it doesn't really matter to me. I'd leave it to you to make a choice. In VTE it only grows to the right, mostly because we only have a 1px padding by default as opposed to your 8px, and we wouldn't want to chop it off when it's at the beginning of a line.

egmontkob avatar Oct 12 '19 15:10 egmontkob

I know we're following the system text caret width for conhost, but I'm sure we could do better here for Terminal. Thanks!

DHowett-MSFT avatar Oct 14 '19 19:10 DHowett-MSFT

Perhaps by default if no width is provided, the system value should be used?

mdtauk avatar Oct 14 '19 19:10 mdtauk

To better visualize on why it would be great to add this feature, here's what the current MS terminal's bar cursor looks like vs what VSCode's bar cursor looks like:

Vim in Microsoft Terminal

image

VSCode

image

The reason the VSCode one is thicker is because it has an option to set a custom width.

The MS Terminal bar cursor is a bit hard to see, especially if you're giving a talk / video presentation.

With #9610 on the way I have a feeling a ton of Vim users will be using a bar / block combo cursor so maybe this could get bumped up in the backlog?

nickjj avatar Mar 31 '21 22:03 nickjj

Any updates on this?

ApolloBian avatar Jun 01 '22 07:06 ApolloBian

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button? image That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

If you'd like to contribute a solution, we'd be happy to accept it and five you any pointers you might need! Feel free to ask ☺️

zadjii-msft avatar Jun 02 '22 11:06 zadjii-msft

we need this

Freddd13 avatar Jun 13 '24 02:06 Freddd13

Any updates?

gaoqiangks avatar Apr 02 '25 03:04 gaoqiangks