aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoname <noname@inventati.org>2015-04-30 20:51:35 +0000
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2015-05-04 11:16:08 +0200
commit765bb0fd1420e36b04ecc03c18f01f5bda96c563 (patch)
tree7855b067ac44e05068ceb8456457316df2645d0d
parent07ce96a3a0f4a650933f5f586082cbf2064ea2c1 (diff)
downloadst-patched-765bb0fd1420e36b04ecc03c18f01f5bda96c563.tar.bz2
st-patched-765bb0fd1420e36b04ecc03c18f01f5bda96c563.tar.xz
st-patched-765bb0fd1420e36b04ecc03c18f01f5bda96c563.zip
Remove first argument of selsnap.
-rw-r--r--st.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/st.c b/st.c
index 300cab6..87f3ed2 100644
--- a/st.c
+++ b/st.c
@@ -453,7 +453,7 @@ static inline bool selected(int, int);
453static char *getsel(void); 453static char *getsel(void);
454static void selcopy(Time); 454static void selcopy(Time);
455static void selscroll(int, int); 455static void selscroll(int, int);
456static void selsnap(int, int *, int *, int); 456static void selsnap(int *, int *, int);
457static int x2col(int); 457static int x2col(int);
458static int y2row(int); 458static int y2row(int);
459static void getbuttoninfo(XEvent *); 459static void getbuttoninfo(XEvent *);
@@ -695,8 +695,8 @@ selnormalize(void) {
695 sel.nb.y = MIN(sel.ob.y, sel.oe.y); 695 sel.nb.y = MIN(sel.ob.y, sel.oe.y);
696 sel.ne.y = MAX(sel.ob.y, sel.oe.y); 696 sel.ne.y = MAX(sel.ob.y, sel.oe.y);
697 697
698 selsnap(sel.snap, &sel.nb.x, &sel.nb.y, -1); 698 selsnap(&sel.nb.x, &sel.nb.y, -1);
699 selsnap(sel.snap, &sel.ne.x, &sel.ne.y, +1); 699 selsnap(&sel.ne.x, &sel.ne.y, +1);
700 700
701 /* expand selection over line breaks */ 701 /* expand selection over line breaks */
702 if (sel.type == SEL_RECTANGULAR) 702 if (sel.type == SEL_RECTANGULAR)
@@ -720,12 +720,12 @@ selected(int x, int y) {
720} 720}
721 721
722void 722void
723selsnap(int mode, int *x, int *y, int direction) { 723selsnap(int *x, int *y, int direction) {
724 int newx, newy, xt, yt; 724 int newx, newy, xt, yt;
725 bool delim, prevdelim; 725 bool delim, prevdelim;
726 Glyph *gp, *prevgp; 726 Glyph *gp, *prevgp;
727 727
728 switch(mode) { 728 switch(sel.snap) {
729 case SNAP_WORD: 729 case SNAP_WORD:
730 /* 730 /*
731 * Snap around if the word wraps around at the end or 731 * Snap around if the word wraps around at the end or