From ada442d995dd2c19902e46c5eff11747175b2a51 Mon Sep 17 00:00:00 2001 From: Cristian Arteaga Date: Fri, 7 Aug 2020 16:43:08 -0700 Subject: [PATCH] Add Wrap lines checkbox to source menu --- spyder/plugins/editor/plugin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spyder/plugins/editor/plugin.py b/spyder/plugins/editor/plugin.py index bf6a5b9d55f..f58a1c5addb 100644 --- a/spyder/plugins/editor/plugin.py +++ b/spyder/plugins/editor/plugin.py @@ -830,6 +830,9 @@ def get_plugin_actions(self): _("Underline errors and warnings"), 'underline_errors', 'set_underline_errors_enabled') + wrap_lines_action = self._create_checkable_action( + _("Wrap lines"), 'wrap', 'set_wrap_enabled') + self.checkable_actions = { 'blank_spaces': showblanks_action, 'scroll_past_end': scrollpastend_action, @@ -838,7 +841,8 @@ def get_plugin_actions(self): 'show_class_func_dropdown': show_classfunc_dropdown_action, 'pycodestyle': show_codestyle_warnings_action, 'pydocstyle': show_docstring_warnings_action, - 'underline_errors': underline_errors} + 'underline_errors': underline_errors, + 'wrap': wrap_lines_action} fixindentation_action = create_action(self, _("Fix indentation"), tip=_("Replace tab characters by space characters"), @@ -1008,6 +1012,7 @@ def get_plugin_actions(self): show_classfunc_dropdown_action, show_codestyle_warnings_action, show_docstring_warnings_action, + wrap_lines_action, underline_errors, MENU_SEPARATOR, self.todo_list_action,