From: Martin DeMello Date: 2012-11-24T18:13:41+09:00 Subject: tktext: insert with multiple (chars, taglist) not working properly The ruby tktext documentation lists insert(index, chars, ?tagList, chars, tagList, ...?) : [...] If tagList is specified then it consists of a list of tag names; the new characters will receive all of the tags in this list and no others, regardless of the tags present around the insertion point. If multiple chars-tagList argument pairs are present, they produce the same effect as if a separate insert widget command had been issued for each pair, in order. The last tagList argument may be omitted. I tried the following code (where a is an array of alternating text, TkTextTag and pos = 'end'): insert(pos, *a) insert(pos, "\n") a.each_slice(2) {|i, j| insert(pos, i, j)} which produces the following screenshot: http://imgur.com/Ktwh1 (The first line is not what I wanted, the second and third lines are what should have been printed). It looks like it's taking the first text, and then merging all the tags via something analogous to hash#update. Is this a bug or am I doing something wrong? Here's the value of a.inspect in case it reveals anything: ["hello world", #, @parent=#, @tpath=".w00003.w00004", @id="tag00000", @path="tag00000">, "Bold red text on blue:\n", #, @parent=#, @tpath=".w00003.w00004", @id="tag00001", @path="tag00001">, "Green text on blue", #, @parent=#, @tpath=".w00003.w00004", @id="tag00002", @path="tag00002">, "none\n", #, @parent=#, @tpath=".w00003.w00004", @id="tag00003", @path="tag00003">] martin