From e6a15b148759db4125230b5b8cfe7566d74499e5 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 17 Dec 2008 18:21:05 +1100 Subject: [PATCH] provide defaults for missing mode args to completion.{abbreviation,userMapping} --- common/content/completion.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/content/completion.js b/common/content/completion.js index 84122b06..bc81887f 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -1160,8 +1160,11 @@ function Completion() //{{{ ////////////////////// COMPLETION TYPES //////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ + // TODO: shouldn't all of these have a standard signature (context, args, ...)? --djk abbreviation: function abbreviation(context, args, mode) { + mode = mode || "!"; + if (args.completeArg == 0) { let abbreviations = editor.getAbbreviations(mode); @@ -1682,6 +1685,9 @@ function Completion() //{{{ userMapping: function userMapping(context, args, modes) { + // FIXME: have we decided on a 'standard' way to handle this clash? --djk + modes = modes || [modules.modes.NORMAL]; + if (args.completeArg == 0) { let maps = [[m.names[0], ""] for (m in mappings.getUserIterator(modes))];