summaryrefslogtreecommitdiff
path: root/urwid
diff options
context:
space:
mode:
authorIan Ward <ian@excess.org>2013-01-27 15:13:19 -0500
committerIan Ward <ian@excess.org>2013-01-27 15:13:19 -0500
commit0b73312af503f01053b5672dc425d4637aba2036 (patch)
treecbaa29148334f937ba2601cc7d13d98b9ec996da /urwid
parente1d43765583567894f8a17949febbfa4b906afaa (diff)
downloadurwid-0b73312af503f01053b5672dc425d4637aba2036.tar.gz
fix for Columns.move_cursor_to_coords not handling left/right
Diffstat (limited to 'urwid')
-rwxr-xr-xurwid/container.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/urwid/container.py b/urwid/container.py
index c4d72ac..81b6435 100755
--- a/urwid/container.py
+++ b/urwid/container.py
@@ -2121,17 +2121,15 @@ class Columns(Widget, WidgetContainerMixin, WidgetContainerListContentsMixin):
for i, (width, (w, options)) in enumerate(zip(widths, self.contents)):
end = x + width
if w.selectable():
- # FIXME: sometimes, col == 'left' - that doesn't seem like its handled here, does it?
- # assert isinstance(x, int) and isinstance(col, int), (x, col)
- if x > col and best is None:
+ if (col == LEFT or x > col) and best is None:
# no other choice
best = i, x, end, w, options
break
- if x > col and col-best[2] < x-col:
+ if col != RIGHT and x > col and col-best[2] < x-col:
# choose one on left
break
best = i, x, end, w, options
- if col < end:
+ if col != RIGHT and col < end:
# choose this one
break
x = end + self.dividechars