From edc78f8ebc58f147fb9f0183e5e06e771d395a9a Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Mon, 1 Dec 2014 07:26:10 -0500 Subject: trim --- js/clipboard.js | 1 + js/matrix.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/clipboard.js b/js/clipboard.js index 5354771..ecbdaa8 100644 --- a/js/clipboard.js +++ b/js/clipboard.js @@ -69,6 +69,7 @@ var clipboard = (function () { lex.build() } }) + // TODO: some solution for a "selected" region // var pasted_region = new Matrix (width, height, function(x,y){ // var lex = new Lex (x,y) // lex.char = lines[y][x] || " " diff --git a/js/matrix.js b/js/matrix.js index 96421ff..d5f4f5c 100644 --- a/js/matrix.js +++ b/js/matrix.js @@ -1,4 +1,6 @@ function Matrix (w,h,f){ + this.x = 0 + this.y = 0 this.w = w this.h = h this.f = f @@ -120,9 +122,10 @@ Matrix.prototype.irssi = function(){ .replace(/\`/g, '\\\`') .replace(/\s+\n/g, '\n') .replace(/\s+$/g, '\n') + .replace(/^\n+/, '') .replace(/\n/g, '\\n') .replace(/\x03/g, '\\x03'); - console.log(txt) + // console.log(txt) return '/exec -out printf "' + txt + '"\n' } Matrix.prototype.expand = function(i){ -- cgit v1.2.3-70-g09d2