Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Keep the first line indentation selected when indenting text #1746
I am not sure if this is a bug. There is simple plugin posted by Stack Overflow#Keith Hall which changes this behavior:
import sublime import sublime_plugin class IndentSelectWholeFirstLineEventListener(sublime_plugin.EventListener): def on_post_text_command(self, view, command_name, args): if command_name == 'indent': if all(not sel.empty() for sel in view.sel()): if all(view.line(sel.begin()) != view.line(sel.end()) for sel in view.sel()): new_selections =  for sel in view.sel(): new_selections.append(sel.cover(view.line(sel.begin()))) view.sel().clear() view.sel().add_all(new_selections)
Originally posted by BlueCaret:
It is expected to the first indentation line to be part of the selection after the indentation process.
The first line does not makes part of the selection after the indentation command.
Steps to reproduce
Now the indentation created on the first line is out of the selection bounds after the indent command:
Then I have to select them manually later, after the indentation.
Steps originally posted on: