From 3be23fc657b650c1a8b15d87965667d8b77c98e7 Mon Sep 17 00:00:00 2001 From: Matthew Einhorn Date: Sun, 6 Jul 2014 14:14:56 -0400 Subject: [PATCH] Use proper cid in codeinput cache. --- kivy/uix/codeinput.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kivy/uix/codeinput.py b/kivy/uix/codeinput.py index 7b7fbf515..8bb2665c6 100644 --- a/kivy/uix/codeinput.py +++ b/kivy/uix/codeinput.py @@ -91,7 +91,7 @@ class CodeInput(TextInput): ntext = u'*' * len(ntext) ntext = self._get_bbcode(ntext) kw = self._get_line_options() - cid = '%s\0%s' % (ntext, str(kw)) + cid = u'{}\0{}\0{}'.format(ntext, self.password, kw) texture = Cache_get('textinput.label', cid) if texture is None: @@ -128,9 +128,7 @@ class CodeInput(TextInput): return width lbl = self._create_line_label(text) width = lbl.width - Cache_append( - 'textinput.width', - text + u'_' + repr(self._get_line_options()), width) + Cache_append('textinput.width', cid, width) return width def _get_bbcode(self, ntext):