~pyreadline/pyreadline/trunk

« back to all changes in this revision

Viewing changes to pyreadline/lineeditor/lineobj.py

  • Committer: Jorgen Stenarson
  • Date: 2011-10-06 19:02:52 UTC
  • mfrom: (100.1.19 python3)
  • Revision ID: jorgen.stenarson@bostream.nu-20111006190252-efh961vx5qbcohom
Merging python3 fixes from Shimizukawa

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
import wordmatcher
11
11
import pyreadline.clipboard as clipboard
12
12
from pyreadline.logger import  log
13
 
from pyreadline.unicode_helper import ensure_unicode
 
13
from pyreadline.unicode_helper import ensure_unicode, biter
14
14
 
15
15
kill_ring_to_clipboard = False #set to true to copy every addition to kill ring to clipboard
16
16
 
272
272
    def _insert_text(self, text, argument=1):
273
273
        text = text * argument
274
274
        if self.overwrite:
275
 
            for c in text:
 
275
            for c in biter(text):
276
276
                #if self.point:
277
277
                self.line_buffer[self.point] = c
278
278
                self.point += 1
279
279
        else:            
280
 
            for c in text:
 
280
            for c in biter(text):
281
281
                self.line_buffer.insert(self.point, c)
282
282
                self.point += 1
283
283