Open TimUntersberger opened 3 years ago
If you want a vim-like cursor you also want the cursor width to follow the width of the (presumably monospace) font instead of being hard-coded. Perhaps we should have a block_cursor
option in either TextEdit
or Visuals
?
If you want a vim-like cursor you also want the cursor width to follow the width of the (presumably monospace) font instead of being hard-coded.
👍
Perhaps we should have a block_cursor option in either TextEdit or Visuals?
Maybe adding a egui::style::Visuals::text_cursor_style
method which accepts the following enum?
enum TextCursorStyle {
Bar, // default
Block
}
Please make sure there is not already a similar issue!
Is your feature request related to a problem? Please describe. I am trying to replicate the thick block cursor in terminals using a multiline TextEdit, but when increasing the cursor width it doesn't shift the start of the cursor to the right.
Edit:
I guess a vim like cursor is more what I want. Being able to have the cursor like in normal mode or insert mode.
As you can see in the image below, the cursor overlaps with the last character.
Also the width of the cursor changes depending on whether text is inside the textedit or not.
With character
Without character
Fixing the first problem will probably fix the varying cursor width problem.
Describe the solution you'd like The Cursor doesn't start at the center but at the leftmost point of the cursor.