forked from qt-creator/qt-creator
TextEditor: Add delete(Start/End)OfLine actions
Task-number: QTCREATORBUG-18095 Change-Id: I75e6141687ba5e96ef59384b302357700f79dd55 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -6264,6 +6264,13 @@ void TextEditorWidget::deleteLine()
|
||||
textCursor().removeSelectedText();
|
||||
}
|
||||
|
||||
void TextEditorWidget::deleteEndOfLine()
|
||||
{
|
||||
moveCursor(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
|
||||
textCursor().removeSelectedText();
|
||||
setTextCursor(textCursor());
|
||||
}
|
||||
|
||||
void TextEditorWidget::deleteEndOfWord()
|
||||
{
|
||||
moveCursor(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
|
||||
@@ -6279,6 +6286,13 @@ void TextEditorWidget::deleteEndOfWordCamelCase()
|
||||
setTextCursor(c);
|
||||
}
|
||||
|
||||
void TextEditorWidget::deleteStartOfLine()
|
||||
{
|
||||
moveCursor(QTextCursor::StartOfLine, QTextCursor::KeepAnchor);
|
||||
textCursor().removeSelectedText();
|
||||
setTextCursor(textCursor());
|
||||
}
|
||||
|
||||
void TextEditorWidget::deleteStartOfWord()
|
||||
{
|
||||
moveCursor(QTextCursor::StartOfWord, QTextCursor::KeepAnchor);
|
||||
|
||||
Reference in New Issue
Block a user