st

simple terminal

git clone https://9o.is/git/st.git

commit cbfb6504d119314a676dc6f55cfe4b66aaf110f0
parent 99800a475a14aa4994537ea5ed7b005246fdf441
Author: Maurice Quennet <mjq@gmx.net>
Date:   Sat, 21 Sep 2013 23:33:56 +0200

Fix core in multi-line selection on OpenBSD

OpenBSD 5.3 amd64 release version with the most current st
version from git, crash and dump core when selecting multiple
lines whith the cursor.  This happens, because on line 964
of st.c (gp-1)->mode is accessed, although gp is still
pointing at the beginning of the array term.line[y] (see
line 939 for initialization of gp).

Diffstat:
Mst.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/st.c b/st.c @@ -962,7 +962,7 @@ selcopy(void) { * st. * FIXME: Fix the computer world. */ - if(y < sel.ne.y && !((gp-1)->mode & ATTR_WRAP)) + if(y < sel.ne.y && x > 0 && !((gp-1)->mode & ATTR_WRAP)) *ptr++ = '\n'; /*