diff options
author | Luiz Paulo de Vasconcellos <luiz.pv9@gmail.com> | 2016-04-04 02:31:39 -0300 |
---|---|---|
committer | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-04-04 07:31:39 +0200 |
commit | 1b6f14d81047b563283fb66022701f03d5bd9ca1 (patch) | |
tree | 8f66691971a801ccc441150d4d8c851700000642 | |
parent | 72825ecdca3ea91a2f552fb84416f9bc4d42b182 (diff) |
Change toggle comment behaviour. Fixes #4198
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 96dd03d111..ae4611c718 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -1257,6 +1257,11 @@ void ScriptEditor::_menu_option(int p_option) { { int begin = tx->get_selection_from_line(); int end = tx->get_selection_to_line(); + + // End of selection ends on the first column of the last line, ignore it. + if(tx->get_selection_to_column() == 0) + end -= 1; + for (int i = begin; i <= end; i++) { String line_text = tx->get_line(i); |