QScintilla/Editor.py

branch
Py2 comp.
changeset 2526
a91cba8291b9
parent 2525
8b507a9a2d40
child 2571
e6bb19eb87ea
equal deleted inserted replaced
2525:8b507a9a2d40 2526:a91cba8291b9
5 5
6 """ 6 """
7 Module implementing the editor component of the eric5 IDE. 7 Module implementing the editor component of the eric5 IDE.
8 """ 8 """
9 from __future__ import unicode_literals # __IGNORE_WARNING__ 9 from __future__ import unicode_literals # __IGNORE_WARNING__
10 try:
11 chr = unichr
12 except (NameError):
13 pass
10 14
11 import os 15 import os
12 import re 16 import re
13 import difflib 17 import difflib
14 18
6618 while commands: 6622 while commands:
6619 commandLine = commands.pop(0) 6623 commandLine = commands.pop(0)
6620 if not commandLine.startswith("@@"): 6624 if not commandLine.startswith("@@"):
6621 continue 6625 continue
6622 6626
6623 command, *args = commandLine.split() 6627 args = commandLine.split()
6628 command = args.pop(0)
6624 pos, l1, l2 = [int(arg) for arg in args] 6629 pos, l1, l2 = [int(arg) for arg in args]
6625 if command == "@@i": 6630 if command == "@@i":
6626 txt = sep.join(commands[0:l1]) + sep 6631 txt = sep.join(commands[0:l1]) + sep
6627 self.insertAt(txt, pos, 0) 6632 self.insertAt(txt, pos, 0)
6628 del commands[0:l1] 6633 del commands[0:l1]

eric ide

mercurial