[polari] entryArea: Check if pasted text is not null
- From: Kunal Jain <kunaljain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] entryArea: Check if pasted text is not null
- Date: Thu, 11 Feb 2016 18:35:56 +0000 (UTC)
commit 26e95fde94e5098109525b5e31f384d587e1084a
Author: Kunaal Jain <kunaalus gmail com>
Date: Wed Feb 10 16:07:47 2016 +0530
entryArea: Check if pasted text is not null
We should check if text is null before pasting text,
and emitting corresponding signals.
https://bugzilla.gnome.org/show_bug.cgi?id=760346
src/entryArea.js | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/entryArea.js b/src/entryArea.js
index a4047d4..b54dd6c 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -35,6 +35,8 @@ const ChatEntry = new Lang.Class({
let clipboard = Gtk.Clipboard.get_default(this.get_display());
clipboard.request_text(Lang.bind(this,
function(clipboard, text) {
+ if (text == null)
+ return;
text = text.trim();
let nLines = text.split('\n').length;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]