fix introContent Display name i18n (#343)

--- app/core/utils.coffee
+++ app/core/utils.coffee
@@ -222,7 +222,7 @@
         introLevelData = introLevelsContent[c.contentId.python] || {}
       else
         introLevelData = introLevelsContent[c.contentId] || {}
-      c.displayName = introLevelData.displayName || introLevelData.name
+      c.displayName = i18n(introLevelData, 'displayName') || i18n(introLevelData, 'name')
       learningGoals = ((introLevelData.documentation || {}).specificArticles || []).find((a) => a.name == 'Learning Goals')
       if learningGoals
         c.learningGoals = i18n(learningGoals, 'body')


Add tournament links to season 4 arenas

Add tournament links to season 4 arenas


Ensure options is always an object

Ensure options is always an object

--- src/scripts/models/contents/node.coffee
+++ src/scripts/models/contents/node.coffee
@@ -46,7 +46,7 @@

       return response

-    fetch: (options) ->
+    fetch: (options = {}) ->
       if @isDraft()
         options.xhrFields = _.extend({withCredentials: true}, options.xhrFields)


Send OpenBracket and CloseBracket instead of connect & disconnectr

--- spec/Component.coffee
+++ spec/Component.coffee
@@ -1634,6 +1634,6 @@
             done()

         c.inPorts.eh.attach sin1
-        sin1.connect()
+        sin1.post new noflo.IP 'openBracket', ''
         sin1.post new noflo.IP 'data', 'moose'
-        sin1.disconnect()
+        sin1.post new noflo.IP 'closeBracket', ''


Add React Component snippet

Add React Component snippet

--- snippets.cson
+++ snippets.cson
@@ -29,7 +29,7 @@

       const $1 = () =>
         <View
-          style={styles.root}>
+          style={styles.base}>
         </View>

       $1.propTypes = {
@@ -39,10 +39,35 @@
       export default $1

       const styles = {
+        base: {}
+      }
+    """
+  'React component':
+    'prefix': 'rcomp'
+    'body': """
+      import React, { Component, PropTypes } from 'react'
+      import { View } from 'react-native-universal'
+
+      class $1 extends Component {
+        render() {
+          return (
+            <View style={styles.base}>
+            </View>
+          )
+        }
+      }
+
+      $1.propTypes = {

       }
-    """
-  'Animate component definition':
+
+      export default $1
+
+      const styles = {
+        base: {},
+      }
+  """
+  'Animated component definition':
     'prefix': 'cac'
     'body': """
       const Animated$1 = Animated.createAnimatedComponent($1)


a little more refactoring on tests

a little more refactoring on tests

--- test/phabs_test.coffee
+++ test/phabs_test.coffee
@@ -29,19 +29,20 @@
   hubotResponseCount = () ->
     room.messages.length

-  context 'without calling Phabricator class', ->
-    beforeEach ->
-      process.env.PHABRICATOR_URL = "http://example.com"
-      process.env.PHABRICATOR_API_KEY = "xxx"
-      process.env.PHABRICATOR_BOT_PHID = "PHID-USER-xxx"
-      process.env.PHABRICATOR_PROJECTS = "PHID-PROJ-xxx:proj1,PHID-PROJ-yyy:proj2"
-      room = helper.createRoom(httpd: false)
+  beforeEach ->
+    process.env.PHABRICATOR_URL = "http://example.com"
+    process.env.PHABRICATOR_API_KEY = "xxx"
+    process.env.PHABRICATOR_BOT_PHID = "PHID-USER-xxx"
+    process.env.PHABRICATOR_PROJECTS = "PHID-PROJ-xxx:proj1,PHID-PROJ-yyy:proj2"
+    room = helper.createRoom(httpd: false)

-    afterEach ->
-      delete process.env.PHABRICATOR_URL
-      delete process.env.PHABRICATOR_API_KEY
-      delete process.env.PHABRICATOR_BOT_PHID
-      delete process.env.PHABRICATOR_PROJECTS
+  afterEach ->
+    delete process.env.PHABRICATOR_URL
+    delete process.env.PHABRICATOR_API_KEY
+    delete process.env.PHABRICATOR_BOT_PHID
+    delete process.env.PHABRICATOR_PROJECTS
+
+  context 'user wants to know hubot-phabs version', ->

     context 'phab version', ->
       hubot 'phab version'
@@ -53,44 +54,32 @@
       it 'should reply version number', ->
         expect(hubotResponse()).to.match /hubot-phabs module is version [0-9]+\.[0-9]+\.[0-9]+/

+  context 'user requests the list of known projects', ->
+
     context 'phab list projects', ->
       hubot 'phab list projects'
       it 'should reply the list of known projects according to PHABRICATOR_PROJECTS', ->
         expect(hubotResponseCount()).to.eql 1
         expect(hubotResponse()).to.eql 'Known Projects: proj1, proj2'

-  context 'with calling Phabricator class', ->
+  context 'user asks for task info', ->
     beforeEach ->
-      process.env.PHABRICATOR_URL = "http://example.com"
-      process.env.PHABRICATOR_API_KEY = "xxx"
-      process.env.PHABRICATOR_BOT_PHID = "PHID-USER-xxx"
-      process.env.PHABRICATOR_PROJECTS = "PHID-PROJ-xxx:proj1,PHID-PROJ-yyy:proj2"
+      do nock.disableNetConnect
+      nock(process.env.PHABRICATOR_URL)
+        .get('/api/maniphest.info')
+        .reply( 200, { result: { status: 'open', priority: 'Low', name: 'Test task', ownerPHID: 'PHID-USER-42' }})
+        .get('/api/user.query')
+        .reply( 200, { result: [{ userName: 'toto' }]})

     afterEach ->
-      delete process.env.PHABRICATOR_URL
-      delete process.env.PHABRICATOR_API_KEY
-      delete process.env.PHABRICATOR_BOT_PHID
-      delete process.env.PHABRICATOR_PROJECTS
+      nock.cleanAll()

-    context 'user asks for task info', ->
-      beforeEach ->
-        room = helper.createRoom(httpd: false)
-        do nock.disableNetConnect
-        nock(process.env.PHABRICATOR_URL)
-          .get('/api/maniphest.info')
-          .reply( 200, { result: { status: 'open', priority: 'Low', name: 'Test task', ownerPHID: 'PHID-USER-42' }})
-          .get('/api/user.query')
-          .reply( 200, { result: [{ userName: 'toto' }]})
+    context 'phab T42', ->
+      hubot 'phab T42'
+      it "gives information about the task Txxx", ->
+        expect(hubotResponse()).to.eql 'T42 has status open, priority Low, owner toto'

-      afterEach ->
-        nock.cleanAll()
-
-      context 'phab T42', ->
-        hubot 'phab T42'
-        it "gives information about the task Txxx", ->
-          expect(hubotResponse()).to.eql 'T42 has status open, priority Low, owner toto'
-
-      context 'ph T42 # with an ending space', ->
-        hubot 'ph T42 '
-        it "gives information about the task Txxx", ->
-          expect(hubotResponse()).to.eql 'T42 has status open, priority Low, owner toto'
+    context 'ph T42 # with an ending space', ->
+      hubot 'ph T42 '
+      it "gives information about the task Txxx", ->
+        expect(hubotResponse()).to.eql 'T42 has status open, priority Low, owner toto'


:penguin: Menus: replace three period with ellipsis

to be test on runtime

--- menus/linux.cson
+++ menus/linux.cson
@@ -4,13 +4,13 @@
     submenu: [
       { label: 'New &Window', command: 'application:new-window' }
       { label: '&New File', command: 'application:new-file' }
-      { label: '&Open File...', command: 'application:open-file' }
-      { label: 'Open Folder...', command: 'application:open-folder' }
-      { label: 'Add Project Folder...', command: 'application:add-project-folder' }
+      { label: '&Open File…', command: 'application:open-file' }
+      { label: 'Open Folder…', command: 'application:open-folder' }
+      { label: 'Add Project Folder…', command: 'application:add-project-folder' }
       { label: 'Reopen Last &Item', command: 'pane:reopen-closed-item' }
       { type: 'separator' }
       { label: '&Save', command: 'core:save' }
-      { label: 'Save &As...', command: 'core:save-as' }
+      { label: 'Save &As…', command: 'core:save-as' }
       { label: 'Save A&ll', command: 'window:save-all' }
       { type: 'separator' }
       { label: '&Close Tab', command: 'core:close' }
@@ -120,7 +120,7 @@
       {
         label: 'Developer'
         submenu: [
-          { label: 'Open In &Dev Mode...', command: 'application:open-dev' }
+          { label: 'Open In &Dev Mode…', command: 'application:open-dev' }
           { label: 'Run &Atom Specs', command: 'application:run-all-specs' }
           { label: 'Run Package &Specs', command: 'window:run-package-specs' }
           { label: 'Toggle Developer &Tools', command: 'window:toggle-dev-tools' }


Add atom prefix to rootView

Add atom prefix to rootView

--- spec/pane-spec.coffee
+++ spec/pane-spec.coffee
@@ -482,13 +482,13 @@
           container.attachToDom()
           pane.focus()
           pane.remove()
-          expect(rootView.focus).toHaveBeenCalled()
+          expect(atom.rootView.focus).toHaveBeenCalled()

       describe "when the removed pane is not focused", ->
         it "does not call focus on root view", ->
           expect(pane).not.toMatchSelector ':has(:focus)'
           pane.remove()
-          expect(rootView.focus).not.toHaveBeenCalled()
+          expect(atom.rootView.focus).not.toHaveBeenCalled()

   describe ".getNextPane()", ->
     it "returns the next pane if one exists, wrapping around from the last pane to the first", ->


Setting the source will do these things

Setting the source will do these things

--- src/videojs.chromecast-component.coffee
+++ src/videojs.chromecast-component.coffee
@@ -200,17 +200,12 @@
     @removeClass "connected"

     @player_.src @player_.options_["sources"]
-    vjs.insertFirst @player_.tech.el_, @player_.el()

     # Hide the default HTML5 player controls.
     @player_.tech.setControls(false)

     # Enable user activity timeout
     @player_.options_.inactivityTimeout = @inactivityTimeout
-
-    @player_.ready ->
-      @player_.currentTime @currentMediaTime
-      @player_.play() unless @paused

     @apiMedia = null
     @apiSession = null


fix markdown realm option value in comment/any view

--- www/src/views/comment/any.coffee
+++ www/src/views/comment/any.coffee
@@ -28,7 +28,7 @@
             ".body-sv": ->
                 # TODO - make this subview optional and lazy
                 sv = new Markdown
-                    realm: @model.get "realm"
+                    realm: @options.realm
                     text: @model.get "body"
                     editable: @isOwned()
                 sv.on "change", =>


Create placeholder license and throw warning

--- src/scripts/modules/media/editbar/license/modals/license.coffee
+++ src/scripts/modules/media/editbar/license/modals/license.coffee
@@ -30,11 +30,20 @@
     setLicense: () ->
       licenses = @collection.models
       selectedValue = @$el.find('input[name="licenses"]:checked').val()
-      selectedLicense = {}
-      _.each licenses, (license) ->
+      selectedLicense = _.find licenses, (license) ->
         versionedCode = "#{license.get('code')}-#{license.get('version')}"
         if versionedCode is selectedValue
-          selectedLicense = license
+          return license
+
+      if not selectedLicense
+        selectedLicense =
+          url: "http://cnx.org"
+          code: "unknown"
+          name: "Unknown License"
+          version: "0.1"
+          isValidForPublication: false
+        console.warn "No license found matching the selected value #{selectedValue} for #{@parent.model.get('id')}"
+
       return selectedLicense

     changeLicense: () ->


Improve test setup

Improve test setup

--- test/src/test_helpers/test_helpers.coffee
+++ test/src/test_helpers/test_helpers.coffee
@@ -1,17 +1,4 @@
 helpers = Trix.TestHelpers
-
-initialized = false
-initializedCallbacks = []
-
-document.addEventListener "trix-initialize", ->
-  initialized = true
-  callback() while callback = initializedCallbacks.shift()
-
-ready = (callback) ->
-  if initialized
-    callback()
-  else
-    initializedCallbacks.push(callback)

 setFixtureHTML = (html) ->
   element = findOrCreateTrixContainer()
@@ -24,6 +11,8 @@
     document.body.insertAdjacentHTML("afterbegin", """<form id="trix-container"></form>""")
     document.getElementById("trix-container")

+ready = null
+
 helpers.extend
   testGroup: (name, options, callback) ->
     if callback?
@@ -32,11 +21,17 @@
       callback = options

     beforeEach = ->
-      if template?
-        initialized = false
-        setFixtureHTML(JST["test_helpers/fixtures/#{template}"]())
-      else
-        initialized = true
+      ready = (callback) ->
+        if template?
+          addEventListener "trix-initialize", handler = ({target}) ->
+            removeEventListener("trix-initialize", handler)
+            if target.hasAttribute("autofocus")
+              target.editor.setSelectedRange(0)
+            callback(target)
+
+          setFixtureHTML(JST["test_helpers/fixtures/#{template}"]())
+        else
+          callback()
       setup?()

     afterEach = ->
@@ -56,14 +51,14 @@
     QUnit.test name, (assert) ->
       doneAsync = assert.async()

-      done = (expectedDocumentValue) ->
-        if expectedDocumentValue
-          assert.equal getDocument().toString(), expectedDocumentValue
-        doneAsync()
-
-      ready ->
-        if getEditorElement()?.hasAttribute("autofocus")
-          getEditorController().setLocationRange(index: 0, offset: 0)
+      ready (element) ->
+        done = (expectedDocumentValue) ->
+          if element?
+            if expectedDocumentValue
+              assert.equal element.editor.getDocument().toString(), expectedDocumentValue
+            requestAnimationFrame(doneAsync)
+          else
+            doneAsync()

         if callback.length is 0
           callback()


Improved disabling of alternatives when asset is paused

--- app/client/game/play.coffee
+++ app/client/game/play.coffee
@@ -14,8 +14,6 @@

 # start playback of audio element
 playAsset = (asset, callback) ->
-  # disable alternatives
-  $('.alternative').prop 'disabled', true
   # bind audio progress
   bindAssetProgress currentAsset()
   # play asset
@@ -94,11 +92,16 @@
 Template.game.rendered = ->
   # ask if player is ready when page is loaded
   if currentGame().state is 'init' #
+    # prompt to start game
     notify
       title:   "Gør dig klar!"
       content: "Når du er klar til at spille, skal du trykke 'Starte spill!'"
       cancel:  "Gå tilbake"
       confirm: "Starte spill!"
+
+  # disable alternatives if asset is paused
+  if not currentGameFinished() and currentAsset().paused
+    $('.alternative').prop 'disabled', true

 # events


Fix issue #1472

Fix issue #1472

--- scripts/copy-i18n-tags.coffee
+++ scripts/copy-i18n-tags.coffee
@@ -1,5 +1,16 @@
 fs = require 'fs'
+path = require 'path'
 en = require('../app/locale/en').translation
+
+en_source = fs.readFileSync(path.join(__dirname, '../app/locale/en.coffee'), encoding='utf8')
+comments_map = {}
+
+comment_pattern = /^[\s\n]*([^:\n]+):\s*"[^#\n"]+"\s*#(.*)$/gm
+
+comment = []
+while (comment = comment_pattern.exec en_source)?
+    comments_map[comment[1]] = comment[2]
+
 dir = fs.readdirSync 'app/locale'
 for file in dir when not (file in ['locale.coffee', 'en.coffee'])
   contents = require('../app/locale/' + file)
@@ -16,6 +27,9 @@
       tagMissing = not cat[enTag]?
       tag = (cat[enTag] ?= enString)
       tag = tag.replace /"/g, '\\"'
-      lines.push "#{if tagMissing then '#' else ''}    #{enTag}: \"#{tag}\""
+      comment = ""
+      comment = " \##{comments_map[enTag]}" if comments_map[enTag]?
+
+      lines.push "#{if tagMissing then '#' else ''}    #{enTag}: \"#{tag}\"#{comment}"
   newContents = lines.join('\n') + '\n'
   fs.writeFileSync 'app/locale/' + file, newContents


minor reformatting all the tests so we can prepare for quote being '

--- tests.coffee
+++ tests.coffee
@@ -3,229 +3,229 @@

 tests = [
-  '1plus 1 print'
-  '1'
-
-  '(1plus 1)print'
-  '2'
-
-  '(1plus 1)print print'
-  '22'
-
-  '@a ← "test string". @b ← a. @c ← @a. @a eval print.@b eval print.@c eval print'
-  'test stringtest stringa'
-
-  '@a←5.a increment.@a←a plus 1.a print'
-  '7'
-
-  '@a←5..a increment. ...  .@a←a plus 1.a print'
-  '7'
-
-  '.@a←5..a increment. ...  .@a←a plus 1.a print.'
-  '7'
-
-  '..@a←5..a increment. ...  .@a←a plus 1.a print..'
-  '7'
-
-  '. .@a←5..a increment. ...  .@a←a plus 1.a print. .'
-  '7'
-
-  '...@a←5..a increment. ...  .@a←a plus 1.a print...'
-  '7'
-
-  '@a←5.@a←a plus 1.a increment print'
-  '7'
-
-  '@a←5plus 1.a increment print'
-  '7'
-
-  '@a←(5plus 1).a increment print'
-  '7'
-
-  '(4plus 1plus 1)print'
-  '6'
-
-  '@a←(4plus 1plus 1).a increment print'
-  '7'
-
-  '@a←(4plus(1plus 1)).a increment print'
-  '7'
-
-  '@a←((4plus 1)plus(0plus 1)).a increment print'
-  '7'
-
-  '7anotherPrint'
-  '7'
-
-  '7anotherPrinttwo'
-  '7'
-
-  '7anotherPrintthree'
-  '7'
-
-  '7doublePrint'
-  '77'
-
-  '7print print'
-  '77'
-
-  '(6doublePrint plus 1)print'
-  '667'
-
-  '6doublePrint plus 1print'
-  '661'
-
-  '(4plus 3)print'
-  '7'
-
-  '(4plus 3print)print'
-  '37'
-
-  '(4plus(2plus 1))print'
-  '7'
-
-  '4plus(2plus 1)print'
-  '7'
-
-  '4plus 2plus 1print'
-  '1'
-
-  '(@(1plus 1))print'
-  '( 1 plus 1 )'
-
-  '((@(1plus 1))eval)print'
-  '2'
-
-  '(@(1plus 1))eval print'
-  '2'
+  "1plus 1 print"
+  "1"
+
+  "(1plus 1)print"
+  "2"
+
+  "(1plus 1)print print"
+  "22"
+
+  "@a ← \"test string\". @b ← a. @c ← @a. @a eval print.@b eval print.@c eval print"
+  "test stringtest stringa"
+
+  "@a←5.a increment.@a←a plus 1.a print"
+  "7"
+
+  "@a←5..a increment. ...  .@a←a plus 1.a print"
+  "7"
+
+  ".@a←5..a increment. ...  .@a←a plus 1.a print."
+  "7"
+
+  "..@a←5..a increment. ...  .@a←a plus 1.a print.."
+  "7"
+
+  ". .@a←5..a increment. ...  .@a←a plus 1.a print. ."
+  "7"
+
+  "...@a←5..a increment. ...  .@a←a plus 1.a print..."
+  "7"
+
+  "@a←5.@a←a plus 1.a increment print"
+  "7"
+
+  "@a←5plus 1.a increment print"
+  "7"
+
+  "@a←(5plus 1).a increment print"
+  "7"
+
+  "(4plus 1plus 1)print"
+  "6"
+
+  "@a←(4plus 1plus 1).a increment print"
+  "7"
+
+  "@a←(4plus(1plus 1)).a increment print"
+  "7"
+
+  "@a←((4plus 1)plus(0plus 1)).a increment print"
+  "7"
+
+  "7anotherPrint"
+  "7"
+
+  "7anotherPrinttwo"
+  "7"
+
+  "7anotherPrintthree"
+  "7"
+
+  "7doublePrint"
+  "77"
+
+  "7print print"
+  "77"
+
+  "(6doublePrint plus 1)print"
+  "667"
+
+  "6doublePrint plus 1print"
+  "661"
+
+  "(4plus 3)print"
+  "7"
+
+  "(4plus 3print)print"
+  "37"
+
+  "(4plus(2plus 1))print"
+  "7"
+
+  "4plus(2plus 1)print"
+  "7"
+
+  "4plus 2plus 1print"
+  "1"
+
+  "(@(1plus 1))print"
+  "( 1 plus 1 )"
+
+  "((@(1plus 1))eval)print"
+  "2"
+
+  "(@(1plus 1))eval print"
+  "2"

   # in this case still the @ ties to the first element
   # that comes after it i.e. ( 1 plus 1 )
-  '@(1 plus 1)eval print'
-  '2'
-
-  '@a←5.@b←@a.b print.a print'
-  'a5'
-
-  'true negate print'
-  'false'
+  "@(1 plus 1)eval print"
+  "2"
+
+  "@a←5.@b←@a.b print.a print"
+  "a5"
+
+  "true negate print"
+  "false"

   # note how the first not understood
   # prevents any further statement to be
   # executed.
-  '1 negate. 2print'
-  '! message was not understood: ( negate )'
-
-  'negate print'
-  '! no meaning found for: negate was sent message: ( print )'
-
-  'nonExistingObject'
-  '! no meaning found for: nonExistingObject'
-
-  '1 == 1 negate. 2print'
-  '2'
-
-  '(false and false)print'
-  'false'
-
-  '(false and true)print'
-  'false'
-
-  '(true and false)print'
-  'false'
-
-  '(true and true)print'
-  'true'
-
-  '(false or false)print'
-  'false'
-
-  '(false or true)print'
-  'true'
-
-  '(true or false)print'
-  'true'
-
-  '(true or true)print'
-  'true'
-
-  '(not true)print'
-  'false'
-
-  '(not not true)print'
-  'true'
-
-  '(not not not true)print'
-  'false'
-
-  '(not not not not true)print'
-  'true'
-
-  'true⇒(1print)'
-  '1'
-
-  'false⇒(1print)2print'
-  '2'
-
-  '(0==0)print'
-  'true'
-
-  '(1==0)print'
-  'false'
-
-  '(0amIZero)print'
-  'true'
-
-  '(1amIZero)print'
-  'false'
-
-  '(8minus 1)print'
-  '7'
-
-  'true⇒(1print)2print'
-  '1'
-
-  '0factorial print'
-  '1'
-
-  '1factorial print'
-  '1'
-
-  '2factorial print'
-  '2'
-
-  '7factorial print'
-  '5040'
-
-  '0factorialtwo print'
-  '1'
-
-  '1factorialtwo print'
-  '1'
-
-  '2factorialtwo print'
-  '2'
-
-  '7factorialtwo print'
-  '5040'
-
-  '7factorialthree print'
-  '5040'
-
-  '7factorialfour print'
-  '5040'
-
-  '7factorialfive print'
-  '5040'
-
-  '7selftimesminusone print'
-  '42'
-
-  '@a←5.1printAFromDeeperCall'
-  '5'
-
-  '@a←5.repeat1((a==0)⇒(done)@a←a minus 1).a print'
-  '0'
+  "1 negate. 2print"
+  "! message was not understood: ( negate )"
+
+  "negate print"
+  "! no meaning found for: negate was sent message: ( print )"
+
+  "nonExistingObject"
+  "! no meaning found for: nonExistingObject"
+
+  "1 == 1 negate. 2print"
+  "2"
+
+  "(false and false)print"
+  "false"
+
+  "(false and true)print"
+  "false"
+
+  "(true and false)print"
+  "false"
+
+  "(true and true)print"
+  "true"
+
+  "(false or false)print"
+  "false"
+
+  "(false or true)print"
+  "true"
+
+  "(true or false)print"
+  "true"
+
+  "(true or true)print"
+  "true"
+
+  "(not true)print"
+  "false"
+
+  "(not not true)print"
+  "true"
+
+  "(not not not true)print"
+  "false"
+
+  "(not not not not true)print"
+  "true"
+
+  "true⇒(1print)"
+  "1"
+
+  "false⇒(1print)2print"
+  "2"
+
+  "(0==0)print"
+  "true"
+
+  "(1==0)print"
+  "false"
+
+  "(0amIZero)print"
+  "true"
+
+  "(1amIZero)print"
+  "false"
+
+  "(8minus 1)print"
+  "7"
+
+  "true⇒(1print)2print"
+  "1"
+
+  "0factorial print"
+  "1"
+
+  "1factorial print"
+  "1"
+
+  "2factorial print"
+  "2"
+
+  "7factorial print"
+  "5040"
+
+  "0factorialtwo print"
+  "1"
+
+  "1factorialtwo print"
+  "1"
+
+  "2factorialtwo print"
+  "2"
+
+  "7factorialtwo print"
+  "5040"
+
+  "7factorialthree print"
+  "5040"
+
+  "7factorialfour print"
+  "5040"
+
+  "7factorialfive print"
+  "5040"
+
+  "7selftimesminusone print"
+  "42"
+
+  "@a←5.1printAFromDeeperCall"
+  "5"
+
+  "@a←5.repeat1((a==0)⇒(done)@a←a minus 1).a print"
+  "0"

   """
   @a←5
@@ -236,7 +236,7 @@

   a print
   """
-  '0'
+  "0"

   """
   @a←5
@@ -246,7 +246,7 @@
   ﹍@a←a minus 1
   .a print
   """
-  '0'
+  "0"

   """
@@ -259,125 +259,125 @@

   a print
   """
-  '0'
-
-
-  '@a←5.repeat1((a==0)⇒(done)@a←a minus 1)print'
-  'Done_object'
+  "0"
+
+
+  "@a←5.repeat1((a==0)⇒(done)@a←a minus 1)print"
+  "Done_object"

   # "done" stop the execution from within a loop,
   # nothing is executed after them.
-  '@a←5.repeat1((a==0)⇒(done. 2 print)@a←a minus 1).a print'
-  '0'
-
-  '@a←5.repeat1\
-    ((a==0)⇒(done with a plus 1)@a←a minus 1)print'
-  '1'
-
-  'Class print'
-  'Class_object'
-
-  '@something←3.something print'
-  '3'
-
-  '@MyClass←Class new'
-  ''
-
-  '@MyClass←Class new.\
+  "@a←5.repeat1((a==0)⇒(done. 2 print)@a←a minus 1).a print"
+  "0"
+
+  "@a←5.repeat1\
+    ((a==0)⇒(done with a plus 1)@a←a minus 1)print"
+  "1"
+
+  "Class print"
+  "Class_object"
+
+  "@something←3.something print"
+  "3"
+
+  "@MyClass←Class new"
+  ""
+
+  "@MyClass←Class new.\
     MyClass answer(printtwo)by(self print).\
-    @myObject←MyClass new.myObject printtwo'
-  'object_from_a_user_class'
-
-  '@false←true.false⇒(1print)2print'
-  '1'
-
-  '@temp←true.@true←false.@false←temp.false⇒(1print)2print'
-  '1'
-
-  '@temp←true.@true←false.@false←temp.true⇒(1print)2print'
-  '2'
-
-  '@2←10.2print'
-  '10'
+    @myObject←MyClass new.myObject printtwo"
+  "object_from_a_user_class"
+
+  "@false←true.false⇒(1print)2print"
+  "1"
+
+  "@temp←true.@true←false.@false←temp.false⇒(1print)2print"
+  "1"
+
+  "@temp←true.@true←false.@false←temp.true⇒(1print)2print"
+  "2"
+
+  "@2←10.2print"
+  "10"

   "@ ' ← @. 'a←8.a print"
   "8"

   #'8 tdict print'
-  #'empty message'
-
-  '8 idict print'
-  'empty message'
-
-  '8 cdict print'
-  'empty message'
-
-  '(4*2)times(1print)'
-  '11111111'
-
-  'for k←(1)to(10)do(k print)'
-  '12345678910'
-
-  'for k←1to 10do(k print)'
-  '12345678910'
-
-  '8 unintelligibleMessage'
-  '! message was not understood: ( unintelligibleMessage )'
-
-  '"hello world" print'
-  'hello world'
-
-  '(@(1)+2)print'
-  '( 1 2 )'
-
-  '(@(1)+(2plus 1))print'
-  '( 1 3 )'
-
-  '(@() + "how to enclose something in a list")print'
-  '( "how to enclose something in a list" )'
+  #'empty message"
+
+  "8 idict print"
+  "empty message"
+
+  "8 cdict print"
+  "empty message"
+
+  "(4*2)times(1print)"
+  "11111111"
+
+  "for k←(1)to(10)do(k print)"
+  "12345678910"
+
+  "for k←1to 10do(k print)"
+  "12345678910"
+
+  "8 unintelligibleMessage"
+  "! message was not understood: ( unintelligibleMessage )"
+
+  "\"hello world\" print"
+  "hello world"
+
+  "(@(1)+2)print"
+  "( 1 2 )"
+
+  "(@(1)+(2plus 1))print"
+  "( 1 3 )"
+
+  "(@() + \"how to enclose something in a list\")print"
+  "( \"how to enclose something in a list\" )"

   # note that the + evaluates
   # its argument, so the passed list
   # is evaluated. If you want to pass
   # a list you need to quote it, see
   # afterwards.
-  '(@(1)+(2))print'
-  '( 1 2 )'
-
-  '(@(1)+@(2))print'
-  '( 1 ( 2 ) )'
-
-  '(@((1))+2)print'
-  '( ( 1 ) 2 )'
-
-  '(@((1))+@(2))print'
-  '( ( 1 ) ( 2 ) )'
-
-  '@myList←List new.myList print.@myList←myList+2.myList print'
-  'empty message( 2 )'
-
-  '@myString←String new.myString print.\
-    @myString←myString+"Hello ".\
-    @myString←myString+"world".\
-    myString print'
-  'Hello world'
-
-  '@MyClass←Class new.MyClass idict←counter.\
+  "(@(1)+(2))print"
+  "( 1 2 )"
+
+  "(@(1)+@(2))print"
+  "( 1 ( 2 ) )"
+
+  "(@((1))+2)print"
+  "( ( 1 ) 2 )"
+
+  "(@((1))+@(2))print"
+  "( ( 1 ) ( 2 ) )"
+
+  "@myList←List new.myList print.@myList←myList+2.myList print"
+  "empty message( 2 )"
+
+  "@myString←String new.myString print.\
+    @myString←myString+\"Hello \".\
+    @myString←myString+\"world\".\
+    myString print"
+  "Hello world"
+
+  "@MyClass←Class new.MyClass idict←counter.\
     MyClass answer(setCounterToTwo)by(@counter←2).\
     MyClass answer(printCounter)by(counter print).\
     @myObject←MyClass new.myObject printCounter.\
     myObject setCounterToTwo.myObject printCounter.\
     @myObject2←MyClass new.myObject2 printCounter.\
-    myObject2 setCounterToTwo.myObject2 printCounter'
-  'nil2nil2'
+    myObject2 setCounterToTwo.myObject2 printCounter"
+  "nil2nil2"

   "@MyClass←Class new.MyClass idict←counter.\
     MyClass answer(setCounterToTwo)by(@counter←2).\
     @myObject←MyClass new.\
     myObject setCounterToTwo.(myObject's counter)print"
-  '2'
-
-  '@MyClass←Class new.MyClass cvar classCounter ← 0.\
+  "2"
+
+  "@MyClass←Class new.MyClass cvar classCounter ← 0.\
     MyClass answer(incrementClassCounterByTwo)by(@classCounter←classCounter plus 2).\
     MyClass answer(printClassCounter)by(classCounter print).\
     @myObject←MyClass new.myObject printClassCounter.\
@@ -385,107 +385,107 @@
     myObject printClassCounter.\
     @myObject2←MyClass new.myObject2 printClassCounter.\
     myObject2 incrementClassCounterByTwo.\
-    myObject2 printClassCounter'
-  '0224'
-
-
-  'to sayHello (withName (name)) ("Hello " print. name print). sayHello withName "Dave"'
-  'Hello Dave'
-
-  'to sayHello2 ((name)) ("HELLO " print. name print). sayHello2 "Dave"'
-  'HELLO Dave'
-
-  '@( "Hello " "Dave " "my " "dear " "friend") each word do (word print)'
-  'Hello Dave my dear friend'
-
-  '@someException ← Exception new initWith "my custom error". someException print'
-  'my custom error'
+    myObject2 printClassCounter"
+  "0224"
+
+
+  "to sayHello (withName (name)) (\"Hello \" print. name print). sayHello withName \"Dave\""
+  "Hello Dave"
+
+  "to sayHello2 ((name)) (\"HELLO \" print. name print). sayHello2 \"Dave\""
+  "HELLO Dave"
+
+  "@( \"Hello \" \"Dave \" \"my \" \"dear \" \"friend\") each word do (word print)"
+  "Hello Dave my dear friend"
+
+  "@someException ← Exception new initWith \"my custom error\". someException print"
+  "my custom error"

   # wrong error to raise exceptions, they must be thrown
-  '@someException ← Exception new initWith "my custom error".\
+  "@someException ← Exception new initWith \"my custom error\".\
     try ( 1 print. someException )\
-    catch ( someException ) handle ( " caught the error I wanted" print )'
-  '1'
+    catch ( someException ) handle ( \" caught the error I wanted\" print )"
+  "1"

   # wrong error to raise exceptions, they must be thrown
-  '@someException ← Exception new initWith "my custom error".\
-    @someOtherException ← Exception new initWith "my other custom error".\
+  "@someException ← Exception new initWith \"my custom error\".\
+    @someOtherException ← Exception new initWith \"my other custom error\".\
     try ( 1 print. someException )\
-    catch ( someException ) handle ( " caught the error I wanted" print )'
-  '1'
+    catch ( someException ) handle ( \" caught the error I wanted\" print )"
+  "1"

   # wrong error to raise exceptions, they must be thrown
-  '@someException ← Exception new initWith "my custom error".\
-    @someOtherException ← Exception new initWith "my other custom error".\
+  "@someException ← Exception new initWith \"my custom error\".\
+    @someOtherException ← Exception new initWith \"my other custom error\".\
     try ( 1 print. someException )\
-    catch ( someOtherException ) handle ( " caught the error I wanted" print )'
-  '1'
+    catch ( someOtherException ) handle ( \" caught the error I wanted\" print )"
+  "1"

   # thrown exception, note how the statement after the throw is not executed.
-  '@someException ← Exception new initWith "my custom error".\
+  "@someException ← Exception new initWith \"my custom error\".\
     try ( 1 print. throw someException. 2 print )\
-    catch ( someException ) handle ( " caught the error I wanted" print )'
-  '1 caught the error I wanted'
+    catch ( someException ) handle ( \" caught the error I wanted\" print )"
+  "1 caught the error I wanted"

   # thrown exception, note how the statement after the throw is not executed.
-  '@someException ← Exception new initWith "my custom error".\
-    @someOtherException ← Exception new initWith "my other custom error".\
+  "@someException ← Exception new initWith \"my custom error\".\
+    @someOtherException ← Exception new initWith \"my other custom error\".\
     try ( 1 print. throw someException. 2 print )\
-    catch ( someException ) handle ( " caught the error I wanted" print )'
-  '1 caught the error I wanted'
+    catch ( someException ) handle ( \" caught the error I wanted\" print )"
+  "1 caught the error I wanted"

   # thrown exception, note how the statement after the throw is not executed.
-  '@someException ← Exception new initWith "my custom error".\
-    @someOtherException ← Exception new initWith "my other custom error".\
+  "@someException ← Exception new initWith \"my custom error\".\
+    @someOtherException ← Exception new initWith \"my other custom error\".\
     try ( 1 print. throw someException. 2 print )\
-    catch ( someOtherException ) handle ( " caught the error I wanted" print )'
-  '1'
+    catch ( someOtherException ) handle ( \" caught the error I wanted\" print )"
+  "1"

   # thrown exception, note how the statement after the throw is not executed.
-  '@someException ← Exception new initWith "my custom error".\
-    @someOtherException ← Exception new initWith "my other custom error".\
+  "@someException ← Exception new initWith \"my custom error\".\
+    @someOtherException ← Exception new initWith \"my other custom error\".\
     try ( 1 print. throw someOtherException. 2 print )\
-    catch ( someOtherException ) handle ( " caught the error the first time around" )\
-    catch ( someException ) handle ( " caught the error the second time around" ) print'
-  '1 caught the error the first time around'
-
-  '@someException ← Exception new initWith "my custom error".\
-    @someOtherException ← Exception new initWith "my other custom error".\
+    catch ( someOtherException ) handle ( \" caught the error the first time around\" )\
+    catch ( someException ) handle ( \" caught the error the second time around\" ) print"
+  "1 caught the error the first time around"
+
+  "@someException ← Exception new initWith \"my custom error\".\
+    @someOtherException ← Exception new initWith \"my other custom error\".\
     try ( 1 print. throw someException. 2 print )\
-    catch ( someOtherException ) handle ( " caught the error the first time around" )\
-    catch ( someException ) handle ( " caught the error the second time around" ) print'
-  '1 caught the error the second time around'
+    catch ( someOtherException ) handle ( \" caught the error the first time around\" )\
+    catch ( someException ) handle ( \" caught the error the second time around\" ) print"
+  "1 caught the error the second time around"

   # catch-all case 1
-  '@someException ← Exception new initWith "my custom error".\
-    @someOtherException ← Exception new initWith "my other custom error".\
+  "@someException ← Exception new initWith \"my custom error\".\
+    @someOtherException ← Exception new initWith \"my other custom error\".\
     try ( 1 print. throw someOtherException. 2 print )\
-    catch ( someOtherException ) handle ( " caught the error the first time around" )\
-    catch ( someException ) handle ( " caught the error the second time around" )\
-    catch all handle (" catch all branch") print'
-  '1 caught the error the first time around'
+    catch ( someOtherException ) handle ( \" caught the error the first time around\" )\
+    catch ( someException ) handle ( \" caught the error the second time around\" )\
+    catch all handle (\" catch all branch\") print"
+  "1 caught the error the first time around"

   # catch-all case 2
-  '@someException ← Exception new initWith "my custom error".\
-    @someOtherException ← Exception new initWith "my other custom error".\
+  "@someException ← Exception new initWith \"my custom error\".\
+    @someOtherException ← Exception new initWith \"my other custom error\".\
     try ( 1 print. throw someException. 2 print )\
-    catch ( someOtherException ) handle ( " caught the error the first time around" )\
-    catch ( someException ) handle ( " caught the error the second time around" )\
-    catch all handle (" catch all branch") print'
-  '1 caught the error the second time around'
+    catch ( someOtherException ) handle ( \" caught the error the first time around\" )\
+    catch ( someException ) handle ( \" caught the error the second time around\" )\
+    catch all handle (\" catch all branch\") print"
+  "1 caught the error the second time around"

   # catch-all case 3
-  '@someException ← Exception new initWith "my custom error".\
-    @someOtherException ← Exception new initWith "my other custom error".\
-    @yetAnotherException ← Exception new initWith "another custom error that is only caught by the catch all branch".\
+  "@someException ← Exception new initWith \"my custom error\".\
+    @someOtherException ← Exception new initWith \"my other custom error\".\
+    @yetAnotherException ← Exception new initWith \"another custom error that is only caught by the catch all branch\".\
     try ( 1 print. throw yetAnotherException. 2 print )\
-    catch ( someOtherException ) handle ( " caught the error the first time around" )\
-    catch ( someException ) handle ( " caught the error the second time around" )\
-    catch all handle (" catch all branch") print'
-  '1 catch all branch'
-
-  #'@ a ← 5 someUndefinedMessage'
-  #'7'
+    catch ( someOtherException ) handle ( \" caught the error the first time around\" )\
+    catch ( someException ) handle ( \" caught the error the second time around\" )\
+    catch all handle (\" catch all branch\") print"
+  "1 catch all branch"
+
+  #@ a ← 5 someUndefinedMessage'
+  #'7"

 ]


Fixed tests.

Fixed tests.

--- tests.coffee
+++ tests.coffee
@@ -8962,7 +8962,7 @@
         # Stack trace error message
         else if i.indexOf('Error: Test exception') isnt -1
           i = EJSON.parse i
-          test.isTrue i.message.indexOf('_Class.result') isnt -1, i.message
+          test.isTrue i.message.indexOf('_Class.generator') isnt -1, i.message
           test.equal i.level, 'error'
         # Invalid update error message
         else if i.indexOf('defined as an array with selector') isnt -1


Wrote test to make sure BasicModelView doesnt rerender if render_once set to true?

--- tests/src/tests.coffee
+++ tests/src/tests.coffee
@@ -37,6 +37,26 @@
 				$new_title = $element.children('#bmvsm-title').text()
 				expect(new_title).toEqual($new_title)

+		describe "Render Once Set to True", ->
+			$element = $("

")
+			$('body').append($element)
+
+			model = new TestBasicModelViewModel
+				title: 'Test Model'
+			view = new TestBasicModelView
+				className: 'guts-basicmodelview-single-model-test'
+				model: model
+				el: $element
+				render_once: true
+
+			it "Doesn't rerender when the model is changed", ->
+				original_title = model.get('title')
+				model.set('title', "I am a different title!")
+				console.log $element.children().text()
+				$current_title = $element.children('#bmvsm-title').text()
+				expect(original_title).toEqual($current_title)
+				$element.empty()
+
 		describe "Multiple Models", ->
 			$element = $("

")
 			$('body').append($element)
@@ -54,7 +74,6 @@
 						second_model: @model_two

 			it "Renders to the page", ->
-				console.log $element.children()
 				first_title = $element.children('#bmvmm-first-model-title').text()
 				second_title = $element.children('#bmvmm-second-model-title').text()
 				expect(first_title).toEqual(@model_one.get('title'))


Making tests harder.

Making tests harder.

--- tests.coffee
+++ tests.coffee
@@ -42,6 +42,8 @@

   testCollection.findEach {}, (document) ->
     Meteor._nodeCodeMustBeInFiber()
+
+    Meteor._sleepForMs 50

     correctOrder++
     if correctOrder is 1


bypass async export for force #330

bypass async export for force #330

--- chrome/content/zotero-better-bibtex/cache.coffee
+++ chrome/content/zotero-better-bibtex/cache.coffee
@@ -346,7 +346,7 @@
       Zotero.BetterBibTeX.debug('auto.process: no pending jobs')
       return

-    Zotero.BetterBibTeX.debug('auto.process: starting', ea)
+    Zotero.BetterBibTeX.debug('auto.process: starting', ae)
     @refresh()

     translation.setHandler('done', (obj, worked) ->


ProviderBaseView: if there is no addCredentialForm ignore credential operations

--- client/Main/providers/providerbaseview.coffee
+++ client/Main/providers/providerbaseview.coffee
@@ -94,7 +94,7 @@

     info "Credential selected:", value

-    if value is "_add_"
+    if value is "_add_" and @addCredentialForm?
       @instanceListView.hide()
       @credentialBox.hide()
       @addCredentialForm.setClass 'in'
@@ -118,7 +118,9 @@
     provider = @getOption 'provider'

     @addCredentialForm?.destroy()
-    @addCredentialForm = ComputeController.UI.generateAddCredentialFormFor provider
+
+    return unless @addCredentialForm = \
+      ComputeController.UI.generateAddCredentialFormFor provider

     @addCredentialForm.on "Cancel", =>
       @addCredentialForm.unsetClass 'in'
@@ -141,7 +143,8 @@

     @addSubView @header
     @addSubView new KDCustomHTMLView
-      partial : "<p>#{@getData().description}</p>"
+      tagName : "p"
+      partial : @getData().description
     @addSubView @loader
     @addSubView @content

@@ -189,7 +192,7 @@

       return if KD.showError err

-      if credentials.length is 0
+      if credentials.length is 0 and @addCredentialForm?
         @credentialBox.hide()
         @instanceListView.hide()
         @addCredentialForm.buttons.Cancel.hide()
@@ -214,7 +217,8 @@
       @credentialBox.setSelectOptions
         "Select credential..." : @_credOptions

-      @credentialBox.show()
+      @credentialBox.show()  if @addCredentialForm
+
       value = credentialKey ? @_credOptions.first.value
       @credentialBox.setValue value
       @showAvailablesFor value


Fix wrapped sizing

Fix wrapped sizing

--- app/assets/javascripts/tenon/features/tenon_content/wrapped_sizing.js.coffee
+++ app/assets/javascripts/tenon/features/tenon_content/wrapped_sizing.js.coffee
@@ -4,12 +4,16 @@

   _changeSize: (e) =>
     e.preventDefault()
-    e.stopImmediatePropagation(); # prevent closure of controls
+    e.stopImmediatePropagation() # prevent closure of controls
     @$button = $(e.currentTarget)
     operation = @$button.data('column-resize-operation')
     @$column = @_getColumn()
     $.each @_words, (i, word) =>
       @["_#{operation}From"](word, i + 1) and false if @$column.hasClass(word)
+
+    # Let the other classes know the size has changed
+    @$column.on 'transitionend MSTransitionEnd webkitTransitionEnd oTransitionEnd', =>
+      @$column.trigger('tenon.content.column_resized')

   _increaseFrom: (word, num) =>
     unless num >= @_words.length - 1


fire progress first

fire progress first

--- app/assets/javascripts/uploadcare/widget/tabs/preview-tab-multiple.js.coffee
+++ app/assets/javascripts/uploadcare/widget/tabs/preview-tab-multiple.js.coffee
@@ -31,9 +31,9 @@
       @dialogApi.fileColl.onRemove.add(@__fileRemoved, @__updateContainerView)
       @dialogApi.fileColl.onReplace.add(@__fileReplaced, @__updateContainerView)

+      @dialogApi.fileColl.onAnyProgress(@__fileProgress)
       @dialogApi.fileColl.onAnyDone(@__fileDone)
       @dialogApi.fileColl.onAnyFail(@__fileFailed)
-      @dialogApi.fileColl.onAnyProgress(@__fileProgress)

       @fileListEl.addClass(
         if @settings.imagesOnly


Put back object check just in case

Put back object check just in case

--- resources/assets/coffee/react/beatmap-discussions/new-reply.coffee
+++ resources/assets/coffee/react/beatmap-discussions/new-reply.coffee
@@ -126,7 +126,7 @@

   canReopen: =>
-    @props.discussion.current_user_attributes.can_reopen
+    @props.discussion.can_be_resolved && @props.discussion.current_user_attributes.can_reopen

   canResolve: =>


smart merge languages of asset imported from library (still hack though)

--- jsapp/xlform/src/model.inputParser.coffee
+++ jsapp/xlform/src/model.inputParser.coffee
@@ -107,7 +107,32 @@
       all the coffee code assumes first language to be null, and we don't want
       to introduce potential code-breaking refactor in old code, so we store
       first language, then replace with null and reverse this just before saving
+      NOTE: when importing assets from Library into form, we need to make sure
+      the default language is the same (or force baseSurve default language)
       ###
+      if baseSurvey
+        formDefaultLang = baseSurvey._initialParams.translations_0
+        translatedProp = o.translated[0]
+        # case 1: nothing to do - same default language in both
+        if translations[0] is formDefaultLang
+        # case 2: imported asset has form default language but not as first, so
+        # we need to reorder things
+        else if o.translations.includes(formDefaultLang)
+          defaultLangIndex = o.translations.indexOf(formDefaultLang)
+          translations.unshift(translations.pop(defaultLangIndex))
+          for row in o.survey
+            transletedPropArr = row[translatedProp]
+            if transletedPropArr
+              transletedPropArr.unshift(transletedPropArr.pop(defaultLangIndex))
+        # case 3: imported assed doesn't have form default language, so we
+        # add it as first and we force it onto the asset as the first language
+        # and duplicate first language property as default language property
+        if translations[0] isnt formDefaultLang
+          translations.unshift(formDefaultLang)
+          for row in o.survey
+            if row[translatedProp]
+              row[translatedProp].unshift(row[translatedProp][0])
+
       o.translations_0 = translations[0]
       translations[0] = null
     else


better sequence error handling

better sequence error handling

--- async/Sequence.coffee
+++ async/Sequence.coffee
@@ -270,9 +270,7 @@
                 catch error
                     res = null
                     if @_errorCallback not instanceof Function
-                        console.error "JSUtils.Sequence::_invokeNextFunction: Given function (at index #{@idx}) threw an Error!"
-                        console.warn "Here is the data:", data
-                        # console.warn "Here is the error:", error
+                        console.error "JSUtils.Sequence::_invokeNextFunction: Function at index #{@idx} caused an error!", data
                         throw error
                     else
                         @_errorCallback.call(@, error, data, @idx)


Fix a bug with s2Options in static select2 (#16)

--- vendor/assets/javascripts/auto_select2/static_select2.js.coffee
+++ vendor/assets/javascripts/auto_select2/static_select2.js.coffee
@@ -3,7 +3,7 @@
     $("select.auto-static-select2").each ->
       $input = $(this)
       return if $input.data('select2')
-      s2UserOptions = $input.data("s2options")
+      s2UserOptions = $input.data("s2-options")

       s2DefaultOptions =
         allowClear: true
@@ -36,4 +36,4 @@
   $document.on 'cocoon:after-insert', ->
     initAutoStaticSelect2()
     return
-  return+  return


Remove useless console output

Remove useless console output

--- server/code/index.coffee
+++ server/code/index.coffee
@@ -597,7 +597,6 @@
 listTools = (req, resp) ->
   #console.log "listTools real:", req.user.real.shortName, "effective:", req.user.effective.shortName
   Tool.findForUser req.user.effective.shortName, (err, tools) ->
-    console.log "API about to return"
     resp.send 200, tools

 postTool = (req, resp) ->


Remove console.logs

Remove console.logs

--- authentication.coffee
+++ authentication.coffee
@@ -6,9 +6,7 @@
 module.exports = (passport) ->
   strat_name = 'hawk-strategy'
   passport.use strat_name, new HawkStrategy (token, done)->
-    console.log(token)
     UsersController.getOneWithCredentials token, (err, user)->
-      console.log user
       if err
         return done err
       else


KodingProvider: use provided region or guess region from given regionIp or user's registeredFrom information

--- workers/social/lib/social/models/computeproviders/koding.coffee
+++ workers/social/lib/social/models/computeproviders/koding.coffee
@@ -111,10 +111,11 @@

   @create = (client, options, callback)->

-    { instanceType, label, storage, region } = options
+    { instanceType, label, storage, region, regionIp } = options
     { r: { group, user, account } } = client

     storage ?= 3
+    userIp   = regionIp or user.registeredFrom?.ip

     guessNextLabel user, group, label, (err, label)=>

@@ -131,10 +132,8 @@
           if err = checkUsage usage, userPlan, storage
             return callback err

-          region = null  unless region in SUPPORTED_REGIONS
-          region = region ? (
-            Regions.findRegion client.clientIP, SUPPORTED_REGIONS
-          ).regions[0]
+          region  = null  unless region in SUPPORTED_REGIONS
+          region ?= (Regions.findRegion userIp, SUPPORTED_REGIONS).regions[0]

           meta =
             type          : "amazon"


Add missing .push method

Add missing .push method

--- app/pages/lab/workflow.cjsx
+++ app/pages/lab/workflow.cjsx
@@ -650,7 +650,7 @@

       @props.workflow.delete().then =>
         @props.project.uncacheLink 'workflows'
-        @context.router "/lab/#{@props.project.id}"
+        @context.router.push "/lab/#{@props.project.id}"
       .catch (error) =>
         @setState deletionError: error
       .then =>


Simplify syntax and pattern-group arrangements

--- grammars/viml.cson
+++ grammars/viml.cson
@@ -3,7 +3,7 @@
 fileTypes: ["vim", "vimrc", "gvimrc"]
 foldingStartMarker: "^(?:if|while|for|fu|function|augroup|aug)"
 foldingStopMarker: "(?:endif|endwhile|endfor|endf|endfunction|augroup\\.END|aug\\.END)$"
-patterns: [{include: "#main"}]
+patterns: [include: "#main"]

 repository:
 	main:
@@ -27,8 +27,8 @@
 			{include: "#highlightGroup"}
 			{include: "#attribNames"}
 			{include: "#colourNames"}
-			{include: "#support-variable"}
-			{include: "#support-type"}
+			{include: "#supportVariable"}
+			{include: "#supportType"}
 		]

 	strings:
@@ -40,18 +40,16 @@

 	# This only exists to stop stuff like ~/.vim/ being highlighted like a regex
 	pathname:
-		patterns: [{
-			name: "constant.pathname.viml"
-			begin: "~/"
-			end: "(?=\\s)"
-		}]
+		name: "constant.pathname.viml"
+		begin: "~/"
+		end: "(?=\\s)"

 	comments:
 		patterns: [{
 			name: "comment.line.quotes.viml"
 			begin: '^\\s*(")'
 			end:   '$'
-			patterns: [{include: "#todo"}]
+			patterns: [include: "#todo"]
 			beginCaptures:
 				1: name: "punctuation.definition.comment.vim"
 		},{
@@ -74,20 +72,16 @@
 		]

 	parameter:
-		patterns: [{
-			name: "meta.parameter.viml"
-			match: "(-)(\\w+)(=)"
-			captures:
-				1: name: "punctuation.definition.parameter.viml"
-				2: name: "entity.name.parameter.viml"
-				3: name: "punctuation.assignment.parameter.viml"
-		}]
-
+		name: "meta.parameter.viml"
+		match: "(-)(\\w+)(=)"
+		captures:
+			1: name: "punctuation.definition.parameter.viml"
+			2: name: "entity.name.parameter.viml"
+			3: name: "punctuation.assignment.parameter.viml"
+
 	expr:
-		patterns: [{
-			name: "storage.function.viml"
-			match: '(\\|\\||&&|==(\\?|#)?|(!|>|<)=(#|\\?)?|(=|!)~(?!\\/)(#|\\?)?|(>|<)(#|\\?)is|isnot|\\.|\\*|\\\\|%)'
-		}]
+		name: "storage.function.viml"
+		match: '(\\|\\||&&|==(\\?|#)?|(!|>|<)=(#|\\?)?|(=|!)~(?!\\/)(#|\\?)?|(>|<)(#|\\?)is|isnot|\\.|\\*|\\\\|%)'

 	keyword:
 		patterns: [{
@@ -99,52 +93,36 @@
 		}]

 	variable:
-		patterns: [{
-			name: "variable.other.viml"
-			match: "([sSgGbBwWlLaAvV]:|[@$]|&(?!&))\\w*"
-		}]
+		name: "variable.other.viml"
+		match: "([sSgGbBwWlLaAvV]:|[@$]|&(?!&))\\w*"

 	todo:
-		patterns: [{
-			name: "support.constant.${1:/downcase}.viml"
-			match: "\\b(COMBAK|FIXME|TODO|XXX)\\b"
-		}]
+		name: "support.constant.${1:/downcase}.viml"
+		match: "\\b(COMBAK|FIXME|TODO|XXX)\\b"

 	commands:
-		patterns: [{
-			name: "support.function.command.$1.viml"
-			match: "\\b(a|ab|abc|abclear|abo|aboveleft|all?|ar|args|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|argu|argument|as|ascii|au|b|buffer|ba|ball|badd?|bd|bdelete|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bN|bNext|bo|botright|bp|bprevious|br|brewind|break?|breaka|breakadd|breakd|breakdel|breakl|breaklist|bro|browse|bufdo|buffers|bun|bunload|bw|bwipeout|c|change|cabc|cabclear|cad|caddbuffer|cadde|caddexpr|caddf|caddfile|call?|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|cdo|ce|center|cex|cexpr|cf|cfile|cfdo|cfir|cfirst|cg|cgetfile|cgetb|cgetbuffer|cgete|cgetexpr|changes|chd|chdir|che|checkpath|checkt|checktime|cl|clist|cla|clast|cle|clearjumps|clo|close|cmapc|cmapclear|cn|cnext|cN|cNext|cnew|cnewer|cnf|cnfile|cNf|cNfile|co|copy|col|colder|colo|colorscheme|com|comc|comclear|comp|compiler|con|continue|conf|confirm|copen?|cp|cprevious|cpf|cpfile|cq|cquit|cr|crewind|cs|cscope|cstag|cuna|cunabbrev|cw|cwindow|d|delete|debug|debugg|debuggreedy|delc|delcommand|delel|delep|deletel|deletep|deletl|deletp|delf|delfunction|dell|delm|delmarks|delp|dep|di|display|dif|diffupdate|diffg|diffget|diffo|diffoff|diffp|diffpatch|diffput?|diffs|diffsplit|difft|diffthis|dig|digraphs|dir|dj|djump|dl|dli|dlist|do|doau|dp|dr|drop|ds|dsearch|dsp|dsplit|e|edit|ea|earlier|ec|echoe|echoerr|echom|echomsg|echon|el|else|elseif?|em|emenu|en|endif|endf|endfunction|endfor?|endt|endtry|endw|endwhile|enew?|ex|exit?|exu|exusage|f|file|files|filet|filetype|find?|fina|finally|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoopen|folddoc|folddoclosed|foldo|foldopen|for|fu|function|g|go|goto|gr|grep|grepa|grepadd|gui|gvim|h|help|ha|hardcopy|helpc|helpclose|helpf|helpfind|helpg|helpgrep|helpt|helptags|hi|hide?|his|history|i|ia|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|intro|is|isearch|isp|isplit|iuna|iunabbrev|j|join|ju|jumps|k|kee|keepmarks|keepa|keepalt|keepj|keepjumps|keepp|keeppatterns|l|list|la|last|lad|laddexpr|laddb|laddbuffer|laddf|laddfile|lan|language|lat|later|lb|lbuffer|lcd?|lch|lchdir|lcl|lclose|lcs|lcscope|ldo?|le|left|lefta|leftabove|lex|lexpr|lf|lfile|lfdo|lfir|lfirst|lg|lgetfile|lgetb|lgetbuffer|lgete|lgetexpr|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|ll|lla|llast|lli|llist|lmake?|lmapc|lmapclear|lN|lNext|lne|lnext|lnew|lnewer|lnf|lnfile|lNf|lNfile|lo|loadview|loadk|loadkeymap|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lprevious|lpf|lpfile|lr|lrewind|ls|lt|ltag|lua|luado|luafile|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|move|ma|mark|make?|marks|mat|match|menut|menutranslate|mes|messages|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvimrc|mkview?|mode?|mz|mzscheme|mzf|mzfile|n|next|nb|nbkey|nbc|nbclose|nbs|nbstart|new|nmapc|nmapclear|noa|noautocmd|noh|nohlsearch|nor|nore|nos|noswapfile|nu|number|o|open|ol|oldfiles|omapc|omapclear|on|only|opt|options|ownsyntax|p|print|pa|packadd|packl|packloadall|pc|pclose|pe|perl|ped|pedit|perldo?|pop?|popup?|pp|ppop|pre|preserve|prev|previous|pro|prof|profile|profd|profdel|promptf|promptfind|promptr|promptrepl|ps|psearch|ptag?|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptN|ptNext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|put?|pwd?|py|python|py3|py3do|pydo|pyf|pyfile|python3|q|quit|qa|qall|quita|quitall|r|read|rec|recover|redo?|redir?|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|runtime|ruby?|rubydo?|rubyf|rubyfile|rundo|rv|rviminfo|sa|sargument|sall?|san|sandbox|sav|saveas|sb|sbuffer|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbN|sbNext|sbp|sbprevious|sbr|sbrewind|sc|sce|scg|sci|scI|scl|scp|scr|scriptnames|scripte|scriptencoding|scs|scscope|set?|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sg|sgc|sge|sgi|sgI|sgl|sgn|sgp|sgr|sh|shell|si|sI|sic|sIc|sie|sIe|sig|sIg|sign|sIl|sil|silent|sim|simalt|sin|sIn|sip|sIp|sir|sIr|sl|sleep|sla|slast|sm|smagic|sm|smap|sme|smenu|smile|sn|snext|sN|sNext|sno|snomagic|snoreme|snoremenu|so|source|sort?|sp|split|spe|spellgood|spelld|spelldump|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|spr|sprevious|sr|src|sre|srewind|srg|sri|srI|srl|srn|srp|st|stop|stag?|star|startinsert|startg|startgreplace|startr|startreplace|stj|stjump|stopi|stopinsert|sts|stselect|sun|sunhide|sunme|sunmenu|sus|suspend|sv|sview|sw|swapname|sy|syn|sync|syncbind|syntime|t|tag?|tab|tabc|tabclose|tabdo?|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnext|tabN|tabNext|tabnew|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tags|tcl?|tcldo?|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|tN|tNext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|undo|una|unabbreviate|undoj|undojoin|undol|undolist|unh|unhide|unl|unlo|unlockvar|uns|unsilent|up|update|v|ve|version|verb|verbose|vert|vertical|vi|visual|view?|vim|vimgrep|vimgrepa|vimgrepadd|viu|viusage|vmapc|vmapclear|vnew?|vs|vsplit|w|write|wa|wall|wh|while|win|winsize|winc|wincmd|windo|winp|winpos|wn|wnext|wN|wNext|wp|wprevious|wq|wqa|wqall|ws|wsverb|wundo|wv|wviminfo|x|xit|xa|xall|xmapc|xmapclear|xme|xmenu|xnoreme|xnoremenu|xprop|xunme|xunmenu|xwininfo|y|yank)\\b"
-		}]
+		name: "support.function.command.$1.viml"
+		match: "\\b(a|ab|abc|abclear|abo|aboveleft|all?|ar|args|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|argu|argument|as|ascii|au|b|buffer|ba|ball|badd?|bd|bdelete|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bN|bNext|bo|botright|bp|bprevious|br|brewind|break?|breaka|breakadd|breakd|breakdel|breakl|breaklist|bro|browse|bufdo|buffers|bun|bunload|bw|bwipeout|c|change|cabc|cabclear|cad|caddbuffer|cadde|caddexpr|caddf|caddfile|call?|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|cdo|ce|center|cex|cexpr|cf|cfile|cfdo|cfir|cfirst|cg|cgetfile|cgetb|cgetbuffer|cgete|cgetexpr|changes|chd|chdir|che|checkpath|checkt|checktime|cl|clist|cla|clast|cle|clearjumps|clo|close|cmapc|cmapclear|cn|cnext|cN|cNext|cnew|cnewer|cnf|cnfile|cNf|cNfile|co|copy|col|colder|colo|colorscheme|com|comc|comclear|comp|compiler|con|continue|conf|confirm|copen?|cp|cprevious|cpf|cpfile|cq|cquit|cr|crewind|cs|cscope|cstag|cuna|cunabbrev|cw|cwindow|d|delete|debug|debugg|debuggreedy|delc|delcommand|delel|delep|deletel|deletep|deletl|deletp|delf|delfunction|dell|delm|delmarks|delp|dep|di|display|dif|diffupdate|diffg|diffget|diffo|diffoff|diffp|diffpatch|diffput?|diffs|diffsplit|difft|diffthis|dig|digraphs|dir|dj|djump|dl|dli|dlist|do|doau|dp|dr|drop|ds|dsearch|dsp|dsplit|e|edit|ea|earlier|ec|echoe|echoerr|echom|echomsg|echon|el|else|elseif?|em|emenu|en|endif|endf|endfunction|endfor?|endt|endtry|endw|endwhile|enew?|ex|exit?|exu|exusage|f|file|files|filet|filetype|find?|fina|finally|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoopen|folddoc|folddoclosed|foldo|foldopen|for|fu|function|g|go|goto|gr|grep|grepa|grepadd|gui|gvim|h|help|ha|hardcopy|helpc|helpclose|helpf|helpfind|helpg|helpgrep|helpt|helptags|hi|hide?|his|history|i|ia|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|intro|is|isearch|isp|isplit|iuna|iunabbrev|j|join|ju|jumps|k|kee|keepmarks|keepa|keepalt|keepj|keepjumps|keepp|keeppatterns|l|list|la|last|lad|laddexpr|laddb|laddbuffer|laddf|laddfile|lan|language|lat|later|lb|lbuffer|lcd?|lch|lchdir|lcl|lclose|lcs|lcscope|ldo?|le|left|lefta|leftabove|lex|lexpr|lf|lfile|lfdo|lfir|lfirst|lg|lgetfile|lgetb|lgetbuffer|lgete|lgetexpr|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|ll|lla|llast|lli|llist|lmake?|lmapc|lmapclear|lN|lNext|lne|lnext|lnew|lnewer|lnf|lnfile|lNf|lNfile|lo|loadview|loadk|loadkeymap|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lprevious|lpf|lpfile|lr|lrewind|ls|lt|ltag|lua|luado|luafile|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|move|ma|mark|make?|marks|mat|match|menut|menutranslate|mes|messages|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvimrc|mkview?|mode?|mz|mzscheme|mzf|mzfile|n|next|nb|nbkey|nbc|nbclose|nbs|nbstart|new|nmapc|nmapclear|noa|noautocmd|noh|nohlsearch|nor|nore|nos|noswapfile|nu|number|o|open|ol|oldfiles|omapc|omapclear|on|only|opt|options|ownsyntax|p|print|pa|packadd|packl|packloadall|pc|pclose|pe|perl|ped|pedit|perldo?|pop?|popup?|pp|ppop|pre|preserve|prev|previous|pro|prof|profile|profd|profdel|promptf|promptfind|promptr|promptrepl|ps|psearch|ptag?|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptN|ptNext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|put?|pwd?|py|python|py3|py3do|pydo|pyf|pyfile|python3|q|quit|qa|qall|quita|quitall|r|read|rec|recover|redo?|redir?|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|runtime|ruby?|rubydo?|rubyf|rubyfile|rundo|rv|rviminfo|sa|sargument|sall?|san|sandbox|sav|saveas|sb|sbuffer|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbN|sbNext|sbp|sbprevious|sbr|sbrewind|sc|sce|scg|sci|scI|scl|scp|scr|scriptnames|scripte|scriptencoding|scs|scscope|set?|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sg|sgc|sge|sgi|sgI|sgl|sgn|sgp|sgr|sh|shell|si|sI|sic|sIc|sie|sIe|sig|sIg|sign|sIl|sil|silent|sim|simalt|sin|sIn|sip|sIp|sir|sIr|sl|sleep|sla|slast|sm|smagic|sm|smap|sme|smenu|smile|sn|snext|sN|sNext|sno|snomagic|snoreme|snoremenu|so|source|sort?|sp|split|spe|spellgood|spelld|spelldump|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|spr|sprevious|sr|src|sre|srewind|srg|sri|srI|srl|srn|srp|st|stop|stag?|star|startinsert|startg|startgreplace|startr|startreplace|stj|stjump|stopi|stopinsert|sts|stselect|sun|sunhide|sunme|sunmenu|sus|suspend|sv|sview|sw|swapname|sy|syn|sync|syncbind|syntime|t|tag?|tab|tabc|tabclose|tabdo?|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnext|tabN|tabNext|tabnew|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tags|tcl?|tcldo?|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|tN|tNext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|undo|una|unabbreviate|undoj|undojoin|undol|undolist|unh|unhide|unl|unlo|unlockvar|uns|unsilent|up|update|v|ve|version|verb|verbose|vert|vertical|vi|visual|view?|vim|vimgrep|vimgrepa|vimgrepadd|viu|viusage|vmapc|vmapclear|vnew?|vs|vsplit|w|write|wa|wall|wh|while|win|winsize|winc|wincmd|windo|winp|winpos|wn|wnext|wN|wNext|wp|wprevious|wq|wqa|wqall|ws|wsverb|wundo|wv|wviminfo|x|xit|xa|xall|xmapc|xmapclear|xme|xmenu|xnoreme|xnoremenu|xprop|xunme|xunmenu|xwininfo|y|yank)\\b"

 	options:
-		patterns: [{
-			name: "support.function.option.$1.viml"
-			match: "\\b(acd|ai|akm|al|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|ar|arab|arabic|arabicshape|ari|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|belloff|beval|bex|bexpr|bg|bh|bin|binary|bk|bkc|bl|bo|bomb|breakat|breakindent|breakindentopt|bri|briopt|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|cb|cc|ccv|cd|cdpath|cedit|cf|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cm|cmdheight|cmdwinheight|cmp|cms|co|cocu|cole|colorcolumn|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|concealcursor|conceallevel|confirm|copyindent|cot|cp|cpo|cpoptions|cpt|crb|cryptmethod|cscopepathcomp|cscopeprg|cscopequickfix|cscoperelative|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|csre|cst|csto|csverb|cuc|cul|cursorbind|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|display|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|emo|emoji|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|ex|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fic|fileencoding|fileencodings|fileformat|fileformats|fileignorecase|filetype|fillchars|fixendofline|fixeol|fk|fkmap|flp|fml|fmr|fo|foldclose|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldopen|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|go|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hid|hidden|highlight|history|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatefunc|imactivatekey|imaf|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|imsf|imstatusfunc|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbk|invbl|invbomb|invbreakindent|invbri|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invcopyindent|invcp|invcrb|invcscoperelative|invcscopetag|invcscopeverbose|invcsre|invcst|invcsverb|invcuc|invcul|invcursorbind|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invea|inveb|inved|invedcompatible|invek|invemo|invemoji|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfic|invfileignorecase|invfixendofline|invfixeol|invfk|invfkmap|invfoldenable|invfs|invfsync|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invimdisable|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlangnoremap|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invlnr|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invrelativenumber|invremap|invrestorescreen|invrevins|invri|invrightleft|invrl|invrnu|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invudf|invundofile|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwic|invwildignorecase|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|is|isf|isfname|isi|isident|isk|iskeyword|isp|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|langnoremap|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|list|listchars|lm|lmap|lnr|loadplugins|lpl|ls|lsp|luadll|lw|lz|ma|macatsui|magic|makeef|makeprg|mat|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|mod|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobk|nobl|nobomb|nobreakindent|nobri|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|nocopyindent|nocp|nocrb|nocscoperelative|nocscopetag|nocscopeverbose|nocsre|nocst|nocsverb|nocuc|nocul|nocursorbind|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|noea|noeb|noed|noedcompatible|noek|noemo|noemoji|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofic|nofileignorecase|nofixendofline|nofixeol|nofk|nofkmap|nofoldenable|nofs|nofsync|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|nohlsearch|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noimdisable|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolangnoremap|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|nolnr|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|norelativenumber|noremap|norestorescreen|norevins|nori|norightleft|norl|nornu|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|noudf|noundofile|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowic|nowildignorecase|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|nu|number|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|packpath|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|perldll|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|pp|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|pythondll|pythonthreedll|qe|quoteescape|rdt|re|readonly|redrawtime|regexpengine|relativenumber|remap|renderoptions|report|restorescreen|revins|ri|rightleft|rightleftcmd|rl|rlc|rnu|ro|rop|rs|rtp|ru|rubydll|ruf|ruler|rulerformat|runtimepath|sb|sbo|sbr|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|sh|shcf|shell|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxescape|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|sm|smartcase|smartindent|smarttab|smc|smd|sn|so|softtabstop|sol|sp|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|spr|sps|sr|srr|ss|ssl|ssop|st|sta|stal|startofline|statusline|stl|stmp|sts|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxe|sxq|syn|synmaxcol|syntax|t_8b|t_8f|t_AB|t_AF|t_al|t_AL|t_bc|t_cd|t_ce|t_Ce|t_cl|t_cm|t_Co|t_cs|t_Cs|t_CS|t_CV|t_da|t_db|t_dl|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_fs|t_IE|t_IS|t_k1|t_K1|t_k2|t_k3|t_K3|t_k4|t_K4|t_k5|t_K5|t_k6|t_K6|t_k7|t_K7|t_k8|t_K8|t_k9|t_K9|t_KA|t_kb|t_kB|t_KB|t_KC|t_kd|t_kD|t_KD|t_ke|t_KE|t_KF|t_KG|t_kh|t_KH|t_kI|t_KI|t_KJ|t_KK|t_kl|t_KL|t_kN|t_kP|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_RB|t_RI|t_RV|t_Sb|t_se|t_Sf|t_SI|t_so|t_sr|t_SR|t_te|t_ti|t_ts|t_u7|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_WP|t_WS|t_xn|t_xs|t_ZH|t_ZR|ta|tabline|tabpagemax|tabstop|tag|tagbsearch|tagcase|taglength|tagrelative|tags|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tc|tcldll|tenc|term|termbidi|termencoding|termguicolors|terse|textauto|textmode|textwidth|tf|tgc|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|tl|tm|to|toolbar|toolbariconsize|top|tpm|tr|ts|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|udf|udir|ul|undodir|undofile|undolevels|undoreload|updatecount|updatetime|ur|ut|vb|vbs|vdir|ve|verbose|verbosefile|vfile|vi|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wa|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|wh|whichwrap|wi|wic|wig|wildchar|wildcharm|wildignore|wildignorecase|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|write|writeany|writebackup|writedelay|ws|ww)\\b"
-		}]
+		name: "support.function.option.$1.viml"
+		match: "\\b(acd|ai|akm|al|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|ar|arab|arabic|arabicshape|ari|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|belloff|beval|bex|bexpr|bg|bh|bin|binary|bk|bkc|bl|bo|bomb|breakat|breakindent|breakindentopt|bri|briopt|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|cb|cc|ccv|cd|cdpath|cedit|cf|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cm|cmdheight|cmdwinheight|cmp|cms|co|cocu|cole|colorcolumn|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|concealcursor|conceallevel|confirm|copyindent|cot|cp|cpo|cpoptions|cpt|crb|cryptmethod|cscopepathcomp|cscopeprg|cscopequickfix|cscoperelative|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|csre|cst|csto|csverb|cuc|cul|cursorbind|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|display|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|emo|emoji|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|ex|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fic|fileencoding|fileencodings|fileformat|fileformats|fileignorecase|filetype|fillchars|fixendofline|fixeol|fk|fkmap|flp|fml|fmr|fo|foldclose|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldopen|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|go|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hid|hidden|highlight|history|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatefunc|imactivatekey|imaf|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|imsf|imstatusfunc|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbk|invbl|invbomb|invbreakindent|invbri|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invcopyindent|invcp|invcrb|invcscoperelative|invcscopetag|invcscopeverbose|invcsre|invcst|invcsverb|invcuc|invcul|invcursorbind|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invea|inveb|inved|invedcompatible|invek|invemo|invemoji|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfic|invfileignorecase|invfixendofline|invfixeol|invfk|invfkmap|invfoldenable|invfs|invfsync|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invimdisable|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlangnoremap|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invlnr|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invrelativenumber|invremap|invrestorescreen|invrevins|invri|invrightleft|invrl|invrnu|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invudf|invundofile|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwic|invwildignorecase|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|is|isf|isfname|isi|isident|isk|iskeyword|isp|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|langnoremap|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|list|listchars|lm|lmap|lnr|loadplugins|lpl|ls|lsp|luadll|lw|lz|ma|macatsui|magic|makeef|makeprg|mat|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|mod|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobk|nobl|nobomb|nobreakindent|nobri|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|nocopyindent|nocp|nocrb|nocscoperelative|nocscopetag|nocscopeverbose|nocsre|nocst|nocsverb|nocuc|nocul|nocursorbind|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|noea|noeb|noed|noedcompatible|noek|noemo|noemoji|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofic|nofileignorecase|nofixendofline|nofixeol|nofk|nofkmap|nofoldenable|nofs|nofsync|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|nohlsearch|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noimdisable|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolangnoremap|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|nolnr|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|norelativenumber|noremap|norestorescreen|norevins|nori|norightleft|norl|nornu|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|noudf|noundofile|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowic|nowildignorecase|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|nu|number|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|packpath|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|perldll|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|pp|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|pythondll|pythonthreedll|qe|quoteescape|rdt|re|readonly|redrawtime|regexpengine|relativenumber|remap|renderoptions|report|restorescreen|revins|ri|rightleft|rightleftcmd|rl|rlc|rnu|ro|rop|rs|rtp|ru|rubydll|ruf|ruler|rulerformat|runtimepath|sb|sbo|sbr|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|sh|shcf|shell|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxescape|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|sm|smartcase|smartindent|smarttab|smc|smd|sn|so|softtabstop|sol|sp|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|spr|sps|sr|srr|ss|ssl|ssop|st|sta|stal|startofline|statusline|stl|stmp|sts|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxe|sxq|syn|synmaxcol|syntax|t_8b|t_8f|t_AB|t_AF|t_al|t_AL|t_bc|t_cd|t_ce|t_Ce|t_cl|t_cm|t_Co|t_cs|t_Cs|t_CS|t_CV|t_da|t_db|t_dl|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_fs|t_IE|t_IS|t_k1|t_K1|t_k2|t_k3|t_K3|t_k4|t_K4|t_k5|t_K5|t_k6|t_K6|t_k7|t_K7|t_k8|t_K8|t_k9|t_K9|t_KA|t_kb|t_kB|t_KB|t_KC|t_kd|t_kD|t_KD|t_ke|t_KE|t_KF|t_KG|t_kh|t_KH|t_kI|t_KI|t_KJ|t_KK|t_kl|t_KL|t_kN|t_kP|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_RB|t_RI|t_RV|t_Sb|t_se|t_Sf|t_SI|t_so|t_sr|t_SR|t_te|t_ti|t_ts|t_u7|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_WP|t_WS|t_xn|t_xs|t_ZH|t_ZR|ta|tabline|tabpagemax|tabstop|tag|tagbsearch|tagcase|taglength|tagrelative|tags|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tc|tcldll|tenc|term|termbidi|termencoding|termguicolors|terse|textauto|textmode|textwidth|tf|tgc|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|tl|tm|to|toolbar|toolbariconsize|top|tpm|tr|ts|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|udf|udir|ul|undodir|undofile|undolevels|undoreload|updatecount|updatetime|ur|ut|vb|vbs|vdir|ve|verbose|verbosefile|vfile|vi|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wa|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|wh|whichwrap|wi|wic|wig|wildchar|wildcharm|wildignore|wildignorecase|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|write|writeany|writebackup|writedelay|ws|ww)\\b"

 	stdPlugins:
-		patterns: [{
-			name: "support.function.stdplugin.$1.viml"
-			match: "\\b(DiffOrig|Man|N|Next|P|Print|S|TOhtml|XMLent|XMLns)\\b"
-		}]
+		name: "support.function.stdplugin.$1.viml"
+		match: "\\b(DiffOrig|Man|N|Next|P|Print|S|TOhtml|XMLent|XMLns)\\b"

 	autoCmd:
-		patterns: [{
-			name: "support.function.autocmd.${1:/downcase}.viml"
-			match: "(?i)\\b(BufAdd|BufCreate|BufDelete|BufEnter|BufFilePost|BufFilePre|BufHidden|BufLeave|BufNew|BufNewFile|BufRead|BufReadCmd|BufReadPost|BufReadPre|BufUnload|BufWinEnter|BufWinLeave|BufWipeout|BufWrite|BufWriteCmd|BufWritePost|BufWritePre|CmdUndefined|CmdwinEnter|CmdwinLeave|ColorScheme|CompleteDone|CursorHold|CursorHoldI|CursorMoved|CursorMovedI|EncodingChanged|FileAppendCmd|FileAppendPost|FileAppendPre|FileChangedRO|FileChangedShell|FileChangedShellPost|FileEncoding|FileReadCmd|FileReadPost|FileReadPre|FileType|FileWriteCmd|FileWritePost|FileWritePre|FilterReadPost|FilterReadPre|FilterWritePost|FilterWritePre|FocusGained|FocusLost|FuncUndefined|GUIEnter|GUIFailed|InsertChange|InsertCharPre|InsertEnter|InsertLeave|MenuPopup|OptionSet|QuickFixCmdPost|QuickFixCmdPre|QuitPre|RemoteReply|SessionLoadPost|ShellCmdPost|ShellFilterPost|SourceCmd|SourcePre|SpellFileMissing|StdinReadPost|StdinReadPre|SwapExists|Syntax|TabEnter|TabLeave|TermChanged|TermResponse|TextChanged|TextChangedI|User|VimEnter|VimLeave|VimLeavePre|VimResized|WinEnter|WinLeave)\\b"
-		}]
+		name: "support.function.autocmd.${1:/downcase}.viml"
+		match: "(?i)\\b(BufAdd|BufCreate|BufDelete|BufEnter|BufFilePost|BufFilePre|BufHidden|BufLeave|BufNew|BufNewFile|BufRead|BufReadCmd|BufReadPost|BufReadPre|BufUnload|BufWinEnter|BufWinLeave|BufWipeout|BufWrite|BufWriteCmd|BufWritePost|BufWritePre|CmdUndefined|CmdwinEnter|CmdwinLeave|ColorScheme|CompleteDone|CursorHold|CursorHoldI|CursorMoved|CursorMovedI|EncodingChanged|FileAppendCmd|FileAppendPost|FileAppendPre|FileChangedRO|FileChangedShell|FileChangedShellPost|FileEncoding|FileReadCmd|FileReadPost|FileReadPre|FileType|FileWriteCmd|FileWritePost|FileWritePre|FilterReadPost|FilterReadPre|FilterWritePost|FilterWritePre|FocusGained|FocusLost|FuncUndefined|GUIEnter|GUIFailed|InsertChange|InsertCharPre|InsertEnter|InsertLeave|MenuPopup|OptionSet|QuickFixCmdPost|QuickFixCmdPre|QuitPre|RemoteReply|SessionLoadPost|ShellCmdPost|ShellFilterPost|SourceCmd|SourcePre|SpellFileMissing|StdinReadPost|StdinReadPre|SwapExists|Syntax|TabEnter|TabLeave|TermChanged|TermResponse|TextChanged|TextChangedI|User|VimEnter|VimLeave|VimLeavePre|VimResized|WinEnter|WinLeave)\\b"

 	groupName:
-		patterns: [{
-			name: "support.type.group.${1:/downcase}-group.viml"
-			match: "(?i)\\b(Boolean|Character|Comment|Conditional|Constant|Debug|Define|Delimiter|Error|Exception|Float|Function|Identifier|Ignore|Include|Keyword|Label|Macro|Number|Operator|PreCondit|PreProc|Repeat|Special|SpecialChar|SpecialComment|Statement|StorageClass|String|Structure|Tag|Todo|Type|Typedef|Underlined)\\b"
-		}]
+		name: "support.type.group.${1:/downcase}-group.viml"
+		match: "(?i)\\b(Boolean|Character|Comment|Conditional|Constant|Debug|Define|Delimiter|Error|Exception|Float|Function|Identifier|Ignore|Include|Keyword|Label|Macro|Number|Operator|PreCondit|PreProc|Repeat|Special|SpecialChar|SpecialComment|Statement|StorageClass|String|Structure|Tag|Todo|Type|Typedef|Underlined)\\b"

 	highlightGroup:
-		patterns: [{
-			name: "support.type.highlight-group.${1:/downcase}-group.viml"
-			match: "(?i)\\b(ColorColumn|Cursor|CursorColumn|CursorIM|CursorLine|CursorLineNr|DiffAdd|DiffChange|DiffDelete|DiffText|Directory|ErrorMsg|FoldColumn|Folded|IncSearch|LineNr|MatchParen|Menu|ModeMsg|MoreMsg|NonText|Normal|Pmenu|PmenuSbar|PmenuSel|PmenuThumb|Question|Scrollbar|Search|SignColumn|SpecialKey|SpellBad|SpellCap|SpellLocal|SpellRare|StatusLine|StatusLineNC|TabLine|TabLineFill|TabLineSel|Title|Tooltip|VertSplit|Visual|VisualNOS|WarningMsg|WildMenu)\\b"
-		}]
+		name: "support.type.highlight-group.${1:/downcase}-group.viml"
+		match: "(?i)\\b(ColorColumn|Cursor|CursorColumn|CursorIM|CursorLine|CursorLineNr|DiffAdd|DiffChange|DiffDelete|DiffText|Directory|ErrorMsg|FoldColumn|Folded|IncSearch|LineNr|MatchParen|Menu|ModeMsg|MoreMsg|NonText|Normal|Pmenu|PmenuSbar|PmenuSel|PmenuThumb|Question|Scrollbar|Search|SignColumn|SpecialKey|SpellBad|SpellCap|SpellLocal|SpellRare|StatusLine|StatusLineNC|TabLine|TabLineFill|TabLineSel|Title|Tooltip|VertSplit|Visual|VisualNOS|WarningMsg|WildMenu)\\b"

 	functions:
 		patterns: [{
@@ -157,26 +135,18 @@
 		}]

 	attribNames:
-		patterns: [{
-			name: "support.constant.attribute.$1.viml"
-			match: "\\b(background|bg|fg|foreground|none)\\b"
-		}]
+		name: "support.constant.attribute.$1.viml"
+		match: "\\b(background|bg|fg|foreground|none)\\b"

 	colourNames:
-		patterns: [{
-			name: "support.constant.colour.$1.viml"
-			match: "\\b(black|blue|brown|cyan|darkblue|darkcyan|darkgray|darkgreen|darkgrey|darkmagenta|darkred|darkyellow|gray|green|grey|lightblue|lightcyan|lightgray|lightgreen|lightgrey|lightmagenta|lightred|magenta|red|white|yellow)\\b"
-		}]
+		name: "support.constant.colour.$1.viml"
+		match: "\\b(black|blue|brown|cyan|darkblue|darkcyan|darkgray|darkgreen|darkgrey|darkmagenta|darkred|darkyellow|gray|green|grey|lightblue|lightcyan|lightgray|lightgreen|lightgrey|lightmagenta|lightred|magenta|red|white|yellow)\\b"

-	"support-type":
-		patterns: [{
-			name: "support.type.viml"
-			match: "<.*?>"
-		}]
+	supportType:
+		name: "support.type.viml"
+		match: "<.*?>"

-	"support-variable":
-		patterns: [{
-			name: "support.variable.viml"
-			match: "\\b(am(enu|)?|(hl|inc)?search|[Bb]uf([Nn]ew[Ff]ile|[Rr]ead)?|[Ff]ile[Tt]ype)\\b"
-		}]
+	supportVariable:
+		name: "support.variable.viml"
+		match: "\\b(am(enu|)?|(hl|inc)?search|[Bb]uf([Nn]ew[Ff]ile|[Rr]ead)?|[Ff]ile[Tt]ype)\\b"


IDE grunt change

IDE grunt change

--- gruntfile.coffee
+++ gruntfile.coffee
@@ -34,7 +34,7 @@
         'extensions/app/source/organism/*.coffee']
       ide: [
         'extensions/ide/source/namespace.coffee'
-        'extensions/ide/source/ide.constants.coffee'
+        'extensions/ide/source/ide.*.coffee'
         'extensions/ide/source/*/*.coffee'
         'extensions/ide/source/ide.coffee']
       spec  : [


minor updates and comments

minor updates and comments

--- src/adaptor/d3.coffee
+++ src/adaptor/d3.coffee
@@ -1,30 +1,39 @@
-{ json, log, p, pjson } = require 'lightsaber/lib/log'
+{ json, log, d, pjson } = require 'lightsaber/lib/log'
 { defaults, values } = require 'lodash'
 Promise = require 'bluebird'
-xhr = Promise.promisify require 'xhr'  # TODO use axios instead, for conistency
+request = require 'axios'

 Node = require '../core/node'
 Edge = require '../core/edge'

-class JsonAdaptor
-  fetch: ({sourceUri}) ->
-    xhr { uri: sourceUri }
+# This adaptor understands JSON in the graph format
+# used by the D3 toolkit, eg:
+#
+# currently expects data in the format:
+# {
+#   "nodes":[
+#     { "name": "Myriel",             "group":  1 },   // implicit ID 0
+#     { "name": "Napoleon",           "group":  1 },   // implicit ID 1
+#   ]
+#   "links":[
+#     { "source":  1,  "target":  0,  "value":  1 },
+#     { "source":  2,  "target":  0,  "value":  8 },
+#   ]
+# }
+#
+# full example: https://github.com/d3/d3-plugins/blob/d238d9448758f2a2a8a33c4b3a50b809fdcf614b/graph/data/miserables.json
+
+class D3Adaptor
+  @create: (args) ->
+    Promise.resolve new D3Adaptor args
+
+  fetch: (args) ->
+    {url} = args
+    request {url}
       .then @process
       .catch (error) -> throw error

-  # currently expects data in the format:
-  # {
-  #   "nodes":[
-  #     {"name":"Myriel","group":1}     // implicit ID 0
-  #     {"name":"Napoleon","group":1}   // implicit ID 1
-  #   ]
-  #   "links":[
-  #     {"source":1,"target":0,"value":1}
-  #     {"source":2,"target":0,"value":8}
-  #   ]
-  # }
-  process: ([res]) =>
-    data = JSON.parse res.body
+  process: ({data}) =>
     nodeMap = {}
     edges = []
     edgesStartingWithNode = {}
@@ -52,4 +61,4 @@
     nodeMap[id] ?= new Node props
     nodeMap[id]

-module.exports = JsonAdaptor
+module.exports = D3Adaptor


Fix regex line breaking

Fix regex line breaking

--- app/assets/javascripts/clipboard-js.coffee
+++ app/assets/javascripts/clipboard-js.coffee
@@ -17,7 +17,7 @@
 |sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)
 |tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)
 |vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700
-|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)) ///
+|yas\-|your|zeto|zte\-/i///.test(a.substr(0, 4))
   return
 ) navigator.userAgent or navigator.vendor or window.opera


add change stream on startup

add change stream on startup

--- app/assets/javascripts/frontpage.js.coffee
+++ app/assets/javascripts/frontpage.js.coffee
@@ -10,6 +10,9 @@
     return
   ), 30000
   $draggable = $('.draggable').draggabilly()
+  if $(location).attr('hash').split('/')[1] == "channel"
+    hash_stream = $(location).attr('hash').split("/")
+    changeChannel(hash_stream[2] + '/' + hash_stream[3])
   return

 @turnInterval = () ->


Save Iframe state using async request

Save Iframe state using async request

[#89024392]

I can't see any reason why it should be synchronous.

--- app/assets/javascripts/iframe-saver.coffee
+++ app/assets/javascripts/iframe-saver.coffee
@@ -119,7 +119,6 @@
       learner_url: learner_url
     $.ajax
       type: 'PUT'
-      async: false #TODO: For now we can only save this synchronously....
       dataType: 'json'
       url: @put_url
       data: data


fixed dataset list team selection

fixed dataset list team selection

--- app/assets/javascripts/main/routing.coffee
+++ app/assets/javascripts/main/routing.coffee
@@ -102,7 +102,7 @@
         return

-    "views.html.admin.binary.binaryData" : ->
+    "views.html.admin.binary.dataSetList" : ->

       $modal = $(".modal")
       $modal.find(".btn-primary").on "click", -> submitTeams()


Change org coffee to string interpolation

--- app/assets/javascripts/organization.coffee
+++ app/assets/javascripts/organization.coffee
@@ -1,14 +1,14 @@
 window.addAddressRow = (count) ->
   newRow = $ """

-    Mailing Address
+    Mailing Address

-      <input class="form-control" data-guard="different" type="text" value="" name="organization[addresses_attributes][""" + count + """][address]" id="organization_addresses_attributes_""" + count + """_address">
+      <input class="form-control" data-guard="different" type="text" value="" name="organization[addresses_attributes][#{count}][address]" id="organization_addresses_attributes_#{count}_address">

-  <input type="hidden" value="" name="organization[addresses_attributes][""" + count + """][id]" id="organization_addresses_attributes_""" + count + """_id">
+  <input type="hidden" value="" name="organization[addresses_attributes][#{count}][id]" id="organization_addresses_attributes_#{count}_id">
   """

   $("#organization_info").append newRow


extending BaseCollection::add() to ensure model.app exists

--- shared/base/model.coffee
+++ shared/base/model.coffee
@@ -16,6 +16,15 @@
       @app = @collection.app

     @on 'change', @updateInModelStore
+
+  # Override 'add' to make sure models have '@app' attribute.
+  add: (models, options) ->
+    models = [models] unless _.isArray(models)
+
+    model.app = @app for model in models
+
+    super models, options
+

   # TODO: Should we keep a reference on the model to its modelStore?
   # Or not, because there could be a one-to-many mapping?


better comment

better comment

--- shared/base/model.coffee
+++ shared/base/model.coffee
@@ -43,7 +43,7 @@

   getUrl: syncer.getUrl

-  # Class method to store in the modelStore.
+  # Instance method to store in the modelStore.
   store: ->
     getFetcher().modelStore.set @constructor.name, @


Fixed bug on plans listing in analytics

Fixed bug on plans listing in analytics

--- app/coffee/modules/common/analytics.coffee
+++ app/coffee/modules/common/analytics.coffee
@@ -142,7 +142,7 @@
                'position': position,
             })
             position++
