aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9term/wind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/9term/wind.c')
-rw-r--r--src/cmd/9term/wind.c39
1 files changed, 32 insertions, 7 deletions
diff --git a/src/cmd/9term/wind.c b/src/cmd/9term/wind.c
index 13be22bc..da3fd2fc 100644
--- a/src/cmd/9term/wind.c
+++ b/src/cmd/9term/wind.c
@@ -104,7 +104,7 @@ wsetname(Window *w)
{
int i, n;
char err[ERRMAX];
-
+
n = sprint(w->name, "window.%d.%d", w->id, w->namecount++);
for(i='A'; i<='Z'; i++){
if(nameimage(w->i, w->name, 1) > 0)
@@ -227,7 +227,7 @@ winctl(void *arg)
crm.c2 = chancreate(sizeof(Stringpair), 0);
cwrm.c1 = chancreate(sizeof(Stringpair), 0);
cwrm.c2 = chancreate(sizeof(Stringpair), 0);
-
+
alts[WKey].c = w->ck;
alts[WKey].v = &kbdr;
@@ -806,7 +806,7 @@ wbswidth(Window *w, Rune c)
if(r == '\n'){ /* eat at most one more character */
if(q == w->q0 && c != '\r') /* eat the newline */
--q;
- break;
+ break;
}
if(c == 0x17){
eq = isalnum(r);
@@ -910,6 +910,31 @@ winborder(Window *w, Point xy)
}
void
+wlook(Window *w)
+{
+ int i, n, e;
+
+ i = w->q1;
+ n = i - w->q0;
+ e = w->nr - n;
+ if(n <= 0 || e < n)
+ return;
+
+ if(i > e)
+ i = 0;
+
+ while(runestrncmp(w->r+w->q0, w->r+i, n) != 0){
+ if(i < e)
+ i++;
+ else
+ i = 0;
+ }
+
+ wsetselect(w, i, i+n);
+ wshow(w, i);
+}
+
+void
wmousectl(Window *w)
{
int but;
@@ -1360,15 +1385,15 @@ wsetpid(Window *w, int pid, int dolabel)
}
}
-static Rune left1[] = {
+static Rune left1[] = {
'{', '[', '(', '<', 0xAB,
- 0x207d, 0x2329, 0x27e6, 0x27e8, 0x27ea,
- 0xfe59, 0xfe5b, 0xfe5d, 0xff08, 0xff3b, 0xff5b,
+ 0x207d, 0x2329, 0x27e6, 0x27e8, 0x27ea,
+ 0xfe59, 0xfe5b, 0xfe5d, 0xff08, 0xff3b, 0xff5b,
0
};
static Rune right1[] = {
'}', ']', ')', '>', 0xBB,
- 0x207e, 0x232a, 0x27e7, 0x27e9, 0x27eb,
+ 0x207e, 0x232a, 0x27e7, 0x27e9, 0x27eb,
0xfe5a, 0xfe5c, 0xfe5e, 0xff09, 0xff3d, 0xff5d,
0
};