-
Notifications
You must be signed in to change notification settings - Fork 36.7k
Add option to control width of the line cursor #41169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
| if (e.viewInfo) { | ||
| this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle; | ||
| this._lineCursorWidth = Math.min(this._context.configuration.editor.viewInfo.lineCursorWidth, this._typicalHalfwidthCharacterWidth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this._typicalHalfwidthCharacterWidth might change in next block, which makes this._lineCursorWidth out of date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
|
||
| private _prepareRender(ctx: RenderingContext): ViewCursorRenderData { | ||
| let textContent = ''; | ||
| const lineContent = this._context.model.getLineContent(this._position.lineNumber); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to put this expression still in if blocks to avoid unnecessary line content read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
The code looks good to me in general 👍 . IMHO it would be better if we have this option for cursor style block instead of line:
update |
The request is to have a vertical cursor thicker than the current line style but not as wide as the block style. |
|
Sorry for the late feedback, should we call the option If the default of |
|
@alexandrudima Done with 17b1aaf |

#41052