From 0d3c9bd613f2789ce041ff5195c5beb7bd5ad2eb Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 9 Oct 2010 12:56:05 -0400 Subject: [PATCH] Fix now spurious :autocmd examples. --HG-- branch : mode-refactoring --- common/content/buffer.js | 4 +++- common/locale/en-US/autocommands.xml | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index ef322e21..747c33b8 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -271,7 +271,9 @@ const Buffer = Module("buffer", { statusline.updateUrl(); statusline.updateProgress(); - autocommands.trigger("LocationChange", { url: buffer.URL }); + util.timeout(function () { + autocommands.trigger("LocationChange", { url: buffer.URL }); + }); // if this is not delayed we get the position of the old buffer util.timeout(function () { diff --git a/common/locale/en-US/autocommands.xml b/common/locale/en-US/autocommands.xml index e2a06c3b..3ba97b52 100644 --- a/common/locale/en-US/autocommands.xml +++ b/common/locale/en-US/autocommands.xml @@ -90,18 +90,16 @@

Enable passthrough mode on all Google sites:

-:autocmd LocationChange .* js modes.passAllKeys = /google\.com/.test(buffer.URL) +:autocmd LocationChange google\.com -js modes.push(modes.PASS_THROUGH)

Enable passthrough mode on some Google sites:

-:autocmd LocationChange .* js modes.passAllKeys = /(www|mail)\.google\.com/.test(buffer.URL) +:autocmd LocationChange (www|mail)\.google\.com -js modes.push(modes.PASS_THROUGH)

Set the filetype to mail when editing email at Gmail:

- -:autocmd LocationChange !'mail\.google\.com' :set editor=gvim -f -:autocmd LocationChange 'mail\.google\.com' :set editor=gvim -f -c 'set ft=mail' - +:autocmd LocationChange !mail\.google\.com :set editor=gvim -f +:autocmd LocationChange mail\.google\.com :set editor=gvim -f -c 'set ft=mail'