-        @.trackEvent("ecommerce", "add-impression", plan.name, plan.plan_id)
+        @.trackEvent("ecommerce", "list-plans")

     addEcClickProduct: (plan) ->
         return if not @.initialized


we don't need cancel button

we don't need cancel button

--- app/assets/javascripts/backbone/apps/props/list/list_view.coffee
+++ app/assets/javascripts/backbone/apps/props/list/list_view.coffee
@@ -12,6 +12,11 @@

   class List.Form extends App.Views.ItemView
     template: 'props/list/templates/form'
+
+    form:
+      buttons:
+        primary: 'Prop!'
+        cancel: false

     ui:
       select: 'select'


Fix bug where clicking an editor pane didn't focus the editor

We don't need to return false from the click handler. It was an experiment when debugging scrolling that I left in accidentally.

--- src/app/editor.coffee
+++ src/app/editor.coffee
@@ -154,8 +154,6 @@

       @selectOnMousemoveUntilMouseup()

-      return false
-
     @hiddenInput.on "textInput", (e) =>
       @insertText(e.originalEvent.data)


Don't call `updateDisplay` re-entrantly from `scrollTop`

--- src/app/editor.coffee
+++ src/app/editor.coffee
@@ -460,13 +460,12 @@

   scrollTop: (scrollTop, options={}) ->
     return @cachedScrollTop or 0 unless scrollTop?
