forked from qt-creator/qt-creator
Beautifier: ClangFormat: Format current syntactic entity for no selection
In case there was no selection, the action "Format Selected Text" could format the whole file (option) as a fallback. However, there is also the use case of formatting the syntactic entity under the cursor. Introducing another separate action for this feels wrong, so remove the fallback instead since there is already an action handling this. Change-Id: Ia73f6074433e706bb4c2d375ad5b84dd59bc93a3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Lorenz Haas <lorenz.haas@histomatics.de>
This commit is contained in:
@@ -174,12 +174,14 @@
|
||||
\endlist
|
||||
|
||||
In addition to the \uicontrol {Format Current File} command, ClangFormat
|
||||
and Uncrustify provide the \uicontrol {Format Selected Text} command. If you
|
||||
and Uncrustify provide additional commands.
|
||||
ClangFormat provides the \uicontrol {Format at Cursor} command. If you
|
||||
select it when no text is selected, the syntactic entity under the cursor
|
||||
is formatted. The \uicontrol {Disable Formatting for Selected Text} command
|
||||
wraps selected lines within \c {// clang-format off} and
|
||||
\c {// clang-format on}.
|
||||
Uncrustify provides the \uicontrol {Format Selected Text} command. If you
|
||||
select it when no text is selected, the whole file is formatted by default.
|
||||
To disable this behavior, deselect the
|
||||
\uicontrol {Format entire file if no text was selected} check box.
|
||||
|
||||
ClangFormat provides additionally the \uicontrol {Disable Formatting for
|
||||
Selected Text} command. If you select it, the selected lines will be
|
||||
wrapped within \c {// clang-format off} and \c {// clang-format on}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user