aboutsummaryrefslogtreecommitdiff
path: root/plumb
diff options
context:
space:
mode:
authorRob Pike <robpike@gmail.com>2013-10-22 16:47:48 -0700
committerRob Pike <robpike@gmail.com>2013-10-22 16:47:48 -0700
commit5a69e405fcae96b476cdd7a0767e87b94c0b7266 (patch)
tree2ae94b206607d5acf664580cca5d95360e522e3b /plumb
parent075c3bdc54b5201350b88b53d5330cc6a9cc499d (diff)
downloadplan9port-5a69e405fcae96b476cdd7a0767e87b94c0b7266.tar.gz
plan9port-5a69e405fcae96b476cdd7a0767e87b94c0b7266.tar.bz2
plan9port-5a69e405fcae96b476cdd7a0767e87b94c0b7266.zip
acme: scroll a directory window when navigating if:
- the cursor is on the last line - the navigation would put the cursor over the tag of the following text R=rsc CC=smckean83 https://codereview.appspot.com/15280045
Diffstat (limited to 'plumb')
-rw-r--r--plumb/basic13
-rw-r--r--plumb/fileaddr2
2 files changed, 12 insertions, 3 deletions
diff --git a/plumb/basic b/plumb/basic
index 5ab07ec4..f728132f 100644
--- a/plumb/basic
+++ b/plumb/basic
@@ -59,9 +59,18 @@ arg isfile $0
plumb to openoffice
plumb start openoffice $file
-# existing files tagged by line number:columnumber or linenumber.columnumber, go to editor
+# existing files tagged by line number:columnumber or linenumber.columnumber, twice, go to editor
type is text
-data matches '([.a-zA-Z¡-￿0-9_/\-]*[a-zA-Z¡-￿0-9_/\-])'$twocolonaddr'
+data matches '([.a-zA-Z¡-￿0-9_/\-]*[a-zA-Z¡-￿0-9_/\-])':$twocolonaddr,$twocolonaddr
+arg isfile $1
+data set $file
+attr add addr=$2-#1+#$3,$4-#1+#$5
+plumb to edit
+plumb client $editor
+
+# existing files tagged by line number:columnumber or linenumber.columnumber, twice, go to editor
+type is text
+data matches '([.a-zA-Z¡-￿0-9_/\-]*[a-zA-Z¡-￿0-9_/\-])':$twocolonaddr
arg isfile $1
data set $file
attr add addr=$2-#1+#$3
diff --git a/plumb/fileaddr b/plumb/fileaddr
index cd2f120f..f5595bd4 100644
--- a/plumb/fileaddr
+++ b/plumb/fileaddr
@@ -1,4 +1,4 @@
addrelem='((#?[0-9]+)|(/[A-Za-z0-9_\^]+/?)|[.$])'
addr=:($addrelem([,;+\-]$addrelem)*)
-twocolonaddr = :([0-9]+)[:.]([0-9]+)
+twocolonaddr = ([0-9]+)[:.]([0-9]+)