diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-21 22:23:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-21 22:23:56 +0200 |
commit | 2a0f3d3fb2a7e26d47810098894f8e615571afe3 (patch) | |
tree | e402ca98134661b2a3f133083adf18bdc66151b6 /src/testdir/test86.in | |
parent | 0b9aecc3a5020a3f3714bf4e58046321b46632fb (diff) |
updated for version 7.3.1003v7.3.1003
Problem: Python interface does not compile with Python 2.2
Solution: Fix thread issues and True/False. (ZyX)
Diffstat (limited to 'src/testdir/test86.in')
-rw-r--r-- | src/testdir/test86.in | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/testdir/test86.in b/src/testdir/test86.in index fac315e2d2..d138a8d6a9 100644 --- a/src/testdir/test86.in +++ b/src/testdir/test86.in @@ -518,6 +518,10 @@ EOF :edit c :buffer # py << EOF +try: + from __builtin__ import next +except ImportError: + next = lambda o: o.next() # Check GCing iterator that was not fully exhausted i = iter(vim.buffers) cb.append('i:' + str(next(i))) @@ -577,15 +581,22 @@ py << EOF cb.append('Number of tabs: ' + str(len(vim.tabpages))) cb.append('Current tab pages:') def W(w): - if '(unknown)' in repr(w): + if repr(w).find('(unknown)') != -1: return '<window object (unknown)>' else: return repr(w) + +def Cursor(w, start=len(cb)): + if w.buffer is cb: + return repr((start - w.cursor[0], w.cursor[1])) + else: + return repr(w.cursor) + for t in vim.tabpages: cb.append(' ' + repr(t) + '(' + str(t.number) + ')' + ': ' + str(len(t.windows)) + ' windows, current is ' + W(t.window)) cb.append(' Windows:') for w in t.windows: - cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + repr(w.cursor)) + cb.append(' ' + W(w) + '(' + str(w.number) + ')' + ': displays buffer ' + repr(w.buffer) + '; cursor is at ' + Cursor(w)) # Other values depend on the size of the terminal, so they are checked partly: for attr in ('height', 'row', 'width', 'col'): try: |