cursorWidth for vertical bar #4416

Open
opened 2026-01-30 23:47:16 +00:00 by claunia · 7 comments
Owner

Originally created by @egmontkob on GitHub (Oct 12, 2019).

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.

Originally created by @egmontkob on GitHub (Oct 12, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # 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.
claunia added the Help WantedArea-SettingsIssue-TaskProduct-Terminal labels 2026-01-30 23:47:16 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 14, 2019):

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 commented on GitHub (Oct 14, 2019): I know we're following the system text caret width for _conhost_, but I'm sure we could do better here for Terminal. Thanks!
Author
Owner

@mdtauk commented on GitHub (Oct 14, 2019):

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

@mdtauk commented on GitHub (Oct 14, 2019): Perhaps by default if no width is provided, the system value should be used?
Author
Owner

@nickjj commented on GitHub (Mar 31, 2021):

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 commented on GitHub (Mar 31, 2021): 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](https://user-images.githubusercontent.com/813219/113203802-7b572800-923a-11eb-8aff-49c890e43ba2.png) #### VSCode ![image](https://user-images.githubusercontent.com/813219/113204360-3aabde80-923b-11eb-8f02-10322303cdd8.png) 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?
Author
Owner

@ApolloBian commented on GitHub (Jun 1, 2022):

Any updates on this?

@ApolloBian commented on GitHub (Jun 1, 2022): Any updates on this?
Author
Owner

@zadjii-msft commented on GitHub (Jun 2, 2022):

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 commented on GitHub (Jun 2, 2022): Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button? ![image](https://user-images.githubusercontent.com/18356694/91237459-5cbb0c80-e700-11ea-9347-b9b1ec2813b1.png) 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 ☺️
Author
Owner

@Freddd13 commented on GitHub (Jun 13, 2024):

we need this

@Freddd13 commented on GitHub (Jun 13, 2024): we need this
Author
Owner

@gaoqiangks commented on GitHub (Apr 2, 2025):

Any updates?

@gaoqiangks commented on GitHub (Apr 2, 2025): Any updates?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4416