summaryrefslogtreecommitdiff
path: root/Lib/idlelib/config.py
diff options
context:
space:
mode:
authorTal Einat <taleinat@gmail.com>2019-07-23 15:22:11 +0300
committerGitHub <noreply@github.com>2019-07-23 15:22:11 +0300
commit7123ea009b0b004062d91f69859bddf422c34ab4 (patch)
tree710e79beacd4853354ccb4a5d6333148914e54ec /Lib/idlelib/config.py
parent1ebee37dde5c2aabc8e2d2c7bbe2a69b293133bb (diff)
downloadcpython-git-7123ea009b0b004062d91f69859bddf422c34ab4.tar.gz
bpo-17535: IDLE editor line numbers (GH-14030)
Diffstat (limited to 'Lib/idlelib/config.py')
-rw-r--r--Lib/idlelib/config.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/idlelib/config.py b/Lib/idlelib/config.py
index 0c55c9a7d7..683b000a48 100644
--- a/Lib/idlelib/config.py
+++ b/Lib/idlelib/config.py
@@ -319,6 +319,10 @@ class IdleConf:
'hit-background':'#000000',
'error-foreground':'#ffffff',
'error-background':'#000000',
+ 'context-foreground':'#000000',
+ 'context-background':'#ffffff',
+ 'linenumber-foreground':'#000000',
+ 'linenumber-background':'#ffffff',
#cursor (only foreground can be set)
'cursor-foreground':'#000000',
#shell window
@@ -328,11 +332,11 @@ class IdleConf:
'stderr-background':'#ffffff',
'console-foreground':'#000000',
'console-background':'#ffffff',
- 'context-foreground':'#000000',
- 'context-background':'#ffffff',
}
for element in theme:
- if not cfgParser.has_option(themeName, element):
+ if not (cfgParser.has_option(themeName, element) or
+ # Skip warning for new elements.
+ element.startswith(('context-', 'linenumber-'))):
# Print warning that will return a default color
warning = ('\n Warning: config.IdleConf.GetThemeDict'
' -\n problem retrieving theme element %r'