mirror of
https://github.com/mintycube/st.git
synced 2024-10-22 14:05:49 +02:00
Restore cursor when exiting alt mode.
If the mouse cursor is changed to a bar or an underline then st will use that when the terminal is first opened. When an application that changes the cursor via escape sequences is executed, e.g. vim which uses a block cursor by default, then that cursor will remain after exiting the program. This change sets the cursor back to default when exiting alt mode.
This commit is contained in:
parent
78e025a0e7
commit
52900255d9
2
st.c
2
st.c
@ -1379,6 +1379,8 @@ tswapscreen(void)
|
|||||||
term.images_alt = im;
|
term.images_alt = im;
|
||||||
#endif // SIXEL_PATCH
|
#endif // SIXEL_PATCH
|
||||||
term.mode ^= MODE_ALTSCREEN;
|
term.mode ^= MODE_ALTSCREEN;
|
||||||
|
if (!IS_SET(MODE_ALTSCREEN))
|
||||||
|
xsetdefaultcursor();
|
||||||
tfulldirt();
|
tfulldirt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
win.h
1
win.h
@ -43,6 +43,7 @@ int xsetcolorname(int, const char *);
|
|||||||
void xseticontitle(char *);
|
void xseticontitle(char *);
|
||||||
void xsettitle(char *);
|
void xsettitle(char *);
|
||||||
int xsetcursor(int);
|
int xsetcursor(int);
|
||||||
|
void xsetdefaultcursor(void);
|
||||||
void xsetmode(int, unsigned int);
|
void xsetmode(int, unsigned int);
|
||||||
void xsetpointermotion(int);
|
void xsetpointermotion(int);
|
||||||
void xsetsel(char *);
|
void xsetsel(char *);
|
||||||
|
Loading…
Reference in New Issue
Block a user