microsoft/Terminal

cursorWidth for vertical bar

Open

#3,167 创建于 2019年10月12日

在 GitHub 查看
 (7 评论) (26 反应) (0 负责人)C++ (3,212 fork)batch import
Area-SettingsHelp WantedIssue-TaskProduct-Terminal

仓库指标

Star
 (35,764 star)
PR 合并指标
 (平均合并 27天 19小时) (30 天内合并 24 个 PR)

描述

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.

贡献者指南