Commits

Steve Losh  committed a3dc067

Set the filetype properly in each buffer during init.

  • Participants
  • Parent commits 06491cc

Comments (0)

Files changed (1)

File autoload/splicelib/init.py

     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'))