diff options
| author | Stephen Blott | 2014-11-22 15:02:27 +0000 |
|---|---|---|
| committer | Stephen Blott | 2014-11-22 15:02:27 +0000 |
| commit | 0e4f78e5628eb3d33e4d7c441882ff00307d6e8f (patch) | |
| tree | 877897430da7d021530b5cdcdf35b31eaa0089f6 | |
| parent | c58b3fdd99eef100cfe5fc5de945018a54a659f5 (diff) | |
| parent | 5534830b0578e4ae28c637505a1a29d22da17fbd (diff) | |
| download | vimium-0e4f78e5628eb3d33e4d7c441882ff00307d6e8f.tar.bz2 | |
Merge branch 'synchronous-tab-visit-marker' of github.com:mrmr1993/vimium into mrmr1993-synchronous-tab-visit-marker
| -rw-r--r-- | background_scripts/completion.coffee | 7 | ||||
| -rw-r--r-- | tests/unit_tests/test_chrome_stubs.coffee | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 8efd1687..dc24ebb7 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -286,11 +286,8 @@ class TabRecency if @lastVisitedTime? and currentTime - @lastVisitedTime >= @timeDelta @cache[@lastVisited] = ++@timestamp - @current = tabId - @lastVisited = tabId - # If the tab we were previously on has gone away (or never existed if this is the first tab), then make - # this one registers as soon as it's blurred. - @lastVisitedTime = if @lastVisitedTime? then currentTime else new Date(currentTime - @timeDelta) + @current = @lastVisited = tabId + @lastVisitedTime = currentTime remove: (tabId) -> if tabId == @lastVisited diff --git a/tests/unit_tests/test_chrome_stubs.coffee b/tests/unit_tests/test_chrome_stubs.coffee index 396a2e55..80750337 100644 --- a/tests/unit_tests/test_chrome_stubs.coffee +++ b/tests/unit_tests/test_chrome_stubs.coffee @@ -95,5 +95,3 @@ exports.chrome = callback() if callback # Now, generate (supposedly asynchronous) notification for listeners. global.chrome.storage.onChanged.callEmpty(key) - -exports.setTimeout = (callback,timeout) -> callback() |
