Compare commits
No commits in common. "main" and "activetick" have entirely different histories.
main
...
activetick
34 changed files with 52 additions and 237 deletions
50
README.md
50
README.md
|
@ -2,9 +2,9 @@
|
|||
|
||||
This is a fork of the `acme` text editor from the `plan9port` distribution. It combines the customizability of [lumar](https://github.com/lumar)/[sminez](https://github.com/sminez/plan9port)'s forks and [acme2k](https://github.com/karahobny/acme2k) with upstream fixes from [9fans](https://github.com/9fans/plan9port) and some custom work.
|
||||
|
||||
Namely, when click-to-focus is enabled, the active text frame renders the tick (aka the text cursor) with the hilight color (`COLOR_<TAG|BODY>_HI`); otherwise the tick is rendered with the text color (`COLOR_<TAG|BODY>_TX`). This is all done with a fork of `libframe` which is included in the distribution and compiled into the program, and some simple logic that selects the proper ticks for each frame when the focus changes and forces a redraw.
|
||||
Namely, when click-to-focus is enabled, the active window body or tag renders the tick (aka the text cursor) with the hilight color (`COLOR_<TAG|BODY>_HI`); otherwise the tick is rendered with the text color (`COLOR_<TAG|BODY>_TX`). This is all done with a fork of `libframe` which is included in the distribution and compiled into the program.
|
||||
|
||||
See the `config.def.h` for out of the box customizations that can be done. Below is a screenshot of my typical setup (note I use compositing rules to make the window transparent, this is not in the scope of `acme` itself).
|
||||
See the `config.def.h` for out of the box customizations that can be done.
|
||||
|
||||
[![screenshot](./scrot.png)](./scrot.png)
|
||||
|
||||
|
@ -28,7 +28,7 @@ Keybindings are as follows:
|
|||
- PgUp/PgDown: the obvious
|
||||
- Esc: cut if there is a selection, otherwise hilight the most recently edited text
|
||||
|
||||
Users unfamiliar with `acme` in general should check the following resources:
|
||||
Users unfamiliar with acme in general should check the following resources:
|
||||
|
||||
- [Acme: A User Interface for Programmers](http://doc.cat-v.org/plan_9/4th_edition/papers/acme/) - the definitive guide from Rob Pike
|
||||
- [A Tour of Acme](https://research.swtch.com/acme) - Russ Cox giving a tour of acme on plan9port (video)
|
||||
|
@ -37,55 +37,23 @@ Users unfamiliar with `acme` in general should check the following resources:
|
|||
## build
|
||||
|
||||
- Clone this repository
|
||||
- From the repo root, if desired, copy `config.def.h` to `config.h` and make your modifications (you will almost certainly want to change the fonts; my default primary font is Sauce Code Pro Nerd Font)
|
||||
- From the repo root, if desired, copy `config.def.h` to `config.h` and make your modifications
|
||||
- Run `./build.sh` from the repo root.
|
||||
|
||||
## install
|
||||
|
||||
After building, run `./install.sh`; If run as a regular user, it will install to `~/bin/9`; if run as root, it will overwrite the systemwide `acme` in `$PLAN9/bin`
|
||||
|
||||
## helpers
|
||||
## TODO
|
||||
|
||||
The `scripts` directory contains some helpers, mostly just shortcuts for [acme-lsp](https://github.com/fhs/acme-lsp). Also shortcuts to change font size and a `Slide` utility (for presentations). Copy them to your `$PATH` and let 'em rip.
|
||||
|
||||
These work only in window tags (not column or row tags):
|
||||
|
||||
- `F+`: increase font size
|
||||
- `F-`: decrease font size
|
||||
- `Slide+`: move to the next file in the current directory (alphabetical order)
|
||||
- `Slide-`: move to the previous file in the current directory (alphabetical order)
|
||||
- `Slide`: move to the named file in the current directory (called by the previous two)
|
||||
|
||||
These will work anywhere:
|
||||
|
||||
- `agols`: pass a colon-separated list of workspaces to start `acme-lsp` for go development
|
||||
- `atsls`: pass a colon-separated list of workspaces to start `acme-lsp` for javascript/typescript development
|
||||
- `acls`: pass a colon-separated list of workspaces to start `acme-lsp` for C/C++ development
|
||||
- `acsls`: pass a colon-separated list of workspaces to start `acme-lsp` for C# development
|
||||
|
||||
For `acls` to work right with plan9port C stuff you will need to add your `$PLAN9/include` directory to the compile flags in either the project `.clangd` file or your `~/.config/clangd/config.yaml`:
|
||||
|
||||
```
|
||||
CompileFlags:
|
||||
Add:
|
||||
- "-I/usr/lib/plan9/include"
|
||||
```
|
||||
|
||||
The C# server doesn't seem to be able to handle metadata yet (eg, going to definitions that are part of the standard library or packages).
|
||||
|
||||
See also:
|
||||
|
||||
- [plumbing rules](https://nilfm.cc/git/dotfiles/tree/plumbing) - my plumbing rules, includes opening headers by right-click on the filename in an include directive
|
||||
|
||||
The `Toolbox` file contains a compilation of `sam` command language (`Edit` scripts) that may be useful.
|
||||
- [ ] allow active tick to be rendered for row/column tags, not just window body and tags
|
||||
- [ ] compile helpers
|
||||
|
||||
## thanks
|
||||
|
||||
- [rob pike](https://github.com/robpike) - author of the original `acme` for Plan9
|
||||
- [russ cox](https://research.swtch.com) and the rest of the [9fans](https://github.com/9fans) for [plan9port](https://github.com/9fans/plan9port)
|
||||
- [rob pike](https://github.com/robpike) author of the original acme for plan9
|
||||
- [russ cox](https://research.swtch.com) and the rest of the [9fans](https://github.com/9fans) for plan9port
|
||||
- [lumar](https://github.com/lumar) - looks like they deleted their github repos but I originally pulled my keybinds from there
|
||||
- [sminez](https://github.com/sminez) - possibly the original source of lumar's keybindings
|
||||
- [karahobny](https://github.com/karahobny) - creator of acme2k, a big inspiration for this project
|
||||
- [aksr](https://github.com/aksr) - source of the missing tag border pixel fix
|
||||
- [chyvonomys](https://github.com/chyvonomys) - source of a few bugfixes
|
||||
- [jxy](https://github.com/jxy) - source of the column drag window drift fix
|
||||
|
|
9
Toolbox
9
Toolbox
|
@ -1,9 +0,0 @@
|
|||
# Compiled Edit scripts
|
||||
|
||||
[ Edit 1,$-1d ] # clear win
|
||||
[ Edit x/^[ ]*/ a/# / ] # comment (replace # with comment prefix)
|
||||
[ Edit x/^[ ]*# ?/ x/# ?/d ] # uncomment (replace # with comment prefix)
|
||||
[ Edit s/^([ ][ ]|[\t]//g ] # unindent (2 spaces or tab)
|
||||
[ Edit s/^/ /g ] # indent 2 spaces
|
||||
[ Edit s/^/\t/g ] #indent tabs
|
||||
[ Edit x/[^\n]\n[^\n]/ s/\n/ / ] # join lines
|
18
acme.c
18
acme.c
|
@ -43,7 +43,7 @@ Rune snarfrune[NSnarf + 1];
|
|||
|
||||
char* fontnames[2] = {PRIMARY_FONT, SECONDARY_FONT};
|
||||
|
||||
char version[] = "acme9k v9001-b02";
|
||||
char version[] = "acme9k v9001-a02";
|
||||
|
||||
Command* command;
|
||||
|
||||
|
@ -57,6 +57,8 @@ void derror(Display* d, char* errorstr) {
|
|||
error(errorstr);
|
||||
}
|
||||
|
||||
// we need to share this btw mainthread and mousethread
|
||||
|
||||
void threadmain(int argc, char* argv[]) {
|
||||
int i;
|
||||
char *p, *loadfile;
|
||||
|
@ -510,7 +512,8 @@ void mousethread(void* v) {
|
|||
static Alt alts[NMALT + 1];
|
||||
|
||||
/* make sure we don't recklessly refresh the ticks */
|
||||
Text* oldbarttext = nil;
|
||||
int click;
|
||||
Text* oldbarttext;
|
||||
|
||||
USED(v);
|
||||
threadsetname("mousethread");
|
||||
|
@ -531,6 +534,7 @@ void mousethread(void* v) {
|
|||
alts[NMALT].op = CHANEND;
|
||||
|
||||
for (;;) {
|
||||
click = 0;
|
||||
qlock(&row.lk);
|
||||
flushwarnings();
|
||||
qunlock(&row.lk);
|
||||
|
@ -642,6 +646,7 @@ void mousethread(void* v) {
|
|||
}
|
||||
if (m.buttons) {
|
||||
if (w) {
|
||||
click = 1;
|
||||
winlock(w, 'M');
|
||||
}
|
||||
t->eq0 = ~0;
|
||||
|
@ -674,11 +679,8 @@ void mousethread(void* v) {
|
|||
}
|
||||
Continue:
|
||||
/* won't refresh ticks if scrolling didn't change the active frame! */
|
||||
if (
|
||||
(oldbarttext != barttext && (m.buttons & (8 | 16)) ||
|
||||
m.buttons & (1 | 2 | 4)) &&
|
||||
t) {
|
||||
textsettick(barttext, &row);
|
||||
if (oldbarttext != barttext && (m.buttons & (8 | 16) || click) && t) {
|
||||
textsettick(t, t->row);
|
||||
}
|
||||
qunlock(&row.lk);
|
||||
break;
|
||||
|
@ -989,7 +991,7 @@ Cursor2 boxcursor2 = {
|
|||
0xFF, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
|
||||
|
||||
void iconinit(void) {
|
||||
Rectangle r;
|
||||
Rectangle r, r1;
|
||||
Image* tmp;
|
||||
|
||||
if (tagcols[BACK] == nil) {
|
||||
|
|
34
cols.c
34
cols.c
|
@ -11,7 +11,6 @@
|
|||
#include <libsec.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
#include "config.h"
|
||||
|
||||
static Rune Lheader[] = {'N', 'e', 'w', ' ', 'C', 'u', 't', ' ', 'P', 'a',
|
||||
's', 't', 'e', ' ', 'S', 'n', 'a', 'r', 'f', ' ',
|
||||
|
@ -25,7 +24,7 @@ void colinit(Column* c, Rectangle r) {
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
c->r = r;
|
||||
|
@ -43,7 +42,7 @@ void colinit(Column* c, Rectangle r) {
|
|||
draw(
|
||||
screen,
|
||||
r1,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
textinsert(t, 0, Lheader, 38, TRUE);
|
||||
|
@ -125,7 +124,7 @@ Window* coladd(Column* c, Window* w, Window* clone, int y) {
|
|||
draw(
|
||||
screen,
|
||||
r1,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
|
||||
|
@ -193,7 +192,7 @@ Found:
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
return;
|
||||
|
@ -240,7 +239,7 @@ void colmousebut(Column* c) {
|
|||
}
|
||||
|
||||
void colresize(Column* c, Rectangle r) {
|
||||
int i, old, new;
|
||||
int i;
|
||||
Rectangle r1, r2;
|
||||
Window* w;
|
||||
|
||||
|
@ -254,12 +253,10 @@ void colresize(Column* c, Rectangle r) {
|
|||
draw(
|
||||
screen,
|
||||
r1,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
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++) {
|
||||
w = c->w[i];
|
||||
w->maxlines = 0;
|
||||
|
@ -267,9 +264,8 @@ void colresize(Column* c, Rectangle r) {
|
|||
r1.max.y = r.max.y;
|
||||
else {
|
||||
r1.max.y = r1.min.y;
|
||||
if (new > 0 && old > 0 && Dy(w->r) > font->height) {
|
||||
r1.max.y +=
|
||||
(Dy(w->r) - font->height) * new / old + Border + font->height;
|
||||
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);
|
||||
|
@ -278,7 +274,7 @@ void colresize(Column* c, Rectangle r) {
|
|||
draw(
|
||||
screen,
|
||||
r2,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
r1.min.y = r2.max.y;
|
||||
|
@ -334,7 +330,7 @@ void colsort(Column* c) {
|
|||
draw(
|
||||
screen,
|
||||
r1,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
r.min.y = r1.max.y;
|
||||
|
@ -431,11 +427,11 @@ Pack:
|
|||
if (nl[j])
|
||||
r.max.y += 1 + nl[j] * v->body.fr.font->height;
|
||||
r.min.y = winresize(v, r, c->safe, FALSE);
|
||||
r.max.y = r.min.y + Border;
|
||||
r.max.y += Border;
|
||||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
y1 = r.max.y;
|
||||
|
@ -467,7 +463,7 @@ Pack:
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
for (j = i + 1; j < c->nw; j++)
|
||||
|
@ -489,7 +485,7 @@ Pack:
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
y1 = r.max.y;
|
||||
|
@ -576,7 +572,7 @@ Found:
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
r.min.y = r.max.y;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
/* button colors: dirty file (mod) indicator and column handles */
|
||||
|
||||
#define COLOR_BTN_MD 0x1F9B92FF
|
||||
#define COLOR_BTN_CO 0x002B36FF
|
||||
#define COLOR_BTN_CO 0x586E75FF
|
||||
|
||||
/* button 2 and 3 selection colors */
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ void frselect(Frame* f, Mousectl* mc) /* when called, button 1 is down */
|
|||
p0 = f->p1;
|
||||
p1 = f->p0;
|
||||
scrled = 1;
|
||||
} else if (mp.y >= f->r.max.y - 1) {
|
||||
} else if (mp.y > f->r.max.y) {
|
||||
(*f->scroll)(f, (mp.y - f->r.max.y) / (int)f->font->height + 1);
|
||||
p0 = f->p0;
|
||||
p1 = f->p1;
|
||||
|
|
BIN
libframe/libframe.a
Normal file
BIN
libframe/libframe.a
Normal file
Binary file not shown.
3
look.c
3
look.c
|
@ -845,11 +845,10 @@ Window* openfile(Text* t, Expand* e) {
|
|||
textshow(t, r.q0, r.q1, 1);
|
||||
winsettag(t->w);
|
||||
seltext = t;
|
||||
if (e->jump) {
|
||||
if (e->jump)
|
||||
moveto(
|
||||
mousectl,
|
||||
addpt(frptofchar(&t->fr, t->fr.p0), Pt(4, font->height - 4)));
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
|
|
25
rows.c
25
rows.c
|
@ -12,7 +12,6 @@
|
|||
#include <libsec.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
#include "config.h"
|
||||
|
||||
static Rune Lcolhdr[] = {'N', 'e', 'w', 'c', 'o', 'l', ' ', 'K', 'i', 'l',
|
||||
'l', ' ', 'P', 'u', 't', 'a', 'l', 'l', ' ', 'D',
|
||||
|
@ -25,7 +24,7 @@ void rowinit(Row* row, Rectangle r) {
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
row->r = r;
|
||||
|
@ -49,7 +48,7 @@ void rowinit(Row* row, Rectangle r) {
|
|||
draw(
|
||||
screen,
|
||||
r1,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
textinsert(t, 0, Lcolhdr, 29, TRUE);
|
||||
|
@ -83,7 +82,7 @@ Column* rowadd(Row* row, Column* c, int x) {
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
r1 = r;
|
||||
|
@ -96,7 +95,7 @@ Column* rowadd(Row* row, Column* c, int x) {
|
|||
draw(
|
||||
screen,
|
||||
r1,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
r.min.x = r1.max.x;
|
||||
|
@ -133,7 +132,7 @@ void rowresize(Row* row, Rectangle r) {
|
|||
draw(
|
||||
screen,
|
||||
r1,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
r.min.y = r1.max.y;
|
||||
|
@ -153,7 +152,7 @@ void rowresize(Row* row, Rectangle r) {
|
|||
draw(
|
||||
screen,
|
||||
r2,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
r1.min.x = r2.max.x;
|
||||
|
@ -219,7 +218,7 @@ Found:
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
r.max.x = p.x;
|
||||
|
@ -231,7 +230,7 @@ Found:
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
r.min.x = r.max.x;
|
||||
|
@ -259,7 +258,7 @@ Found:
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
return;
|
||||
|
@ -275,7 +274,7 @@ Found:
|
|||
draw(
|
||||
screen,
|
||||
r,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
colresize(c, r);
|
||||
|
@ -634,7 +633,7 @@ int rowload(Row* row, char* file, int initing) {
|
|||
draw(
|
||||
screen,
|
||||
Rpt(r1.min, r2.max),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
colresize(c1, r1);
|
||||
|
@ -644,7 +643,7 @@ int rowload(Row* row, char* file, int initing) {
|
|||
draw(
|
||||
screen,
|
||||
r2,
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_EMPTY),
|
||||
allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0x222222FF),
|
||||
nil,
|
||||
ZP);
|
||||
}
|
||||
|
|
17
scripts/F+
17
scripts/F+
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
nx=1
|
||||
|
||||
if [ ! -z "$1" ]; then
|
||||
nx=$1
|
||||
fi
|
||||
|
||||
ctl=$(9p read acme/$winid/ctl)
|
||||
set -- $ctl
|
||||
size=$(echo $7 | awk -F/ '{print $5}')
|
||||
size=${size%a}
|
||||
newsize=$((size + nx))
|
||||
|
||||
newfont=$(echo $7 | sed -e s/$size/$newsize/g)
|
||||
|
||||
echo font ${newfont} | 9p write acme/${winid}/ctl
|
16
scripts/F-
16
scripts/F-
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
nx=1
|
||||
if [ ! -z "$1" ]; then
|
||||
nx=$1
|
||||
fi
|
||||
|
||||
ctl=$(9p read acme/$winid/ctl)
|
||||
set -- $ctl
|
||||
size=$(echo $7 | awk -F/ '{print $5}')
|
||||
size=${size%a}
|
||||
newsize=$((size - nx))
|
||||
|
||||
newfont=$(echo $7 | sed -e s/$size/$newsize/g)
|
||||
|
||||
echo font ${newfont} | 9p write acme/${winid}/ctl
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L assist
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L comp
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L def
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L fmt
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L hov
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L impls
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L refs
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L rn
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L sig
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L syms
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L type
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L ws
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L ws+
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec L ws-
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo name $(pwd)/$1 | 9p write acme/${winid}/ctl
|
||||
echo clean | 9p write acme/${winid}/ctl
|
||||
echo get | 9p write acme/${winid}/ctl
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
tagdata=$(9p read acme/${winid}/tag)
|
||||
set -- ${tagdata}
|
||||
path=$1
|
||||
slide=$(basename ${path})
|
||||
oldifs=${IFS}
|
||||
IFS='
|
||||
'
|
||||
|
||||
found=0
|
||||
for s in *; do
|
||||
if [ ${found} -eq 1 ]; then
|
||||
Slide ${s}
|
||||
break;
|
||||
fi
|
||||
|
||||
if [ "${s}" != "${slide}" ]; then
|
||||
continue
|
||||
else
|
||||
found=1
|
||||
fi
|
||||
done
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
tagdata=$(9p read acme/${winid}/tag)
|
||||
set -- ${tagdata}
|
||||
path=$1
|
||||
slide=$(basename ${path})
|
||||
IFS='
|
||||
'
|
||||
|
||||
for s in *; do
|
||||
if [ "${s}" != "${slide}" ]; then
|
||||
newslide=${s}
|
||||
else
|
||||
Slide ${newslide}
|
||||
break;
|
||||
fi
|
||||
done
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
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}
|
|
@ -1,12 +0,0 @@
|
|||
#!/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,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -z "$1" ]; then
|
||||
workspaces="-workspaces $1"
|
||||
fi
|
||||
|
||||
exec acme-lsp -server '([/\\]go\.mod)|([/\\]go\.sum)|(\.go)$:gopls serve' ${workspaces}
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec acme-lsp -server '(\.ts)|(\.js)|(\.jsx)|(\.tsx)$:typescript-language-server --stdio'
|
4
text.c
4
text.c
|
@ -59,14 +59,10 @@ void textsettick(Text* t, Row* r) {
|
|||
_textsettick(t, &cptr->tag);
|
||||
for (wcnt = 0; wcnt < cptr->nw; wcnt++) {
|
||||
wptr = cptr->w[wcnt];
|
||||
/*if (!wptr->isdir) {
|
||||
winlock(wptr, 'M');
|
||||
}*/
|
||||
_textsettick(t, &wptr->tag);
|
||||
_textsettick(t, &wptr->body);
|
||||
/*if (!wptr->isdir) {
|
||||
winunlock(wptr);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
/* force redraw to refresh all ticks;
|
||||
|
|
4
wind.c
4
wind.c
|
@ -219,7 +219,6 @@ int winresize(Window* w, Rectangle r, int safe, int keepextra) {
|
|||
r1.min.y = y;
|
||||
if (!safe || !eqrect(w->body.all, r1)) {
|
||||
oy = y;
|
||||
|
||||
if (y + 1 + w->body.fr.font->height <= r.max.y) { /* room for one line */
|
||||
r1.min.y = y;
|
||||
r1.max.y = y + 1;
|
||||
|
@ -228,7 +227,6 @@ int winresize(Window* w, Rectangle r, int safe, int keepextra) {
|
|||
r1.min.y = min(y, r.max.y);
|
||||
r1.max.y = r.max.y;
|
||||
} else {
|
||||
draw(screen, r1, textcols[BACK], nil, ZP);
|
||||
r1.min.y = y;
|
||||
r1.max.y = y;
|
||||
}
|
||||
|
@ -576,7 +574,7 @@ void wincommit(Window* w, Text* t) {
|
|||
for (i = 0; i < f->ntext; i++)
|
||||
textcommit(f->text[i], FALSE); /* no-op for t */
|
||||
if (t->what == Body) {
|
||||
/* winresize(w, w->r, TRUE, TRUE); */
|
||||
winresize(w, w->r, TRUE, TRUE);
|
||||
return;
|
||||
}
|
||||
r = parsetag(w, 0, &i);
|
||||
|
|
Loading…
Reference in a new issue