Compare commits

..

No commits in common. "9846a56bd7fdc86bf788db04bbbcbde7b7eb9952" and "3a6d6d740110e6ee1b092d05ad746244eedabe4b" have entirely different histories.

4 changed files with 12 additions and 14 deletions

View File

@ -7,7 +7,13 @@ include config.mk
SRC = st.c x.c
OBJ = $(SRC:.c=.o)
all: st
all: options st
options:
@echo st build options:
@echo "CFLAGS = $(STCFLAGS)"
@echo "LDFLAGS = $(STLDFLAGS)"
@echo "CC = $(CC)"
config.h:
cp config.def.h config.h
@ -48,4 +54,4 @@ uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/st
rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
.PHONY: all clean dist install uninstall
.PHONY: all options clean dist install uninstall

8
st.c
View File

@ -1097,7 +1097,7 @@ tscrollup(int orig, int n)
void
selscroll(int orig, int n)
{
if (sel.ob.x == -1 || sel.alt != IS_SET(MODE_ALTSCREEN))
if (sel.ob.x == -1)
return;
if (BETWEEN(sel.nb.y, orig, term.bot) != BETWEEN(sel.ne.y, orig, term.bot)) {
@ -2330,7 +2330,6 @@ eschandle(uchar ascii)
treset();
resettitle();
xloadcols();
xsetmode(0, MODE_HIDE);
break;
case '=': /* DECPAM -- Application keypad */
xsetmode(1, MODE_APPKEYPAD);
@ -2478,10 +2477,7 @@ check_control_code:
}
if (term.c.x+width > term.col) {
if (IS_SET(MODE_WRAP))
tnewline(1);
else
tmoveto(term.col - width, term.c.y);
tnewline(1);
gp = &term.line[term.c.y][term.c.x];
}

View File

@ -184,10 +184,6 @@ st-mono| simpleterm monocolor,
# XTerm extensions
rmxx=\E[29m,
smxx=\E[9m,
BE=\E[?2004h,
BD=\E[?2004l,
PS=\E[200~,
PE=\E[201~,
# disabled rep for now: causes some issues with older ncurses versions.
# rep=%p1%c\E[%p2%{1}%-%db,
# tmux extensions, see TERMINFO EXTENSIONS in tmux(1)

4
x.c
View File

@ -818,7 +818,7 @@ xloadcols(void)
int
xgetcolor(int x, unsigned char *r, unsigned char *g, unsigned char *b)
{
if (!BETWEEN(x, 0, dc.collen - 1))
if (!BETWEEN(x, 0, dc.collen))
return 1;
*r = dc.col[x].color.red >> 8;
@ -833,7 +833,7 @@ xsetcolorname(int x, const char *name)
{
Color ncolor;
if (!BETWEEN(x, 0, dc.collen - 1))
if (!BETWEEN(x, 0, dc.collen))
return 1;
if (!xloadcolor(x, name, &ncolor))