[gedit] External tools: Send to fpaste: set lang when None



commit cd33434bf46e13cbe05976d40870a3019a00c29a
Author: Sindhu S <sindhus live in>
Date:   Mon Jan 20 14:11:20 2014 +0530

    External tools: Send to fpaste: set lang when None

 plugins/externaltools/data/send-to-fpaste.tool.in |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/externaltools/data/send-to-fpaste.tool.in 
b/plugins/externaltools/data/send-to-fpaste.tool.in
index 372a6c0..0070f57 100755
--- a/plugins/externaltools/data/send-to-fpaste.tool.in
+++ b/plugins/externaltools/data/send-to-fpaste.tool.in
@@ -4,6 +4,9 @@ import os, urllib, json, sys, urllib.request
 from gi.repository import Gtk, Gdk
 
 lang = os.getenv('GEDIT_CURRRENT_DOCUMENT_LANGUAGE')
+if lang is None
+    lang = "text"
+
 current_document_path = os.getenv('GEDIT_CURRENT_DOCUMENT_PATH')
 selected_text = os.getenv('GEDIT_SELECTED_TEXT')
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]