KTextEditor
katetextblock.cpp
302 || (sizeOfCurrentLine > 0 && (oldSizeOfPreviousLine > 0 || m_lines.at(line).markedAsModified()));
413 // special handling if cursor behind the real line, e.g. non-wrapping cursor in block selection mode
419 // we only need to trigger checkValidity later if the range has feedback or might be invalidated
450 removedText = textOfLine.mid(range.start().column(), range.end().column() - range.start().column());
490 // we only need to trigger checkValidity later if the range has feedback or might be invalidated
651QList<TextRange *> TextBlock::rangesForLine(int line, KTextEditor::View *view, bool rangesWithAttributeOnly) const
660void TextBlock::rangesForLine(int line, KTextEditor::View *view, bool rangesWithAttributeOnly, QList<TextRange *> &outRanges) const
681 if (range->startInternal().lineInternal() <= line && line <= range->endInternal().lineInternal()) {
688 std::copy_if(cachedRanges->begin(), cachedRanges->end(), std::back_inserter(outRanges), predicate);
690 std::copy_if(m_uncachedRanges.begin(), m_uncachedRanges.end(), std::back_inserter(outRanges), predicate);
constexpr int column() const noexcept
Retrieve the column on which this cursor is situated.
Definition cursor.h:192
constexpr int line() const noexcept
Retrieve the line on which this cursor is situated.
Definition cursor.h:174
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
constexpr LineRange toLineRange() const noexcept
Convert this Range to a LineRange.
Definition include/ktexteditor/range.h:173
constexpr Cursor end() const noexcept
Get the end position of this range.
Definition include/ktexteditor/range.h:163
constexpr Cursor start() const noexcept
Get the start position of this range.
Definition include/ktexteditor/range.h:153
void clearBlockContent(TextBlock *targetBlock)
Clear the block content, delete all lines, move all cursors not bound to range to given block at 0,...
Definition katetextblock.cpp:627
void wrapLine(const KTextEditor::Cursor position, int fixStartLinesStartIndex)
Wrap line at given cursor position.
Definition katetextblock.cpp:86
void deleteBlockContent()
Delete the block content, delete all lines and delete all cursors not bound to ranges.
Definition katetextblock.cpp:603
TextBlock(TextBuffer *buffer, int startLine)
Construct an empty text block.
Definition katetextblock.cpp:14
void insertText(const KTextEditor::Cursor position, const QString &text)
Insert text at given cursor position.
Definition katetextblock.cpp:363
void mergeBlock(TextBlock *targetBlock)
Merge this block with given one, the given one must be a direct predecessor.
Definition katetextblock.cpp:570
void removeText(KTextEditor::Range range, QString &removedText)
Remove text at given range.
Definition katetextblock.cpp:434
KTEXTEDITOR_EXPORT QList< TextRange * > rangesForLine(int line, KTextEditor::View *view, bool rangesWithAttributeOnly) const
Return all ranges in this block which might intersect the given line.
Definition katetextblock.cpp:651
void appendLine(const QString &textOfLine)
Append a new line with given text.
Definition katetextblock.cpp:61
void setLineMetaData(int line, const TextLine &textLine)
Transfer all non text attributes for the given line from the given text line to the one in the block.
Definition katetextblock.cpp:50
void markModifiedLinesAsSaved()
Flag all modified text lines as saved on disk.
Definition katetextblock.cpp:693
void unwrapLine(int line, TextBlock *previousBlock, int fixStartLinesStartIndex)
Unwrap given line.
Definition katetextblock.cpp:193
void debugPrint(int blockIndex) const
Debug output, print whole block content with line numbers and line length.
Definition katetextblock.cpp:505
int lineInternal() const
Non-virtual version of line(), which is faster.
Definition katetextcursor.h:124
const TextCursor & startInternal() const
Non-virtual version of start(), which is faster.
Definition katetextrange.h:163
const TextCursor & endInternal() const
Nonvirtual version of end(), which is faster.
Definition katetextrange.h:181
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.