Browse files

Update Commands/Bibliography Completion.plist

BUGFIX: TextMate 2 failed to show all available references when carat is located between a pair of empty curly braces after a cite command
  • Loading branch information...
1 parent ef4897e commit f95d2b89d1a030145e768743bb5a5e64e617ba7f @jimmyti jimmyti committed with infininight Feb 7, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 Commands/Bibliography Completion.plist
@@ -13,7 +13,9 @@ phrase =
include LaTeX
items ={|i| i.citekey + " % "+i.description}
- items = items.grep(/#{phrase}/) if phrase != ""
+ if ((phrase != "") && (phrase != "{}"))

sorbits Mar 25, 2013


This introduces & as a literal character in an XML file — it no longer parses as a valid property list!

/cc @infininight

+ items = items.grep(/#{phrase}/)

duhalde Mar 19, 2013

I beleive you mistakingly replace the surrounding carets. In my opinion they should still be there around the inserted cite-key:
\cite{} -> cite{cite-key}, while right now I end up with \citecite-key, unless I do a search for a part of a cite-key, like this:
\cite{ey} -> \cite{cite-key}.

+ end
TextMate.exit_discard if items.empty?
if items.length > 1
choice =

1 comment on commit f95d2b8


sorbits commented on f95d2b8 Jun 13, 2013

Based on the comment by @duhalde a better fix might be to change the scope selector so that only the content is passed to the command (which then doesn’t have to worry about surrounding braces).

It also appears that label completion (\ref{‸}) is affected (mailing list post).

@infininight Was there a recent scope change that may have caused these issues (don’t see any)?

Please sign in to comment.