diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2017-02-09 09:32:41 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2017-02-09 09:32:41 +0000 |
commit | f8b714b40c2ee4dc47a3c71d89c12ebb02fcee35 (patch) | |
tree | d156c1e70291e3d4b4691f01c77e3559a63f70f5 /alot/widgets | |
parent | c2b73f139998cd465133b5942a345875486ce514 (diff) |
optional linewise focussing in thread mode
This introduces a new config option 'thread_focus_linewise',
(defaults to True), which determines if the message texts are
split into individually focussable lines in thread mode.
fixes #645
Diffstat (limited to 'alot/widgets')
-rw-r--r-- | alot/widgets/thread.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index 70e7c840..1635d52d 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -94,8 +94,14 @@ class TextlinesList(SimpleTree): for each line in content. """ structure = [] - for line in content.splitlines(): - structure.append((FocusableText(line, attr, attr_focus), None)) + + # depending on this config setting, we either add individual lines + # or the complete context as focusable objects. + if settings.get('thread_focus_linewise'): + for line in content.splitlines(): + structure.append((FocusableText(line, attr, attr_focus), None)) + else: + structure.append((FocusableText(content, attr, attr_focus), None)) SimpleTree.__init__(self, structure) |