summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h4
-rw-r--r--config.h8
-rw-r--r--float.patch52
-rwxr-xr-xstbin0 -> 106136 bytes
-rw-r--r--st.c10
-rw-r--r--st.h6
-rw-r--r--st.obin0 -> 82792 bytes
-rw-r--r--x.obin0 -> 73984 bytes
8 files changed, 66 insertions, 14 deletions
diff --git a/config.def.h b/config.def.h
index 8b25d40..6769f99 100644
--- a/config.def.h
+++ b/config.def.h
@@ -201,8 +201,8 @@ static Shortcut shortcuts[] = {
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
- { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
- { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
+ { ShiftMask, XK_Page_Up, kscrollup, {.f = -0.1} },
+ { ShiftMask, XK_Page_Down, kscrolldown, {.f = -0.1} },
};
/*
diff --git a/config.h b/config.h
index 1307d00..114c083 100644
--- a/config.h
+++ b/config.h
@@ -5,8 +5,8 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
-static char *font = "Gallant12:pixelsize=16:antialias=true:autohint=true";
-static int borderpx = 2;
+static char *font = "Gallant12:pixelsize=22:antialias=true:autohint=true";
+static int borderpx = 20;
/*
* What program is execed by st depends of these precedence rules:
@@ -201,8 +201,8 @@ static Shortcut shortcuts[] = {
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
- { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
- { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
+ { ShiftMask, XK_Page_Up, kscrollup, {.f = -0.1} },
+ { ShiftMask, XK_Page_Down, kscrolldown, {.f = -0.1} },
};
/*
diff --git a/float.patch b/float.patch
new file mode 100644
index 0000000..e4243dc
--- /dev/null
+++ b/float.patch
@@ -0,0 +1,52 @@
+diff --git a/config.def.h b/config.def.h
+index 8b25d40..6769f99 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -201,8 +201,8 @@ static Shortcut shortcuts[] = {
+ { TERMMOD, XK_Y, selpaste, {.i = 0} },
+ { ShiftMask, XK_Insert, selpaste, {.i = 0} },
+ { TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
+- { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
+- { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
++ { ShiftMask, XK_Page_Up, kscrollup, {.f = -0.1} },
++ { ShiftMask, XK_Page_Down, kscrolldown, {.f = -0.1} },
+ };
+
+ /*
+diff --git a/st.c b/st.c
+index a3b3c9d..5a93594 100644
+--- a/st.c
++++ b/st.c
+@@ -1087,14 +1087,14 @@ tswapscreen(void)
+ void
+ kscrollup(const Arg *a)
+ {
+- int n = a->i;
++ float n = a->f;
+
+ if (IS_SET(MODE_ALTSCREEN))
+ return;
+
+- if (n < 0) n = (-n) * term.row;
++ if (n < 0) n = MAX((-n) * term.row, 1);
+ if (n > TSCREEN.size - term.row - TSCREEN.off) n = TSCREEN.size - term.row - TSCREEN.off;
+- while (!TLINE(-n)) --n;
++ while (!TLINE((int)-n)) --n;
+ TSCREEN.off += n;
+ selscroll(0, n);
+ tfulldirt();
+@@ -1104,12 +1104,12 @@ void
+ kscrolldown(const Arg *a)
+ {
+
+- int n = a->i;
++ float n = a->f;
+
+ if (IS_SET(MODE_ALTSCREEN))
+ return;
+
+- if (n < 0) n = (-n) * term.row;
++ if (n < 0) n = MAX((-n) * term.row, 1);
+ if (n > TSCREEN.off) n = TSCREEN.off;
+ TSCREEN.off -= n;
+ selscroll(0, -n);
diff --git a/st b/st
new file mode 100755
index 0000000..fbed567
--- /dev/null
+++ b/st
Binary files differ
diff --git a/st.c b/st.c
index af45169..b034844 100644
--- a/st.c
+++ b/st.c
@@ -1087,14 +1087,14 @@ tswapscreen(void)
void
kscrollup(const Arg *a)
{
- int n = a->i;
+ float n = a->f;
if (IS_SET(MODE_ALTSCREEN))
return;
- if (n < 0) n = (-n) * term.row;
+ if (n < 0) n = MAX((-n) * term.row, 1);
if (n > TSCREEN.size - term.row - TSCREEN.off) n = TSCREEN.size - term.row - TSCREEN.off;
- while (!TLINE(-n)) --n;
+ while (!TLINE((int)-n)) --n;
TSCREEN.off += n;
selscroll(0, n);
tfulldirt();
@@ -1104,12 +1104,12 @@ void
kscrolldown(const Arg *a)
{
- int n = a->i;
+ float n = a->f;
if (IS_SET(MODE_ALTSCREEN))
return;
- if (n < 0) n = (-n) * term.row;
+ if (n < 0) n = MAX((-n) * term.row, 1);
if (n > TSCREEN.off) n = TSCREEN.off;
TSCREEN.off -= n;
selscroll(0, -n);
diff --git a/st.h b/st.h
index 3cea73b..3182fce 100644
--- a/st.h
+++ b/st.h
@@ -23,10 +23,10 @@
enum glyph_attribute {
ATTR_NULL = 0,
- ATTR_BOLD = 1 << 0,
+ ATTR_BOLD = 0 << 0,
ATTR_FAINT = 1 << 1,
- ATTR_ITALIC = 1 << 2,
- ATTR_UNDERLINE = 1 << 3,
+ ATTR_ITALIC = 0 << 2,
+ ATTR_UNDERLINE = 0 << 3,
ATTR_BLINK = 1 << 4,
ATTR_REVERSE = 1 << 5,
ATTR_INVISIBLE = 1 << 6,
diff --git a/st.o b/st.o
new file mode 100644
index 0000000..9125907
--- /dev/null
+++ b/st.o
Binary files differ
diff --git a/x.o b/x.o
new file mode 100644
index 0000000..b040c84
--- /dev/null
+++ b/x.o
Binary files differ