-    updateDisplay = options.updateDisplay ? true
     maxScrollTop = @verticalScrollbar.prop('scrollHeight') - @verticalScrollbar.height()
     scrollTop = Math.floor(Math.max(0, Math.min(maxScrollTop, scrollTop)))
     return if scrollTop == @cachedScrollTop
     @cachedScrollTop = scrollTop

-    @updateDisplay(autoscroll: false) if @attached and updateDisplay
+    @updateDisplay() if @attached and !@updatingDisplay

     @renderedLines.css('top', -scrollTop)
     @underlayer.css('top', -scrollTop)
@@ -735,6 +734,8 @@
       @renderedLines.css('min-width', minWidth)
       @underlayer.css('min-width', minWidth)
       @overlayer.css('min-width', minWidth)
+    throw new Error("Re-entry into updateDisplay") if @updatingDisplay
+    @updatingDisplay = true
       @layerMinWidth = minWidth

   clearRenderedLines: ->
@@ -742,6 +743,7 @@
     @firstRenderedScreenRow = null
     @lastRenderedScreenRow = null

+    @updatingDisplay = false
   resetDisplay: ->
     return unless @attached


Fix for [#24], can't fathom why this is only surfacing now.

--- app/assets/javascripts/staffplans/show/views/user_view.js.coffee
+++ app/assets/javascripts/staffplans/show/views/user_view.js.coffee
@@ -101,7 +101,8 @@
     _.each dateRange, (date, idx) ->
       # Map week to

       li = weekHourCounters.eq(idx)
-      total = ww["#{date.year}-#{date.mweek}"][if date.weekHasPassed then 'actual' else 'estimated']
+      workWeek = ww["#{date.year}-#{date.mweek}"]
+      total = if workWeek? then workWeek[if date.weekHasPassed then 'actual' else 'estimated'] else 0
       li
         .height(total)
         .html("" + total + "")


preventDefault() on tap event

preventDefault() on tap event

--- app/assets/javascripts/states/monitoring/helpers/touch.js.coffee
+++ app/assets/javascripts/states/monitoring/helpers/touch.js.coffee
@@ -31,6 +31,7 @@
     # show tooltip w/ value on tap event
     return if !(use_touch && @el.tap?)
     @el.tap (e) =>
+      e.preventDefault()
       pX = e.pageX - @el.offset().left
       coord = @find_nearest_coord(pX)
       text = @metric.format_value(coord.point[1], coord.point[0])


bigger bounding boxes

bigger bounding boxes

--- tree2.coffee
+++ tree2.coffee
@@ -188,7 +188,7 @@
     ctx.save()
     ctx.scale(@len_x,@len_y)
     ctx.beginPath()
-    renderShape(ctx, @shape, 1)
+    renderShape(ctx, @shape, .5)
     # fix line width
     ctx.scale(1/@len_x, 1/@len_y)
     ctx.fill()
@@ -197,9 +197,9 @@

     setStyle(ctx, node_text_style)
     ctx.textAlign = 'center'
-    ctx.textBaseline = 'top'
-
-    ctx.fillText(@label + ":" + @value,0,@len_y)
+    ctx.textBaseline = 'bottom'
+
+    ctx.fillText(@value, 0, -@len_y/2)

     ctx.restore()

@@ -224,8 +224,8 @@

       @x = (maxx+minx)/2
       @y = (maxy+miny)/2
-      @len_x = maxx-minx+default_node_radius*2
-      @len_y = maxy-miny+default_node_radius*3
+      @len_x = maxx-minx+default_node_radius*6
+      @len_y = maxy-miny+default_node_radius*6
     else
       @len_x = @default_bbox.len.x
       @len_y = @default_bbox.len.y
@@ -657,10 +657,20 @@
       this_node.removeNode(@selected.node)
       other_node.addNode(@selected.node)

-    super(pos,t)
+    return_value = super(pos,t)
+
+    updateFn = (node) ->
+      if node.update?
+        node.update()
+
+    for n in @nodes
+      n.forAll(updateFn)
+
+    return return_value

   clickend: (pos, t) ->
-    @splitting = node: @selected.node, pos0: pos, pos1: pos
+    if @selected.node.contains.length > 1
+      @splitting = node: @selected.node, pos0: pos, pos1: pos

   splitNode: (node, pos0, pos1) ->
     new0 = new ShannonFanoNode(node.contains, @shape, @defaultBBoxAt(pos0), 0)