aboutsummaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-04 12:12:31 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-04 12:12:31 +0100
commitb42c975dea7df9be883ff9c55bfe767b88ae945c (patch)
tree9e9e5b13c1574be1c632519779d52d82aa9d9c76 /st.c
parentFirst commit (diff)
downloadst-b42c975dea7df9be883ff9c55bfe767b88ae945c.tar.gz
st-b42c975dea7df9be883ff9c55bfe767b88ae945c.tar.bz2
st-b42c975dea7df9be883ff9c55bfe767b88ae945c.tar.xz
st-b42c975dea7df9be883ff9c55bfe767b88ae945c.tar.zst
st-b42c975dea7df9be883ff9c55bfe767b88ae945c.zip
Fix
Diffstat (limited to 'st.c')
-rw-r--r--st.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/st.c b/st.c
index a50b0d1..a82bb8a 100644
--- a/st.c
+++ b/st.c
@@ -841,8 +841,10 @@ ttyread(void)
switch (ret) {
case 0:
exit(0);
+ break;
case -1:
die("couldn't read from shell: %s\n", strerror(errno));
+ break;
default:
buflen += ret;
written = twrite(buf, buflen, 0);
@@ -851,7 +853,9 @@ ttyread(void)
if (buflen > 0)
memmove(buf, buf + written, buflen);
return ret;
+ break;
}
+ return ret;
}
void
@@ -2380,7 +2384,7 @@ tputc(Rune u)
{
char c[UTF_SIZ];
int control;
- int width, len;
+ int width = 0, len;
Glyph *gp;
control = ISCONTROL(u);
@@ -2838,13 +2842,16 @@ trt_kbdselect(KeySym ksym, char *buf, int len)
case XK_Escape :
if ( !in_use ) break;
selclear();
+ break;
case XK_Return :
set_notifmode(4, ksym);
term.c.x = cu.x, term.c.y = cu.y;
select_or_drawcursor(selectsearch_mode = 0, type);
in_use = quant = 0;
return MODE_KBDSELECT;
+ break;
case XK_n :
+ break;
case XK_N :
if ( ptarget )
search(selectsearch_mode, &target[0], ptarget, (ksym == XK_n) ? -1 : 1, type, &cu);
@@ -2877,6 +2884,7 @@ trt_kbdselect(KeySym ksym, char *buf, int len)
case XK_asterisk :
case XK_KP_Multiply :
term.c.x = term.col >> 1;
+ break;
case XK_underscore :
term.c.y = cu.y >> 1;
select_or_drawcursor(selectsearch_mode, type);