import upstream bugfixes from chyvonomys, jxy, and knieriem; v9001-a05
This commit is contained in:
parent
232d3e06f6
commit
e7e3183672
7 changed files with 34 additions and 10 deletions
2
Toolbox
2
Toolbox
|
@ -3,6 +3,6 @@
|
||||||
[ Edit 1,$-1d ] # clear win
|
[ Edit 1,$-1d ] # clear win
|
||||||
[ Edit x/^[ ]*/ a/# / ] # comment (replace # with comment prefix)
|
[ Edit x/^[ ]*/ a/# / ] # comment (replace # with comment prefix)
|
||||||
[ Edit x/^[ ]*# ?/ x/# ?/d ] # uncomment (replace # with comment prefix)
|
[ Edit x/^[ ]*# ?/ x/# ?/d ] # uncomment (replace # with comment prefix)
|
||||||
[ Edit s/^[ ]//g ] # unindent
|
[ Edit s/^[ ][ ]//g ] # unindent
|
||||||
[ Edit s/^/ /g ] # indent
|
[ Edit s/^/ /g ] # indent
|
||||||
[ Edit x/[^\n]\n[^\n]/ s/\n/ / ] # join lines
|
[ Edit x/[^\n]\n[^\n]/ s/\n/ / ] # join lines
|
2
acme.c
2
acme.c
|
@ -43,7 +43,7 @@ Rune snarfrune[NSnarf + 1];
|
||||||
|
|
||||||
char* fontnames[2] = {PRIMARY_FONT, SECONDARY_FONT};
|
char* fontnames[2] = {PRIMARY_FONT, SECONDARY_FONT};
|
||||||
|
|
||||||
char version[] = "acme9k v9001-a04";
|
char version[] = "acme9k v9001-a05";
|
||||||
|
|
||||||
Command* command;
|
Command* command;
|
||||||
|
|
||||||
|
|
11
cols.c
11
cols.c
|
@ -240,7 +240,7 @@ void colmousebut(Column* c) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void colresize(Column* c, Rectangle r) {
|
void colresize(Column* c, Rectangle r) {
|
||||||
int i;
|
int i, old, new;
|
||||||
Rectangle r1, r2;
|
Rectangle r1, r2;
|
||||||
Window* w;
|
Window* w;
|
||||||
|
|
||||||
|
@ -258,6 +258,8 @@ void colresize(Column* c, Rectangle r) {
|
||||||
nil,
|
nil,
|
||||||
ZP);
|
ZP);
|
||||||
r1.max.y = r.max.y;
|
r1.max.y = r.max.y;
|
||||||
|
new = Dy(r) - c->nw*(Border + font->height);
|
||||||
|
old = Dy(c->r) - c->nw * (Border + font->height);
|
||||||
for (i = 0; i < c->nw; i++) {
|
for (i = 0; i < c->nw; i++) {
|
||||||
w = c->w[i];
|
w = c->w[i];
|
||||||
w->maxlines = 0;
|
w->maxlines = 0;
|
||||||
|
@ -265,8 +267,9 @@ void colresize(Column* c, Rectangle r) {
|
||||||
r1.max.y = r.max.y;
|
r1.max.y = r.max.y;
|
||||||
else {
|
else {
|
||||||
r1.max.y = r1.min.y;
|
r1.max.y = r1.min.y;
|
||||||
if (Dy(c->r) != 0) {
|
if (new > 0 && old > 0 && Dy(w->r) > font->height) {
|
||||||
r1.max.y += (Dy(w->r) + Border) * Dy(r) / Dy(c->r);
|
r1.max.y +=
|
||||||
|
(Dy(w->r) - font->height) * new / old + Border + font->height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r1.max.y = max(r1.max.y, r1.min.y + Border + font->height);
|
r1.max.y = max(r1.max.y, r1.min.y + Border + font->height);
|
||||||
|
@ -428,7 +431,7 @@ Pack:
|
||||||
if (nl[j])
|
if (nl[j])
|
||||||
r.max.y += 1 + nl[j] * v->body.fr.font->height;
|
r.max.y += 1 + nl[j] * v->body.fr.font->height;
|
||||||
r.min.y = winresize(v, r, c->safe, FALSE);
|
r.min.y = winresize(v, r, c->safe, FALSE);
|
||||||
r.max.y += Border;
|
r.max.y += r.min.y + Border;
|
||||||
draw(
|
draw(
|
||||||
screen,
|
screen,
|
||||||
r,
|
r,
|
||||||
|
|
|
@ -38,7 +38,7 @@ void frselect(Frame* f, Mousectl* mc) /* when called, button 1 is down */
|
||||||
p0 = f->p1;
|
p0 = f->p1;
|
||||||
p1 = f->p0;
|
p1 = f->p0;
|
||||||
scrled = 1;
|
scrled = 1;
|
||||||
} else if (mp.y > f->r.max.y) {
|
} else if (mp.y >= f->r.max.y - 1) {
|
||||||
(*f->scroll)(f, (mp.y - f->r.max.y) / (int)f->font->height + 1);
|
(*f->scroll)(f, (mp.y - f->r.max.y) / (int)f->font->height + 1);
|
||||||
p0 = f->p0;
|
p0 = f->p0;
|
||||||
p1 = f->p1;
|
p1 = f->p1;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
export CFLAGS="-I${PLAN9}/include"
|
|
||||||
exec acme-lsp -server '(\.c)|(\.h)|(\.cc)|(\.hh)|(\.cpp)|(\.hpp)$:clangd -log=error --background-index --limit-results=500 --completion-style=bundled'
|
if [ ! -z "$1" ]; then
|
||||||
|
workspaces="-workspaces $1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec acme-lsp -server '(\.c)|(\.h)|(\.cc)|(\.hh)|(\.cpp)|(\.hpp)$:clangd -log=error --background-index --limit-results=500 --completion-style=bundled' ${workspaces}
|
12
scripts/acsls
Executable file
12
scripts/acsls
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
:
|
||||||
|
elif [ -z "$2" ]; then
|
||||||
|
workspaces="-workspaces $1"
|
||||||
|
else
|
||||||
|
workspaces="-workspaces $2"
|
||||||
|
sln="--solution $1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec acme-lsp --server "(\.cs)|(\.sln)|(\.csproj)$:csharp-ls ${sln}" ${workspaces}
|
|
@ -1,2 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec acme-lsp -server '([/\\]go\.mod)|([/\\]go\.sum)|(\.go)$:gopls serve' -workspaces $@
|
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
workspaces="-workspaces $1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec acme-lsp -server '([/\\]go\.mod)|([/\\]go\.sum)|(\.go)$:gopls serve' ${workspaces}
|
Loading…
Reference in a new issue