Add new cursor types ‗ #9438

Open
opened 2026-01-31 01:54:30 +00:00 by claunia · 0 comments
Owner

Originally created by @iricigor on GitHub (Jul 4, 2020).

Description of the new feature/enhancement

Currently in cmd.exe and windows terminal we have a couple of options to customize cursor shape. It might be interesting to add additional options there, and I would propose to start with double underline.

image

Image adjusted from MS devblogs.

This would give to WT a new unique feature, which I am not aware other terminals do have. 🥇

Proposed technical implementation details (optional)

I presume, for start, it would be needed to add new shape functionality to paint.cpp, something like:

case CursorType::DoubleUnderscore:
        line1 = line2 = rcBoundaries;
        RETURN_IF_FAILED(LongAdd(line1.bottom, -1, &line1.top));
        RETURN_IF_FAILED(LongAdd(line1.bottom, -3, &line1.top));
        cursorInvertRects.push_back(line1);
        cursorInvertRects.push_back(line2);
        break;

Of course, additional code and documentation changes would be needed, but I think that should not be hard to do. 😸

Originally created by @iricigor on GitHub (Jul 4, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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 <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> Currently in cmd.exe and windows terminal we have a couple of options to [customize cursor shape](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings#cursor-settings). It might be interesting to add additional options there, and I would propose to start with **double underline**. ![image](https://user-images.githubusercontent.com/15923171/86520436-882e2300-be44-11ea-9c08-9bbc0b527125.png) _Image adjusted from [MS devblogs](https://devblogs.microsoft.com/commandline/new-experimental-console-features/)._ This would give to WT a new unique feature, which I am not aware other terminals do have. 🥇 # Proposed technical implementation details (optional) I presume, for start, it would be needed to add new shape functionality to [paint.cpp](https://github.com/microsoft/terminal/blob/396cbbb151ccd6fc9ae0356771ce1a5af5623e48/src/renderer/gdi/paint.cpp#L569), something like: ```cpp case CursorType::DoubleUnderscore: line1 = line2 = rcBoundaries; RETURN_IF_FAILED(LongAdd(line1.bottom, -1, &line1.top)); RETURN_IF_FAILED(LongAdd(line1.bottom, -3, &line1.top)); cursorInvertRects.push_back(line1); cursorInvertRects.push_back(line2); break; ``` Of course, additional code and documentation changes would be needed, but I think that should not be hard to do. 😸 <!-- A clear and concise description of what you want to happen. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9438