X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=f063029058663c2f865935614921d9bc342fcd57;hb=9df1e56142527de1b8917434093d25212dd9da1e;hp=bfbe799fece6de22fb32b7351f6ee50dc6b29c1d;hpb=76a8e5f72b542f230d7248c09efe202a12bc3771;p=st.git diff --git a/st.c b/st.c index bfbe799..f063029 100644 --- a/st.c +++ b/st.c @@ -2398,9 +2398,6 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { *temp, revfg, revbg; XRenderColor colfg, colbg; - if(base.mode & ATTR_REVERSE) - temp = fg, fg = bg, bg = temp; - if(base.mode & ATTR_BOLD) { if(BETWEEN(base.fg, 0, 7)) { /* basic system colors */ @@ -2450,6 +2447,9 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { } } + if(base.mode & ATTR_REVERSE) + temp = fg, fg = bg, bg = temp; + XftTextExtentsUtf8(xw.dpy, font->xft_set, (FcChar8 *)s, bytelen, &extents); width = extents.xOff; @@ -2694,6 +2694,9 @@ kpress(XEvent *ev) { selpaste(); break; case XK_Return: + if(meta) + ttywrite("\033", 1); + if(IS_SET(MODE_CRLF)) { ttywrite("\r\n", 2); } else { @@ -2742,8 +2745,6 @@ cresize(int width, int height) col = (xw.w - 2*borderpx) / xw.cw; row = (xw.h - 2*borderpx) / xw.ch; - if(col == term.col && row == term.row) - return; tresize(col, row); xresize(col, row);