[Tkabber-dev] r2056 - in trunk/tkabber: . ifacetk

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Jan 16 08:13:34 MSK 2014


Author: sergei
Date: 2014-01-16 08:13:34 +0400 (Thu, 16 Jan 2014)
New Revision: 2056

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/iface.tcl
Log:
	* ifacetk/iface.tcl: Fixed encoding the primary X selection in chat
	  input windows if it is empty.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2014-01-12 13:12:02 UTC (rev 2055)
+++ trunk/tkabber/ChangeLog	2014-01-16 04:13:34 UTC (rev 2056)
@@ -1,3 +1,8 @@
+2014-01-16  Sergei Golovan  <sgolovan at nes.ru>
+
+	* ifacetk/iface.tcl: Fixed encoding the primary X selection in chat
+	  input windows if it is empty.
+
 2014-01-12  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/chat/logger.tcl, plugins/general/message_archive.tcl:

Modified: trunk/tkabber/ifacetk/iface.tcl
===================================================================
--- trunk/tkabber/ifacetk/iface.tcl	2014-01-12 13:12:02 UTC (rev 2055)
+++ trunk/tkabber/ifacetk/iface.tcl	2014-01-16 04:13:34 UTC (rev 2056)
@@ -218,7 +218,12 @@
 	set elided nonemphasized
     }
     if {[string equal $elided ""]} {
-	set ::xselection [eval $txt get [$txt tag ranges sel]]
+	set sel [$txt tag ranges sel]
+	if {[llength $sel] == 0} {
+	    set ::xselection ""
+	} else {
+	    set ::xselection [eval [list $txt get] $sel]
+	}
     } else {
 	lassign [$txt tag ranges sel] selstart selstop
 	set sel $selstart



More information about the Tkabber-dev mailing list