mirror of
https://github.com/wez/wezterm.git
synced 2024-11-13 07:22:52 +03:00
make cursor visible when setting shape to default
If the cursor has been made invisible (by setting the shape to `Hidden`), then in order for it to be visible when it is reset to the default shape, it must be made visible. This can be done by rendering the `CursorVisible` sequence. Where supported, the `CursorNormal` sequence can be rendered to do both `CursorVisible` and `ResetCursorStyle` in one go.
This commit is contained in:
parent
073f9fb1f8
commit
4e783b3920
@ -524,8 +524,15 @@ impl TerminfoRenderer {
|
||||
}
|
||||
Change::CursorShape(shape) => match shape {
|
||||
CursorShape::Default => {
|
||||
if let Some(reset) = self.get_capability::<cap::ResetCursorStyle>() {
|
||||
reset.expand().to(out.by_ref())?;
|
||||
if let Some(normal) = self.get_capability::<cap::CursorNormal>() {
|
||||
normal.expand().to(out.by_ref())?;
|
||||
} else {
|
||||
if let Some(show) = self.get_capability::<cap::CursorVisible>() {
|
||||
show.expand().to(out.by_ref())?;
|
||||
}
|
||||
if let Some(reset) = self.get_capability::<cap::ResetCursorStyle>() {
|
||||
reset.expand().to(out.by_ref())?;
|
||||
}
|
||||
}
|
||||
}
|
||||
CursorShape::Hidden => {
|
||||
|
Loading…
Reference in New Issue
Block a user