Skip to content

Instantly share code, notes, and snippets.

// From editor.js
_scrollViewVerticalScrollOffsetChanged: function() {
// The MAGIC line.
this.get('textView').syncNextRenderWith(this.get('gutterView'));
this.get('gutterView').adjust({
top: -this.getPath('scrollView.verticalScrollOffset')
});
},
translateRegion: function(x, y, w, h, newX, newY) {
var context = this.get('canvasContext2D');
data = context.getImageData(x, y, w, h);
context.putImageData(data, newX, newY);
},
_clippingFrameChanged: function() {
// False positives here are very common, so check to make sure before
// we take the slow path.
var previousClippingFrame = this._previousClippingFrame;
var clippingFrame = this.get('clippingFrame');
if (previousClippingFrame === null ||
!SC.rectsEqual(clippingFrame, previousClippingFrame)) {
// Move the content of the editor around.
if (previousClippingFrame !== null && this._bespin_canvas_canvasDom !== null) {
var shiftY = previousClippingFrame.y - clippingFrame.y;
Adds CMD + L shortcut that sets the commandline's value to "goto ".
diff --git a/plugins/supported/CommandLine/views/cli.js b/plugins/supported/CommandLine/views/cli.js
--- a/plugins/supported/CommandLine/views/cli.js
+++ b/plugins/supported/CommandLine/views/cli.js
@@ -430,16 +430,36 @@ console.log("trying to set completion to
/**
* Push the focus into the input element
*/
focus: function() {
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
#!/bin/bash
echo "=== Start installing Bespin ==="
mkdir $1
cd $1/
hg clone http://hg.mozilla.org/labs/bespinclient
hg clone http://hg.mozilla.org/labs/bespinserver
cd bespinclient
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
From: Julian Viereck <julian.viereck@gmail.com>
Fix for issue: remove() removes the doc even if was set again.
diff --git a/dirty.js b/dirty.js
--- a/dirty.js
+++ b/dirty.js
@@ -19,16 +19,17 @@ var Dirty = dirty.Dirty = function(file,
this.file = (file)
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
var SC = require('sproutcore/runtime').SC;
exports.ReFocus = {
_rf_view: null,
setup: function() {
SC.RootResponder.responder.addObserver('hasFocus', this, function() {
if (SC.RootResponder.responder.get('hasFocus') &&
!SC.none(exports.ReFocus._rf_view)) {
if (SC.none(SC.RootResponder.responder.keyPane.firstResponder)) {