From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 26 Feb 2016 20:05:21 +0000 (+0100)
Subject: Client: Fix broken "things here" window scrolling command.
X-Git-Tag: tce~138
X-Git-Url: https://plomlompom.com/repos/day_todos?a=commitdiff_plain;h=92d13d6d26fd7df2b84af81ea8ca8a6ffadf12ad;p=plomrogue

Client: Fix broken "things here" window scrolling command.
---

diff --git a/client/commands.py b/client/commands.py
index c1d6141..d86346f 100644
--- a/client/commands.py
+++ b/client/commands.py
@@ -66,8 +66,15 @@ def command_looker(string):
 
 def command_look_scroller(string):
     def command_look_scroll():
-        win_size = next(win["size"] for win in windows
-                                    if win["func"] == win_look)
+        from client.window_management import windows
+        from client.config.windows import windows_config
+        from client.windows import win_look
+        try:
+            i = next(i for i in range(len(windows_config))
+                        if windows_config[i]["func"] == win_look)
+        except StopIteration:
+            return
+        win_size = windows[i].size
         if string == "up" and world_data["look_scroll"] > 0:
             world_data["look_scroll"] -= 1
         elif string == "down" and world_data["look_scroll"] \