a3dc06785e35

Set the filetype properly in each buffer during init.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 12 Dec 2012 13:02:00 -0500
parents 06491cc1f4a2
children b655b7e1bfe7
branches/tags (none)
files autoload/splicelib/init.py

Changes

--- a/autoload/splicelib/init.py	Wed Dec 12 12:52:52 2012 -0500
+++ b/autoload/splicelib/init.py	Wed Dec 12 13:02:00 2012 -0500
@@ -53,25 +53,32 @@
     keys.bind('CC', ':cq<cr>')
 
 def setlocal_buffers():
+    buffers.result.open()
+    filetype = vim.eval('&filetype')
+
     buffers.original.open()
     vim.command('setlocal noswapfile')
     vim.command('setlocal nomodifiable')
+    vim.command('set filetype=%s' % filetype)
     if setting('wrap'):
         vim.command('setlocal ' + setting('wrap'))
 
     buffers.one.open()
     vim.command('setlocal noswapfile')
     vim.command('setlocal nomodifiable')
+    vim.command('set filetype=%s' % filetype)
     if setting('wrap'):
         vim.command('setlocal ' + setting('wrap'))
 
     buffers.two.open()
     vim.command('setlocal noswapfile')
     vim.command('setlocal nomodifiable')
+    vim.command('set filetype=%s' % filetype)
     if setting('wrap'):
         vim.command('setlocal ' + setting('wrap'))
 
     buffers.result.open()
+    vim.command('set filetype=%s' % filetype)
     if setting('wrap'):
         vim.command('setlocal ' + setting('wrap'))