summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--text.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/text.py b/text.py
index c2b1b9654..0c9a455df 100644
--- a/text.py
+++ b/text.py
@@ -186,11 +186,14 @@ class LanguageDefaultWindow:
descriptions.sort ()
current = todo.language.get ()
+ found = FALSE
for lang in langs:
if languages[lang] == current:
default = langs.index (lang)
+ found = TRUE
else:
- default = langs[0]
+ if found == FALSE:
+ default = langs[0]
height = min((screen.height - 16, len(descriptions)))