Fix for text plug-in scripts on 64-bit platforms.
authorIan Thompson <quornian@googlemail.com>
Tue, 26 Aug 2008 17:09:17 +0000 (17:09 +0000)
committerIan Thompson <quornian@googlemail.com>
Tue, 26 Aug 2008 17:09:17 +0000 (17:09 +0000)
release/scripts/textplugin_templates.py

index 25dadf4de540877692a8fd3a37d2581bbfdde76f..8f949563ac0e205ebc380e370afe4937e75dab84 100644 (file)
@@ -35,6 +35,13 @@ templates = {
                '\t"""(${2}) - ${3:comment}"""\n'
                '\t${4}',
        'cls':
+               'class ${1:name}(${2:parent}):\n'
+               '\t"""${3:docs}"""\n'
+               '\t\n'
+               '\tdef __init__(self, ${4:params}):\n'
+               '\t\t"""Creates a new ${1}"""\n'
+               '\t\t${5}',
+       'class':
                'class ${1:name}(${2:parent}):\n'
                '\t"""${3:docs}"""\n'
                '\t\n'
@@ -102,7 +109,8 @@ def main():
                        for x, y in points:
                                txt.setCursorPos(y, x)
                                txt.setSelectPos(y, x+len(text))
-                               txt.markSelection(hash(text)+int(id), color, Text.TMARK_TEMP | Text.TMARK_EDITALL)
+                               txt.markSelection((hash(text)+int(id)) & 0xFFFF, color,
+                                               Text.TMARK_TEMP | Text.TMARK_EDITALL)
                if first:
                        text, x, y = first
                        txt.setCursorPos(y, x)