projects
/
matthijs
/
master-project
/
report.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4487c5
)
Prevent pret-lam from matching subwords.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Wed, 10 Jun 2009 16:02:53 +0000
(18:02 +0200)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Wed, 10 Jun 2009 16:12:06 +0000
(18:12 +0200)
pret-lam.lua
patch
|
blob
|
history
diff --git
a/pret-lam.lua
b/pret-lam.lua
index 7bb1f8a6cab40d376b1269db23381f39b8aa0f46..a87137c0dc0b2428a1484552fe7d0357781f2fcf 100644
(file)
--- a/
pret-lam.lua
+++ b/
pret-lam.lua
@@
-56,8
+56,10
@@
function buffers.visualizers.lam.flush_line(str,nested)
end
end
if not found then
- result[#result+1] = utf.sub(str, 1, 1)
- str = utf.sub(str, 2)
+ -- Take a full word, or a single character. Taking a full word is
+ -- to prevent matching "in" in "bind" , for example.
+ result[#result+1] = utf.match(str, "^%a+") or utf.sub(str, 1, 1)
+ str = utf.sub(str, utf.len(result[#result]) + 1)
end
end
state = finish(state, result)