From 1e81a110e437a1bfe6eb71d46b501aba0941b950 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sat, 16 Jan 2016 14:18:02 +0100 Subject: [PATCH] Code style nitpicks --- extension/lib/help.coffee | 2 +- extension/lib/main.coffee | 4 ++-- extension/lib/modes.coffee | 6 +++--- extension/lib/utils.coffee | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/extension/lib/help.coffee b/extension/lib/help.coffee index bf146c2..ebf6dcc 100644 --- a/extension/lib/help.coffee +++ b/extension/lib/help.coffee @@ -53,7 +53,7 @@ injectHelp = (window, vimfx) -> searchInput.onkeydown = (event) -> searchInput.blur() if event.key == 'Enter' container.appendChild(searchInput) - window.gBrowser.mCurrentBrowser.parentNode.appendChild(container) + window.gBrowser.selectedBrowser.parentNode.appendChild(container) # The font size of menu items is used by default, which is usually quite # small. Try to increase it without causing a scrollbar. diff --git a/extension/lib/main.coffee b/extension/lib/main.coffee index 720ae63..f05167e 100644 --- a/extension/lib/main.coffee +++ b/extension/lib/main.coffee @@ -1,6 +1,6 @@ ### # Copyright Anton Khodakivskiy 2012, 2013, 2014. -# Copyright Simon Lydell 2013, 2014, 2015. +# Copyright Simon Lydell 2013, 2014, 2015, 2016. # # This file is part of VimFx. # @@ -114,7 +114,7 @@ module.exports = (data, reason) -> windows = new WeakSet() messageManager.listen('tabCreated', (data, {target: browser}) -> - # Frame script are run in more places than we need. Tell those not to do + # Frame scripts are run in more places than we need. Tell those not to do # anything. group = browser.getAttribute('messagemanagergroup') return false unless group == 'browsers' diff --git a/extension/lib/modes.coffee b/extension/lib/modes.coffee index 4b9d737..ddc58ea 100644 --- a/extension/lib/modes.coffee +++ b/extension/lib/modes.coffee @@ -121,14 +121,14 @@ mode('hints', { storage.count = count storage.numEnteredChars = 0 - storage.clearInterval = utils.setInterval(vim.window, 0, (callback) -> + storage.clearInterval = utils.setInterval(vim.window, 0, (next) -> unless storage.markerMap - callback() + next() return vim._send('getMarkableElementsMovements', null, (diffs) -> for {dx, dy}, index in diffs when not (dx == 0 and dy == 0) storage.markerMap[index].updatePosition(dx, dy) - callback() + next() ) ) diff --git a/extension/lib/utils.coffee b/extension/lib/utils.coffee index bf7c58f..10d939b 100644 --- a/extension/lib/utils.coffee +++ b/extension/lib/utils.coffee @@ -342,13 +342,13 @@ removeDuplicateCharacters = (str) -> setInterval = (window, interval, fn) -> stopped = false currentIntervalId = null - callback = -> + next = -> return if stopped - currentIntervalId = window.setTimeout((-> fn(callback)), interval) + currentIntervalId = window.setTimeout((-> fn(next)), interval) clearInterval = -> stopped = true window.clearTimeout(currentIntervalId) - callback() + next() return clearInterval -- 2.39.3