Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Fixing italic bold.
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
a6b4ada
..
f48dab4
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-949,7
+949,7
@@
getsel(void) {
* st.
* FIXME: Fix the computer world.
*/
* st.
* FIXME: Fix the computer world.
*/
- if(y < sel.ne.y &&
x > 0 && !(
(gp-1)->mode & ATTR_WRAP))
+ if(y < sel.ne.y &&
!(x > 0 &&
(gp-1)->mode & ATTR_WRAP))
*ptr++ = '\n';
/*
*ptr++ = '\n';
/*
@@
-2742,7
+2742,7
@@
xloadcols(void) {
if(!XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &color, &dc.col[i]))
die("Could not allocate color %d\n", i);
}
if(!XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &color, &dc.col[i]))
die("Could not allocate color %d\n", i);
}
-
+
/* load colours [232-255] ; grayscale */
for(; i < 256; i++) {
color.red = color.green = color.blue = 0x0808 + 0x0a0a * (i-(6*6*6+16));
/* load colours [232-255] ; grayscale */
for(; i < 256; i++) {
color.red = color.green = color.blue = 0x0808 + 0x0a0a * (i-(6*6*6+16));
@@
-3143,14
+3143,19
@@
xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
if(base.mode & ATTR_BOLD) {
/*
if(base.mode & ATTR_BOLD) {
/*
- * change basic system colours [0-7]
+ * change basic system colours [0-7]
* to bright system colours [8-15]
*/
if(BETWEEN(base.fg, 0, 7))
fg = &dc.col[base.fg + 8];
* to bright system colours [8-15]
*/
if(BETWEEN(base.fg, 0, 7))
fg = &dc.col[base.fg + 8];
-
- font = &dc.bfont;
- frcflags = FRC_BOLD;
+
+ if(base.mode & ATTR_ITALIC) {
+ font = &dc.ibfont;
+ frcflags = FRC_ITALICBOLD;
+ } else {
+ font = &dc.bfont;
+ frcflags = FRC_BOLD;
+ }
}
if(IS_SET(MODE_REVERSE)) {
}
if(IS_SET(MODE_REVERSE)) {