Discussion:
[9fans] a small Acme annoyance
(too old to reply)
l***@proxima.alt.za
2012-12-11 23:00:35 UTC
Permalink
a mis-click which touches only the vertical pipe in window tag and no other
text causes selection to be removed. seems Acme executes a null command and
replaces selection with the null result. any reason for the behavior?
Sounds unavoidable. That's where Undo helps a lot, I suppose.

What would you prefer?

++L
yy
2012-12-12 14:01:56 UTC
Permalink
Post by l***@proxima.alt.za
Sounds unavoidable.
If it really annoys you, avoiding it is actually quite easy.

Some time ago I wrote a small patch [1] to interpret the pipe symbol as
Edit when it is all the selected text (ie. when it is not followed by a
command). This is quite convenient to use the 1-2 chord with Edit commands.
You could either apply this patch or a modified version.

[1] http://9fans.net/archive/2009/08/571
--
- yiyus || JGL .
dexen deVries
2012-12-12 18:13:29 UTC
Permalink
Post by yy
[1] http://9fans.net/archive/2009/08/571
neat, thanks. a small tweak to make current GCC happy:


diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c
index ae6668c..36ad25a 100644
--- a/src/cmd/acme/exec.c
+++ b/src/cmd/acme/exec.c
@@ -95,0 +96 @@ static Rune LZerox[] = { 'Z', 'e', 'r', 'o', 'x', 0 };
+static Rune LPipe[] = { '|', 0 };
@@ -126,0 +128 @@ Exectab exectab[] = {
+ { LPipe, edit, FALSE, XXX, XXX
},
@@ -183 +185,3 @@ execute(Text *t, uint aq0, uint aq1, int external, Text
*argt)
- e = lookup(r, q1-q0);
+ e = nil;
+ if(runestrncmp(r, LPipe, 1) != 0 || q1-q0 == 1)
+ e = lookup(r, q1-q0);
--
dexen deVries

[[[↓][→]]]


Reality is just a convenient measure of complexity.
-- Alvy Ray Smith
Loading...