mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-33642: IDLE: Use variable number of lines in CodeContext. (GH-7106)
Instead of displaying a fixed number of lines, some blank, Code Context now displays the variable number of actual context lines. When there are no context lines, it shows a single blank line to indicate that the feature is turned on. The Code Context configuration option is changed from 'numlines' (default 3) to 'maxlines' (default 15) to avoid possible interference between user settings for the old and new versions of Code Context.
This commit is contained in:
parent
6854e803b7
commit
29996a1c4e
6 changed files with 40 additions and 29 deletions
|
@ -1170,7 +1170,7 @@ class GenPageTest(unittest.TestCase):
|
|||
def test_context(self):
|
||||
self.page.context_int.delete(0, 'end')
|
||||
self.page.context_int.insert(0, '1')
|
||||
self.assertEqual(extpage, {'CodeContext': {'numlines': '1'}})
|
||||
self.assertEqual(extpage, {'CodeContext': {'maxlines': '1'}})
|
||||
|
||||
def test_source_selected(self):
|
||||
d = self.page
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue