Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Move window-manipulating functions into x.c
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
540b487
..
75c191d
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-165,7
+165,6
@@
static void tnewline(int);
static void tputtab(int);
static void tputc(Rune);
static void treset(void);
static void tputtab(int);
static void tputc(Rune);
static void treset(void);
-static void tresize(int, int);
static void tscrollup(int, int);
static void tscrolldown(int, int);
static void tsetattr(int *, int);
static void tscrollup(int, int);
static void tscrolldown(int, int);
static void tsetattr(int *, int);
@@
-419,24
+418,6
@@
selinit(void)
sel.clipboard = NULL;
}
sel.clipboard = NULL;
}
-int
-x2col(int x)
-{
- x -= borderpx;
- x /= win.cw;
-
- return LIMIT(x, 0, term.col-1);
-}
-
-int
-y2row(int y)
-{
- y -= borderpx;
- y /= win.ch;
-
- return LIMIT(y, 0, term.row-1);
-}
-
int
tlinelen(int y)
{
int
tlinelen(int y)
{
@@
-2620,20
+2601,3
@@
kmap(KeySym k, uint state)
return NULL;
}
return NULL;
}
-
-void
-cresize(int width, int height)
-{
- int col, row;
-
- if (width != 0)
- win.w = width;
- if (height != 0)
- win.h = height;
-
- col = (win.w - 2 * borderpx) / win.cw;
- row = (win.h - 2 * borderpx) / win.ch;
-
- tresize(col, row);
- xresize(col, row);
-}