diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2019-01-07 21:48:38 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2019-01-07 21:48:38 +0100 |
commit | 98222694f92aeecfcbb216fd1cb835b9550aa6d6 (patch) | |
tree | 94f06e87ee4eb2145b46be89db141d82507c630d /src/cmd/acme | |
parent | d95f1bcc4938b3b0b7f832b67575e07a87095721 (diff) | |
parent | 2607cc565ee3d5facb8949e9acfed35c8ae300c9 (diff) | |
download | plan9port-98222694f92aeecfcbb216fd1cb835b9550aa6d6.tar.gz plan9port-98222694f92aeecfcbb216fd1cb835b9550aa6d6.tar.bz2 plan9port-98222694f92aeecfcbb216fd1cb835b9550aa6d6.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/acme')
-rw-r--r-- | src/cmd/acme/acme.c | 68 | ||||
-rw-r--r-- | src/cmd/acme/cols.c | 10 | ||||
-rw-r--r-- | src/cmd/acme/dat.h | 1 | ||||
-rw-r--r-- | src/cmd/acme/rows.c | 2 |
4 files changed, 77 insertions, 4 deletions
diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c index 742aabdf..12701f23 100644 --- a/src/cmd/acme/acme.c +++ b/src/cmd/acme/acme.c @@ -966,6 +966,74 @@ Cursor boxcursor = { 0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFE, 0x00, 0x00} }; +Cursor2 boxcursor2 = { + {-15, -15}, + {0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xC0, 0x03, 0xFF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 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00} +}; + void iconinit(void) { diff --git a/src/cmd/acme/cols.c b/src/cmd/acme/cols.c index 10e014ee..6215e044 100644 --- a/src/cmd/acme/cols.c +++ b/src/cmd/acme/cols.c @@ -250,8 +250,12 @@ colresize(Column *c, Rectangle r) w->maxlines = 0; if(i == c->nw-1) r1.max.y = r.max.y; - else - r1.max.y = r1.min.y+(Dy(w->r)+Border)*Dy(r)/Dy(c->r); + else{ + r1.max.y = r1.min.y; + if(Dy(c->r) != 0){ + r1.max.y += (Dy(w->r)+Border)*Dy(r)/Dy(c->r); + } + } r1.max.y = max(r1.max.y, r1.min.y + Border+font->height); r2 = r1; r2.max.y = r2.min.y+Border; @@ -473,7 +477,7 @@ coldragwin(Column *c, Window *w, int but) Column *nc; clearmouse(); - setcursor(mousectl, &boxcursor); + setcursor2(mousectl, &boxcursor, &boxcursor2); b = mouse->buttons; op = mouse->xy; while(mouse->buttons == b) diff --git a/src/cmd/acme/dat.h b/src/cmd/acme/dat.h index 451ba392..3a3d2e78 100644 --- a/src/cmd/acme/dat.h +++ b/src/cmd/acme/dat.h @@ -526,6 +526,7 @@ Image *button; Image *but2col; Image *but3col; Cursor boxcursor; +Cursor2 boxcursor2; Row row; int timerpid; Disk *disk; diff --git a/src/cmd/acme/rows.c b/src/cmd/acme/rows.c index 8cff0855..83c64594 100644 --- a/src/cmd/acme/rows.c +++ b/src/cmd/acme/rows.c @@ -148,7 +148,7 @@ rowdragcol(Row *row, Column *c, int _0) USED(_0); clearmouse(); - setcursor(mousectl, &boxcursor); + setcursor2(mousectl, &boxcursor, &boxcursor2); b = mouse->buttons; op = mouse->xy; while(mouse->buttons == b) |