diff --git a/README.md b/README.md index 7505309..9670f39 100644 --- a/README.md +++ b/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 window body or tag renders the tick (aka the text cursor) with the hilight color (`COLOR__HI`); otherwise the tick is rendered with the text color (`COLOR__TX`). This is all done with a fork of `libframe` which is included in the distribution and compiled into the program. +Namely, when click-to-focus is enabled, the active text frame renders the tick (aka the text cursor) with the hilight color (`COLOR__HI`); otherwise the tick is rendered with the text color (`COLOR__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. -See the `config.def.h` for out of the box customizations that can be done. +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). [![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,7 +37,7 @@ 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 +- 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) - Run `./build.sh` from the repo root. ## install @@ -46,13 +46,12 @@ After building, run `./install.sh`; If run as a regular user, it will install to ## TODO -- [ ] 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 +- [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) - [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 diff --git a/acme.c b/acme.c index 7c1e142..a1c6e99 100644 --- a/acme.c +++ b/acme.c @@ -43,7 +43,7 @@ Rune snarfrune[NSnarf + 1]; char* fontnames[2] = {PRIMARY_FONT, SECONDARY_FONT}; -char version[] = "acme9k v9001-a02"; +char version[] = "acme9k v9001-a03"; Command* command; @@ -512,7 +512,6 @@ void mousethread(void* v) { static Alt alts[NMALT + 1]; /* make sure we don't recklessly refresh the ticks */ - int click; Text* oldbarttext; USED(v); @@ -534,7 +533,6 @@ void mousethread(void* v) { alts[NMALT].op = CHANEND; for (;;) { - click = 0; qlock(&row.lk); flushwarnings(); qunlock(&row.lk); @@ -646,7 +644,6 @@ void mousethread(void* v) { } if (m.buttons) { if (w) { - click = 1; winlock(w, 'M'); } t->eq0 = ~0; @@ -679,7 +676,7 @@ void mousethread(void* v) { } Continue: /* won't refresh ticks if scrolling didn't change the active frame! */ - if (oldbarttext != barttext && (m.buttons & (8 | 16) || click) && t) { + if (oldbarttext != barttext && (m.buttons) && t) { textsettick(t, t->row); } qunlock(&row.lk);