Add a global pasteboard object which supports metadata

This metadata will be used to record the indentation level of the first line when copying multiple lines of text to the pasteboard. The pasteboard takes the md5 of the pasted content when writing, then when reading it associates the last written metadata only when the signature matches the previously written value.
This commit is contained in:
Nathan Sobo
2012-10-24 17:42:24 -06:00
parent ee09c20214
commit fd4b6c85ce
4 changed files with 426 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ _ = require 'underscore'
$ = require 'jquery'
{CoffeeScript} = require 'coffee-script'
RootView = require 'root-view'
Pasteboard = require 'pasteboard'
require 'jquery-extensions'
require 'underscore-extensions'
@@ -24,6 +25,7 @@ windowAdditions =
TextMateBundle.loadAll()
TextMateTheme.loadAll()
@setUpKeymap()
@pasteboard = new Pasteboard
$(window).on 'core:close', => @close()
# This method is intended only to be run when starting a normal application