mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibGUI: Unindent selected text on shift+tab press
Selected text is unindented when Shift+Tab is pressed. Select text, indent it with Tab, then unindent with Shift+Tab.
This commit is contained in:
parent
2fbaa7996c
commit
9369610bf4
4 changed files with 63 additions and 0 deletions
|
@ -271,4 +271,16 @@ private:
|
|||
TextRange m_range;
|
||||
};
|
||||
|
||||
class UnindentSelection : public TextDocumentUndoCommand {
|
||||
public:
|
||||
UnindentSelection(TextDocument&, size_t tab_width, TextRange const&);
|
||||
virtual void undo() override;
|
||||
virtual void redo() override;
|
||||
TextRange const& range() const { return m_range; }
|
||||
|
||||
private:
|
||||
size_t m_tab_width { 0 };
|
||||
TextRange m_range;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue